diff --git a/Makefile b/Makefile index e1e148a..2c1cbbf 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,15 @@ -OBJS=emul.o emul_mem.o emul_reg.o emul_io_std.o emul_io_file.o +OBJS=emul.o emul_io_std.o emul_io_file.o emul_mem.o emul_reg.o CC=gcc +PROGRAM=emulcomp -emulcomp: $(OBJS) - $(CC) $(OBJS) -o emulcomp +.SUFFIXES: .c .o -emul.o: emul.c - $(CC) -c emul.c +$(PROGRAM): $(OBJS) + $(CC) -o $(PROGRAM) $^ -emul_mem.o: emul_mem.c - $(CC) -c emul_mem.c -emul_reg.o: emul_reg.c - $(CC) -c emul_reg.c +.c.o: + $(CC) -c $< -emul_io_std.o: emul_io_std.c - $(CC) -c emul_io_std.c -emul_io_file.o: emul_io_file.c - $(CC) -c emul_io_file.c - +.PHONY: clean clean: - rm -f $(OBJS) + rm -f $(OBJS) $(PROGRAM) diff --git a/emul.c b/emul.c index 49eee05..98298c4 100644 --- a/emul.c +++ b/emul.c @@ -1,6 +1,6 @@ #include "emul_reg.h" #include "emul_mem.h" -#include "emul_io_std.h" +#include "emul_io.h" int main(void) { emul_reg_init(); diff --git a/emul.o b/emul.o deleted file mode 100644 index 7c3e101..0000000 --- a/emul.o +++ /dev/null Binary files differ diff --git a/emul_io_file.o b/emul_io_file.o deleted file mode 100644 index ea7568d..0000000 --- a/emul_io_file.o +++ /dev/null Binary files differ diff --git a/emul_io_std.o b/emul_io_std.o deleted file mode 100644 index 8eac8f8..0000000 --- a/emul_io_std.o +++ /dev/null Binary files differ diff --git a/emul_mem.o b/emul_mem.o deleted file mode 100644 index 587d549..0000000 --- a/emul_mem.o +++ /dev/null Binary files differ diff --git a/emul_reg.o b/emul_reg.o deleted file mode 100644 index afc48ff..0000000 --- a/emul_reg.o +++ /dev/null Binary files differ diff --git a/emulcomp b/emulcomp deleted file mode 100755 index d6256a6..0000000 --- a/emulcomp +++ /dev/null Binary files differ