summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@google.com>2011-01-27 18:39:01 -0800
committerKevin O'Connor <kevin@koconnor.net>2011-01-29 09:45:57 -0500
commit32aa9f362b2265279daafcba26bc574324479c93 (patch)
tree9b81c3f6721348e9dacfef08201fe692e6f97100
parent713be89d5c60ea1e41a64c123a735ab9dc0dae99 (diff)
fix parallel compilation of SeaBIOS
See patch. Signed-off-by: Stefan Reinauer <reinauer@google.com>
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3f89caf..dfcccef 100644
--- a/Makefile
+++ b/Makefile
@@ -132,7 +132,7 @@ $(OUT)code16.o: romlayout.S $(OUT)ccode.16.s $(OUT)asm-offsets.h
@echo " Compiling (16bit) $@"
$(Q)$(CC) $(CFLAGS16INC) -c -D__ASSEMBLY__ $< -o $@
-$(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds $(OUT)code32flat.o: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)code16.o tools/layoutrom.py
+$(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)code16.o tools/layoutrom.py
@echo " Building ld scripts (version \"$(VERSION)\")"
$(Q)echo 'const char VERSION[] = "$(VERSION)";' > $(OUT)version.c
$(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o
@@ -142,6 +142,9 @@ $(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds $(OUT)c
$(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
$(Q)./tools/layoutrom.py $(OUT)code16.o.objdump $(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
+# These are actually built by tools/layoutrom.py above, but by pulling them
+# into an extra rule we prevent make -j from spawning layoutrom.py 4 times.
+$(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds $(OUT)code32flat.o: $(OUT)romlayout16.lds
$(OUT)rom16.o: $(OUT)code16.o $(OUT)romlayout16.lds
@echo " Linking $@"