summaryrefslogtreecommitdiff
path: root/src/arch/i386/Makefile.bootblock.inc
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-03-24 15:51:48 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-24 15:51:48 +0000
commit6bee951c302686fd3598859f9116a4bf36252673 (patch)
treea4b0218493bdd119399ade8009d8120f62e4fa8f /src/arch/i386/Makefile.bootblock.inc
parent9db39d3b43b56ba16e05e4434518092bf31e99f4 (diff)
downloadcoreboot-6bee951c302686fd3598859f9116a4bf36252673.tar.xz
dependency tracking for coreboot
Obviously compile time increases slightly because more work has to be done, but I'm sure the benefit of having to rm -rf build less often is worth it :-) Other small changes: * be a bit more verbose on some of the created files * move -O2 from compiler rule into bootblock_romccflags * drop rule needed for util/*.c -> build/*.o as x86emu no longer lives in util. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5280 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/Makefile.bootblock.inc')
-rw-r--r--src/arch/i386/Makefile.bootblock.inc16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/arch/i386/Makefile.bootblock.inc b/src/arch/i386/Makefile.bootblock.inc
index a7cbc6c9cf..61ba4f3f98 100644
--- a/src/arch/i386/Makefile.bootblock.inc
+++ b/src/arch/i386/Makefile.bootblock.inc
@@ -44,27 +44,34 @@ endif
bootblock_inc += $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc
bootblock_inc += $(src)/arch/i386/lib/walkcbfs.S
-bootblock_romccflags := -mcpu=i386
+bootblock_romccflags := -mcpu=i386 -O2
ifeq ($(CONFIG_SSE),y)
-bootblock_romccflags := -mcpu=k7 -msse
+bootblock_romccflags := -mcpu=k7 -msse -O2
endif
$(obj)/bootblock/ldscript.ld: $(bootblock_ldscripts) $(obj)/ldoptions
+ @printf " GEN $(subst $(obj)/,,$(@))\n"
mkdir -p $(obj)/bootblock
printf '$(foreach ldscript,ldoptions $(bootblock_lds),INCLUDE "$(ldscript)"\n)' > $@
$(obj)/bootblock/bootblock.c: $(bootblock_inc)
+ @printf " GEN $(subst $(obj)/,,$(@))\n"
mkdir -p $(obj)/bootblock
printf '$(foreach crt0,config.h $(bootblock_inc),#include "$(crt0)"\n)' > $@
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s
+ @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.c
+ @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -I$(obj)/bootblock -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/i386/init/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(obj)/romcc
- $(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES) $< -o $@
+ @printf " ROMCC $(subst $(obj)/,,$(@)) $(<)\n"
+ $(CC) -MM -MT$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc \
+ $< > $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc.d
+ $(obj)/romcc $(bootblock_romccflags) $(ROMCCFLAGS) $(INCLUDES) $< -o $@
$(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootblock/ldscript.ld
@printf " LINK $(subst $(obj)/,,$(@))\n"
@@ -87,6 +94,7 @@ $(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $(initobjs) $(obj)/romstage/ldscr
$(OBJCOPY) -O binary $(obj)/romstage.elf $@
$(obj)/romstage/ldscript.ld: $(ldscripts) $(obj)/ldoptions
+ @printf " GEN $(subst $(obj)/,,$(@))\n"
mkdir -p $(obj)/romstage
printf '$(foreach ldscript,ldoptions location.ld $(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' > $@
@@ -96,9 +104,11 @@ $(obj)/romstage/crt0_includes.h: $(crt0s)
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
+ @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/romstage/crt0_includes.h
+ @printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
endif