diff --git a/Makefile b/Makefile index 159d9797ee..5e58cedde5 100644 --- a/Makefile +++ b/Makefile @@ -179,6 +179,7 @@ $(obj)/config.h: $(MAKE) oldconfig # Dependencies that should be built before all files in all classes +# Careful: interpreted as order-only prerequisites, use only for header files! generic-deps = $(obj)/config.h # Every file can append to this string. It is simply eval'ed after the scan. @@ -256,7 +257,7 @@ define create_cc_template # $4 additional dependencies ifn$(EMPTY)def $(1)-objs_$(2)_template de$(EMPTY)fine $(1)-objs_$(2)_template -$$(call src-to-obj,$1,$$(1)): $$(1) $$$$(generic-deps) $(4) +$$(call src-to-obj,$1,$$(1)): $$(1) $(4) | $$$$(generic-deps) @printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" $(CC_$(1)) -MMD $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$< en$(EMPTY)def diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index df6b3081d7..4436feb53b 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -114,7 +114,7 @@ bootblock_romccflags = -mcpu=i386 endif bootblock_romccflags += -O2 $(bootblock-c-ccopts) $(bootblock-generic-ccopts) -$(objgenerated)/bootblock.inc: $(src)/arch/x86/init/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $$(generic-deps) +$(objgenerated)/bootblock.inc: $(src)/arch/x86/init/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc | $$(generic-deps) @printf " ROMCC $(subst $(obj)/,,$(@))\n" $(CC_bootblock) $(INCLUDES) $(INCLUDES_bootblock) -MM -MT$(objgenerated)/bootblock.inc \ $< > $(objgenerated)/bootblock.inc.d @@ -191,12 +191,12 @@ $(objcbfs)/romstage_%.elf: $(objcbfs)/romstage_%.debug $(OBJCOPY_romstage) --add-gnu-debuglink=$< $@.tmp mv $@.tmp $@ -$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(objutil)/romcc/romcc $$(generic-deps) +$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(objutil)/romcc/romcc | $$(generic-deps) printf " ROMCC romstage.inc\n" $(ROMCC) -c -S $(ROMCCFLAGS) -I. $(INCLUDES) $(INCLUDES_romstage) $< -o $@ else # CONFIG_ROMCC -$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $$(generic-deps) +$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c | $$(generic-deps) @printf " CC romstage.inc\n" $(CC_romstage) -MMD $(CFLAGS_romstage) $(romstage-c-ccopts) $(romstage-generic-ccopts) -I$(src) -I. -I$(obj) -c -S $< -o $@ diff --git a/src/arch/x86/boot/Makefile.inc b/src/arch/x86/boot/Makefile.inc index 7ad20c5573..c4e8786248 100644 --- a/src/arch/x86/boot/Makefile.inc +++ b/src/arch/x86/boot/Makefile.inc @@ -12,7 +12,4 @@ ramstage-$(CONFIG_GENERATE_SMBIOS_TABLES) += smbios.c ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += acpigen.c ramstage-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.S -$(obj)/arch/x86/boot/coreboot_table.ramstage.o : $(OPTION_TABLE_H) -$(obj)/arch/x86/boot/smbios.ramstage.o: $(obj)/build.h - endif diff --git a/src/arch/x86/lib/Makefile.inc b/src/arch/x86/lib/Makefile.inc index fe1b379b9c..275be00dbf 100644 --- a/src/arch/x86/lib/Makefile.inc +++ b/src/arch/x86/lib/Makefile.inc @@ -36,6 +36,4 @@ rmodules_x86_32-y += memset.c rmodules_x86_32-y += memcpy.c rmodules_x86_32-y += memmove.c -$(obj)/arch/x86/lib/console.ramstage.o :: $(obj)/build.h - -endif \ No newline at end of file +endif diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc index acc72a1138..d5545e9f58 100644 --- a/src/vendorcode/google/chromeos/Makefile.inc +++ b/src/vendorcode/google/chromeos/Makefile.inc @@ -131,7 +131,7 @@ VBOOT_CFLAGS += $(verstage-c-ccopts) VBOOT_CFLAGS += -include $(top)/src/include/kconfig.h -Wno-missing-prototypes VBOOT_CFLAGS += -DVBOOT_DEBUG -$(VB2_LIB): $$(generic-deps) +$(VB2_LIB): | $$(generic-deps) @printf " MAKE $(subst $(obj)/,,$(@))\n" $(Q)FIRMWARE_ARCH=$(VB_FIRMWARE_ARCH) \ CC="$(CC_verstage)" \