projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make page alignment optional.
[pintos-anon]
/
src
/
tests
/
userprog
/
Makefile
diff --git
a/src/tests/userprog/Makefile
b/src/tests/userprog/Makefile
index 9af275f5b27c3afb8e3da85c738ffb6b512b457c..c5e4855268431e6b01023c6af6b0cdbeca5f32bc 100644
(file)
--- a/
src/tests/userprog/Makefile
+++ b/
src/tests/userprog/Makefile
@@
-2,9
+2,13
@@
include ../../Make.config
SHELL = /bin/sh
SHELL = /bin/sh
-LDFLAGS = -nostdlib -static
-Wl,-T,elf.x
+LDFLAGS = -nostdlib -static
LDLIBS = $(shell $(CC) -print-libgcc-file-name)
LDLIBS = $(shell $(CC) -print-libgcc-file-name)
+# Uncomment the line below to round up segment sizes to full pages for
+# testing purposes only.
+LDFLAGS += -Wl,-T,fullpage.x
+
VPATH = ../..
DEFINES = -DUSER
VPATH = ../..
DEFINES = -DUSER
@@
-42,9
+46,12
@@
all: $(PROGS)
define TEMPLATE
$(1)_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$($(1)_SRC)))
define TEMPLATE
$(1)_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$($(1)_SRC)))
-$(1): $$($(1)_OBJ) $$(LIB)
+$(1): $$($(1)_OBJ) $$(LIB)
| ./lib/user
endef
endef
+./lib/user:
+ $(MKDIR) -p lib/user
+
$(foreach prog,$(PROGS),$(eval $(call TEMPLATE,$(prog))))
$(PROGS): $(LIB)
$(foreach prog,$(PROGS),$(eval $(call TEMPLATE,$(prog))))
$(PROGS): $(LIB)