From ce3467cf3112bb05c3e888036019a20db1b6ef9f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 26 Sep 2004 19:22:59 +0000 Subject: [PATCH] Comments. --- src/tests/userprog/Makefile | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/tests/userprog/Makefile b/src/tests/userprog/Makefile index eac2f2d..290ed7d 100644 --- a/src/tests/userprog/Makefile +++ b/src/tests/userprog/Makefile @@ -2,6 +2,26 @@ include ../../Make.config SHELL = /bin/sh +VPATH = ../.. + +DEFINES = -DUSER +CPPFLAGS = -nostdinc -I../.. -I- -I../../lib -I../../lib/user \ + -include constants.h + +# Test programs to compile, and a list of sources for each. +# To add a new test, put its name on the PROGS list +# and then add a name_SRC line that lists its source files. +PROGS = bubsort echo halt insult lineup matmult recursor shell +bubsort_SRC = bubsort.c +echo_SRC = echo.c +halt_SRC = halt.c +insult_SRC = insult.c +lineup_SRC = lineup.c +matmult_SRC = matmult.c +recursor_SRC = recursor.c +shell_SRC = shell.c + +# Linker flags. LDFLAGS = -nostdlib -static LDLIBS = $(shell $(CC) -print-libgcc-file-name) @@ -9,12 +29,6 @@ LDLIBS = $(shell $(CC) -print-libgcc-file-name) # testing purposes only. #LDFLAGS += -Wl,-T,fullpage.x -VPATH = ../.. - -DEFINES = -DUSER -CPPFLAGS = -nostdinc -I../.. -I- -I../../lib -I../../lib/user \ - -include constants.h - # C library sources linked into every test program. LIB_SRC = lib/debug.c # Debug code. LIB_SRC += lib/random.c # Pseudo-random numbers. @@ -29,16 +43,6 @@ LIB_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(LIB_SRC))) LIB_DEP = $(patsubst %.o,%.d,$(LIB_OBJ)) LIB = libc.a lib/user/entry.o -PROGS = bubsort echo halt insult lineup matmult recursor shell -bubsort_SRC = bubsort.c -echo_SRC = echo.c -halt_SRC = halt.c -insult_SRC = insult.c -lineup_SRC = lineup.c -matmult_SRC = matmult.c -recursor_SRC = recursor.c -shell_SRC = shell.c - PROGS_SRC = $(foreach prog,$(PROGS),$($(prog)_SRC)) PROGS_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(PROGS_SRC))) PROGS_DEP = $(patsubst %.o,%.d,$(PROGS_OBJ)) -- 2.30.2