Work on userprog tests.
[pintos-anon] / grading / userprog / Makefile
1 SRCDIR = ../../src
2
3 SINGLETONS = create-normal create-empty create-null create-invalid create-long 
4
5 define SINGLETON_PROG
6 PROGS += $(1)
7 $(1)_SRC = $(1).c
8 endef
9
10 $(foreach prog,$(SINGLETONS),$(eval $(call SINGLETON_PROG,$(prog))))
11 DISKS = $(patsubst %,%.dsk,$(PROGS))
12
13 disks: $(DISKS)
14
15 PINTOS = ../../src/utils/pintos
16 %.dsk: % os.dsk
17         rm -f $@ fs.dsk
18         $(PINTOS) make-disk fs.dsk 2
19         $(PINTOS) -v run -f -q
20         $(PINTOS) -v put $<
21         mv fs.dsk $@
22
23 os.dsk: ../../src/userprog/build/os.dsk
24         ln -sf $< $@
25
26 clean::
27         rm -f $(DISKS)
28
29 include $(SRCDIR)/Makefile.userprog