diff --git a/Makefile b/Makefile index cdbbde4..7879073 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ TOPDIR=. include $(TOPDIR)/Makefile.config -all: dumps user_lib instruction_tests +all: dumps user_lib instruction_tests syscall # # Main targets # @@ -26,6 +26,6 @@ syscall: user_lib clean: $(MAKE) clean -C userlib/ - $(MAKE) clean -C test/riscv_instructions/ + $(MAKE) clean -C test/ $(RM) -rf $(TOPDIR)/target \ No newline at end of file diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..ff1194e --- /dev/null +++ b/test/Makefile @@ -0,0 +1,3 @@ +clean: + make clean -C riscv_instructions + make clean -C syscall_tests \ No newline at end of file diff --git a/test/riscv_instructions/Makefile b/test/riscv_instructions/Makefile index 7c9a691..68747d1 100644 --- a/test/riscv_instructions/Makefile +++ b/test/riscv_instructions/Makefile @@ -8,11 +8,6 @@ dumps: make dumps -C jump_instructions/ make dumps -C simple_arithmetics/ -tests: - make tests -C boolean_logic/ - make tests -C jump_instructions/ - make tests -C simple_arithmetics/ - clean: $(MAKE) clean -C boolean_logic/ $(MAKE) clean -C jump_instructions/ diff --git a/test/riscv_instructions/boolean_logic/Makefile b/test/riscv_instructions/boolean_logic/Makefile index b0d2554..8b68cbb 100644 --- a/test/riscv_instructions/boolean_logic/Makefile +++ b/test/riscv_instructions/boolean_logic/Makefile @@ -1,17 +1,14 @@ -PROGRAMS = comparisons if switch +PROGRAMS = comparisons.guac if.guac switch.guac +TOPDIR = ../../.. +include $(TOPDIR)/Makefile.rules build: $(PROGRAMS) dumps: comparisons.dump if.dump switch.dump -tests: comparisons.guac if.guac switch.guac - -TOPDIR = ../../.. -include $(TOPDIR)/Makefile.rules - clean: - $(RM) comparisons comparisons.o if if.o + $(RM) *.o *.guac # Dependances -$(PROGRAMS): % : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file +$(PROGRAMS): %.guac : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file diff --git a/test/riscv_instructions/jump_instructions/Makefile b/test/riscv_instructions/jump_instructions/Makefile index 72523a3..25669fe 100644 --- a/test/riscv_instructions/jump_instructions/Makefile +++ b/test/riscv_instructions/jump_instructions/Makefile @@ -1,15 +1,12 @@ -PROGRAMS = jump ret +PROGRAMS = jump.guac ret.guac +TOPDIR = ../../.. +include $(TOPDIR)/Makefile.rules build: $(PROGRAMS) dumps: jump.dump ret.dump -tests: jump.guac ret.guac - clean: - $(RM) jump jump.o ret ret.o + $(RM) *.o *.guac -TOPDIR = ../../.. -include $(TOPDIR)/Makefile.rules - -$(PROGRAMS): % : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file +$(PROGRAMS): %.guac : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file diff --git a/test/riscv_instructions/simple_arithmetics/Makefile b/test/riscv_instructions/simple_arithmetics/Makefile index 1d3dcf2..741e9e6 100644 --- a/test/riscv_instructions/simple_arithmetics/Makefile +++ b/test/riscv_instructions/simple_arithmetics/Makefile @@ -1,16 +1,12 @@ - -PROGRAMS = unsigned_addition unsigned_division unsigned_multiplication unsigned_substraction +PROGRAMS = unsigned_addition.guac unsigned_division.guac unsigned_multiplication.guac unsigned_substraction.guac +TOPDIR = ../../.. +include $(TOPDIR)/Makefile.rules build: $(PROGRAMS) dumps: unsigned_addition.dump unsigned_division.dump unsigned_multiplication.dump unsigned_substraction.dump -tests: unsigned_addition.guac unsigned_division.guac unsigned_multiplication.guac unsigned_substraction.guac - clean: - $(RM) unsigned_addition unsigned_addition.o unsigned_division unsigned_division.o unsigned_multiplication unsigned_multiplication.o unsigned_substraction unsigned_substraction.o + $(RM) *.o *.guac -TOPDIR = ../../.. -include $(TOPDIR)/Makefile.rules - -$(PROGRAMS): % : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file +$(PROGRAMS): %.guac : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file diff --git a/test/syscall_tests/Makefile b/test/syscall_tests/Makefile index 40e1364..c374c49 100644 --- a/test/syscall_tests/Makefile +++ b/test/syscall_tests/Makefile @@ -1,16 +1,12 @@ - PROGRAMS = halt.guac prints.guac +TOPDIR = ../.. +include $(TOPDIR)/Makefile.rules build: $(PROGRAMS) dumps: halt.dump prints.dump -tests: halt.guac prints.guac - clean: - $(RM) halt.o prints.o - -TOPDIR = ../.. -include $(TOPDIR)/Makefile.rules + $(RM) *.o *.guac $(PROGRAMS): %.guac : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o diff --git a/test/syscall_tests/halt b/test/syscall_tests/halt deleted file mode 100755 index 351625f..0000000 Binary files a/test/syscall_tests/halt and /dev/null differ diff --git a/test/syscall_tests/prints b/test/syscall_tests/prints deleted file mode 100755 index d3545b5..0000000 Binary files a/test/syscall_tests/prints and /dev/null differ