1 TESTS
= threads p1 userprog p2 vm p3 filesys p4
3 PATH
:= $(shell pwd
)/..
/src
/utils
:$(PATH
)
6 @echo
"This Makefile has only \`check' targets."
9 $(MAKE
) -C ..
distclean
10 for d in
$(TESTS
); do
$(MAKE
) $$d || exit
1; done
11 @echo All tests passed.
19 rm -rf
$@
&& mkdir
$@
&& cp
-R ..
/src
$@
/src
20 cd
$@
/src
&& $(MAKE
) clean $(SUBMAKEFLAGS
)
24 cd
$@
/src
/$(PROJECT
) && $(MAKE
) check
27 define run-tests-grade
28 cd
$@
/src
/$(PROJECT
) && $(MAKE
) check
29 cd
$@
/src
/$(PROJECT
) && $(MAKE
) grade
30 cd
$@
/src
/$(PROJECT
) && grep
-q PERFECT build
/grade
31 cd
$@
/src
/$(PROJECT
) && grep
-qv warning build
/grade
35 cd
$@
/src
/$(PROJECT
) && $(MAKE
)
51 $(run-tests
) TESTS
=tests
/threads
/alarm-single
59 FAST_SIM
:= $(if
$(shell which qemu
),--qemu
)
65 $(apply-patch
) < ..
/solutions
/p1.patch
69 p2
: PROJECT
= userprog
70 p2
: PINTOSOPTS
= $(FAST_SIM
)
73 $(apply-patch
) < ..
/solutions
/p2.patch
78 p3
: PINTOSOPTS
= $(FAST_SIM
)
81 $(apply-patch
) < ..
/solutions
/p3.patch
86 p4
: PINTOSOPTS
= $(FAST_SIM
)
89 $(apply-patch
) < ..
/solutions
/p4.patch