X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=grading%2Fuserprog%2FMakefile;h=225180f73f7a3bf81a00609d4f23e75e2acb45e6;hb=2cfc156c39840ce7f1cda6b473de1322691a8a0b;hp=a928b97003a2edb7ae096fea380733117f72fb19;hpb=fe106fae62a28fbcaec46830859884b98f577159;p=pintos-anon diff --git a/grading/userprog/Makefile b/grading/userprog/Makefile index a928b97..225180f 100644 --- a/grading/userprog/Makefile +++ b/grading/userprog/Makefile @@ -1,29 +1,107 @@ -SRCDIR = ../../src +# This file is automatically generated from Make.base and Make.tests +# by mkmf. Do not modify! + +TESTS = \ + args-argc args-argv0 args-argvn args-single args-multiple \ + args-dbl-space sc-bad-sp sc-bad-arg sc-boundary halt exit \ + create-normal create-empty create-null create-bad-ptr create-long \ + create-exists create-bound open-normal open-missing open-boundary \ + open-empty open-null open-bad-ptr open-twice close-normal \ + close-twice close-stdin close-stdout close-bad-fd read-normal \ + read-bad-ptr read-boundary read-zero read-stdout read-bad-fd \ + write-normal write-bad-ptr write-boundary write-zero write-stdin \ + write-bad-fd exec-once exec-arg exec-multiple exec-missing \ + exec-bad-ptr wait-simple wait-twice wait-killed wait-bad-pid \ + multi-recurse multi-oom multi-child-fd +args_argc_SRC = args-argc.c +args_argv0_SRC = args-argv0.c +args_argvn_SRC = args-argvn.c +args_single_SRC = args-single.c +args_multiple_SRC = args-multiple.c +args_dbl_space_SRC = args-dbl-space.c +sc_bad_sp_SRC = sc-bad-sp.c +sc_bad_arg_SRC = sc-bad-arg.c +sc_boundary_SRC = sc-boundary.c +halt_SRC = halt.c +exit_SRC = exit.c +create_normal_SRC = create-normal.c +create_empty_SRC = create-empty.c +create_null_SRC = create-null.c +create_bad_ptr_SRC = create-bad-ptr.c +create_long_SRC = create-long.c +create_exists_SRC = create-exists.c +create_bound_SRC = create-bound.c +open_normal_SRC = open-normal.c +open_missing_SRC = open-missing.c +open_boundary_SRC = open-boundary.c +open_empty_SRC = open-empty.c +open_null_SRC = open-null.c +open_bad_ptr_SRC = open-bad-ptr.c +open_twice_SRC = open-twice.c +close_normal_SRC = close-normal.c +close_twice_SRC = close-twice.c +close_stdin_SRC = close-stdin.c +close_stdout_SRC = close-stdout.c +close_bad_fd_SRC = close-bad-fd.c +read_normal_SRC = read-normal.c +read_bad_ptr_SRC = read-bad-ptr.c +read_boundary_SRC = read-boundary.c +read_zero_SRC = read-zero.c +read_stdout_SRC = read-stdout.c +read_bad_fd_SRC = read-bad-fd.c +write_normal_SRC = write-normal.c +write_bad_ptr_SRC = write-bad-ptr.c +write_boundary_SRC = write-boundary.c +write_zero_SRC = write-zero.c +write_stdin_SRC = write-stdin.c +write_bad_fd_SRC = write-bad-fd.c +exec_once_SRC = exec-once.c +exec_arg_SRC = exec-arg.c +exec_multiple_SRC = exec-multiple.c +exec_missing_SRC = exec-missing.c +exec_bad_ptr_SRC = exec-bad-ptr.c +wait_simple_SRC = wait-simple.c +wait_twice_SRC = wait-twice.c +wait_killed_SRC = wait-killed.c +wait_bad_pid_SRC = wait-bad-pid.c +multi_recurse_SRC = multi-recurse.c +multi_oom_SRC = multi-oom.c +multi_child_fd_SRC = multi-child-fd.c -SINGLETONS = create-normal create-empty create-null create-invalid create-long +SRCDIR = ../../src -define SINGLETON_PROG -PROGS += $(1) -$(1)_SRC = $(1).c -endef +PROGS = $(TESTS) child-simple child-arg child-bad child-close +child_simple_SRC = child-simple.c +child_arg_SRC = child-arg.c +child_bad_SRC = child-bad.c +child_close_SRC = child-close.c -$(foreach prog,$(SINGLETONS),$(eval $(call SINGLETON_PROG,$(prog)))) -DISKS = $(patsubst %,%.dsk,$(PROGS)) +DISKS = $(patsubst %,%.dsk,$(TESTS)) null.dsk disks: $(DISKS) -PINTOS = ../../src/utils/pintos -%.dsk: % os.dsk - rm -f $@ fs.dsk - $(PINTOS) make-disk fs.dsk 2 - $(PINTOS) -v run -f -q - $(PINTOS) -v put $< - mv fs.dsk $@ +null.o: null.S +null: null.o + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ +null.dsk: null + +exec-once.dsk exec-multiple.dsk wait-simple.dsk wait-twice.dsk: child-simple +exec-arg.dsk: child-arg +wait-killed.dsk: child-bad +multi-child-fd.dsk: child-close -os.dsk: ../../src/userprog/build/os.dsk - ln -sf $< $@ +%.dsk: % + ./prep-disk $< clean:: rm -f $(DISKS) include $(SRCDIR)/Makefile.userprog + +# Use -Werror because otherwise there's so much output spew +# that it's very difficult to pick out warnings. +CFLAGS += -Werror + +Makefile: Make.base Make.tests mkmf + ./mkmf +