From 7179931224f0f183dbb101fbbb749afacf53d6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Wed, 5 Apr 2023 15:09:10 +0200 Subject: [PATCH] Makefile fixes --- Makefile | 7 ++++--- test/riscv_instructions/Makefile | 6 +----- .../syscall_tests/Makefile | 2 +- test/syscall_tests/halt | Bin 0 -> 19552 bytes .../syscall_tests/halt.c | 0 test/syscall_tests/prints | Bin 0 -> 19616 bytes .../syscall_tests/prints.c | 0 7 files changed, 6 insertions(+), 9 deletions(-) rename test/{riscv_instructions => }/syscall_tests/Makefile (70%) create mode 100755 test/syscall_tests/halt rename test/{riscv_instructions => }/syscall_tests/halt.c (100%) create mode 100755 test/syscall_tests/prints rename test/{riscv_instructions => }/syscall_tests/prints.c (100%) diff --git a/Makefile b/Makefile index 4adde13..cdbbde4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ TOPDIR=. include $(TOPDIR)/Makefile.config -all: dumps user_lib tests +all: dumps user_lib instruction_tests # # Main targets # @@ -18,8 +18,9 @@ dumps: user_lib: $(MAKE) -C userlib/ -tests: user_lib - $(MAKE) tests -C test/riscv_instructions/ +syscall: user_lib + $(MAKE) build -C test/syscall_tests/ + $(RM) test/syscall_tests/*.o mkdir -p ${TOPDIR}/target/guac/ find . -name '*.guac' -exec mv {} ${TOPDIR}/target/guac/ \; diff --git a/test/riscv_instructions/Makefile b/test/riscv_instructions/Makefile index 029a205..7c9a691 100644 --- a/test/riscv_instructions/Makefile +++ b/test/riscv_instructions/Makefile @@ -2,22 +2,18 @@ build: make build -C boolean_logic/ make build -C jump_instructions/ make build -C simple_arithmetics/ - make build -C syscall_tests/ dumps: make dumps -C boolean_logic/ make dumps -C jump_instructions/ make dumps -C simple_arithmetics/ - make dumps -C syscall_tests/ tests: make tests -C boolean_logic/ make tests -C jump_instructions/ make tests -C simple_arithmetics/ - make tests -C syscall_tests/ clean: $(MAKE) clean -C boolean_logic/ $(MAKE) clean -C jump_instructions/ - $(MAKE) clean -C simple_arithmetics/ - $(MAKE) clean -C syscall_tests/ \ No newline at end of file + $(MAKE) clean -C simple_arithmetics/ \ No newline at end of file diff --git a/test/riscv_instructions/syscall_tests/Makefile b/test/syscall_tests/Makefile similarity index 70% rename from test/riscv_instructions/syscall_tests/Makefile rename to test/syscall_tests/Makefile index e528387..13adddc 100644 --- a/test/riscv_instructions/syscall_tests/Makefile +++ b/test/syscall_tests/Makefile @@ -10,7 +10,7 @@ tests: halt.guac prints.guac clean: $(RM) halt.o halt prints prints.o -TOPDIR = ../../.. +TOPDIR = ../.. include $(TOPDIR)/Makefile.rules $(PROGRAMS): % : $(USERLIB)/sys.o $(USERLIB)/libnachos.o %.o \ No newline at end of file diff --git a/test/syscall_tests/halt b/test/syscall_tests/halt new file mode 100755 index 0000000000000000000000000000000000000000..351625f7403bfeb9dfb536c54141c538b8d9d7fa GIT binary patch literal 19552 zcmeHPeQXrh5udwVdkHvTaPL#?l#3!HE{XAhvCsX@ zdvEXd_RfSTX{AWJ(%pMIZ{Ezj-n7M*>8LVd<1+1d<1+1d<1+1d<1+1d<1+1d<1+1zSIZ|jenc6 zX=(}KVf->#fxT&>%p#&5tV;IlUH!1D-{k6Bu6~=V|AecbaP`x!{!v#y7bxi+anUch z=%-xtQCEN5)xY5C=Ujbq$)R9LSG|iKcJ-TFeaqEvbM>Ea^%Jgs+SNbm>W{ekr(FF} zSAX2quXouQF806FPUjo%Bj6+8Bj6+8Bj6+8Bj6+8Bj6+8Bj6+Oe@7q`2+Wzy%Y$aq z)4`A)(9A6-XZtq|fHqY?Tgavj;&%f>*64gTot_WD!hY~-&4D21YW$7>ZNc2KoXpKn z6J!L<=92}p=}h5u!=lWfLBsfHoAkm;1F~uj$~=Sn4Fd%!b2N}KYA6I6E{^`+8Uow4=HIAyAB&OtS64Yg2))y*H5z#w#A78EWapgFWUrNYELF#G_dZ4)>`g& zyua{^xy!j%uCY%rR=jW81|78at3{f^lJSKf2pmG-Wqi*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