diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-03-24 15:51:48 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-03-24 15:51:48 +0000 |
commit | 6bee951c302686fd3598859f9116a4bf36252673 (patch) | |
tree | a4b0218493bdd119399ade8009d8120f62e4fa8f /Makefile | |
parent | 9db39d3b43b56ba16e05e4434518092bf31e99f4 (diff) | |
download | coreboot-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 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -216,11 +216,7 @@ define create_cc_template de$(EMPTY)fine $(1)_$(2)_template $(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) $(obj)/config.h printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" - $(CC) $(4) $$$$(CFLAGS) -c -o $$$$@ $$$$< - -$(obj)/$$(1)%$(3).o: obj/$$(1)%.$(2) $(obj)/config.h - printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" - $(CC) $(4) $$$$(CFLAGS) -c -o $$$$@ $$$$< + $(CC) $(4) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$< en$(EMPTY)def endef @@ -245,6 +241,9 @@ $(eval $(call usetemplate,drivers,S)) $(eval $(call usetemplate,smmobjs,c)) $(eval $(call usetemplate,smmobjs,S)) +DEPENDENCIES = $(objs:.o=.d) $(initobjs:.o=.d) $(drivers:.o=.d) $(smmobjs:.o=.d) +-include $(DEPENDENCIES) + printall: @echo objs:=$(objs) @echo initobjs:=$(initobjs) @@ -252,6 +251,7 @@ printall: @echo smmobjs:=$(smmobjs) @echo alldirs:=$(alldirs) @echo allsrc=$(allsrc) + @echo DEPENDENCIES=$(DEPENDENCIES) @echo LIBGCC_FILE_NAME=$(LIBGCC_FILE_NAME) printcrt0s: @@ -316,12 +316,13 @@ doxygen-clean: clean-for-update: doxygen-clean rm -f $(objs) $(initobjs) $(drivers) $(smmobjs) .xcompile + rm -f $(DEPENDENCIES) rm -f $(obj)/coreboot_ram* $(obj)/coreboot.romstage $(obj)/coreboot.pre* $(obj)/coreboot.bootblock $(obj)/coreboot.a rm -rf $(obj)/bootblock* $(obj)/romstage* $(obj)/location.* rm -f $(obj)/option_table.* $(obj)/crt0_includes.h $(obj)/ldscript rm -f $(obj)/mainboard/$(MAINBOARDDIR)/static.c $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(obj)/mainboard/$(MAINBOARDDIR)/static.dot rm -f $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.disasm - rm -f $(obj)/mainboard/$(MAINBOARDDIR)/failover.inc $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc + rm -f $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc rm -f $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.* $(obj)/mainboard/$(MAINBOARDDIR)/dsdt.* rm -f $(obj)/cpu/x86/smm/smm_bin.c $(obj)/cpu/x86/smm/smm.* $(obj)/cpu/x86/smm/smm rmdir -p $(alldirs) 2>/dev/null >/dev/null || true |