This patch fixes build.h dependencies in coreboot again.

-include was dropped, the files in question do an #include <build.h> already.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5310 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2010-03-29 13:04:13 +00:00 committed by Stefan Reinauer
parent e0d607a4c5
commit e9f3258e0b
6 changed files with 14 additions and 15 deletions

View File

@ -136,7 +136,7 @@ all:
chmod +x .ccwrap chmod +x .ccwrap
scan-build $(CONFIG_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y scan-build $(CONFIG_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y
else else
all: $(obj)/config.h $(obj)/build.h coreboot all: $(obj)/config.h coreboot
endif endif
# must come rather early # must come rather early
@ -222,7 +222,7 @@ define create_cc_template
# $3 .o infix ("" ".initobj", ...) # $3 .o infix ("" ".initobj", ...)
# $4 additional compiler flags # $4 additional compiler flags
de$(EMPTY)fine $(1)_$(2)_template de$(EMPTY)fine $(1)_$(2)_template
$(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) | $(obj)/build.h $(obj)/config.h $(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) $(obj)/config.h
printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
$(CC) $(4) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$< $(CC) $(4) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$<
en$(EMPTY)def en$(EMPTY)def
@ -230,8 +230,8 @@ endef
$(eval $(call create_cc_template,objs,c)) $(eval $(call create_cc_template,objs,c))
$(eval $(call create_cc_template,objs,S,,-DASSEMBLY)) $(eval $(call create_cc_template,objs,S,,-DASSEMBLY))
$(eval $(call create_cc_template,initobjs,c,.initobj)) $(eval $(call create_cc_template,initobjs,c,.initobj,-D__PRE_RAM__))
$(eval $(call create_cc_template,initobjs,S,.initobj,-DASSEMBLY)) $(eval $(call create_cc_template,initobjs,S,.initobj,-DASSEMBLY -D__PRE_RAM__))
$(eval $(call create_cc_template,drivers,c,.driver)) $(eval $(call create_cc_template,drivers,c,.driver))
$(eval $(call create_cc_template,drivers,S,.driver,-DASSEMBLY)) $(eval $(call create_cc_template,drivers,S,.driver,-DASSEMBLY))
$(eval $(call create_cc_template,smmobjs,c,.smmobj)) $(eval $(call create_cc_template,smmobjs,c,.smmobj))
@ -269,7 +269,7 @@ OBJS := $(patsubst %,$(obj)/%,$(TARGETS-y))
INCLUDES := -Isrc -Isrc/include -I$(obj) -Isrc/arch/$(ARCHDIR-y)/include INCLUDES := -Isrc -Isrc/include -I$(obj) -Isrc/arch/$(ARCHDIR-y)/include
INCLUDES += -Isrc/devices/oprom/include INCLUDES += -Isrc/devices/oprom/include
# abspath is a workaround for romcc # abspath is a workaround for romcc
INCLUDES += -include $(abspath $(obj)/config.h) -include $(abspath $(obj)/build.h) INCLUDES += -include $(abspath $(obj)/config.h)
CFLAGS = $(INCLUDES) -Os -nostdinc -pipe CFLAGS = $(INCLUDES) -Os -nostdinc -pipe
CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
@ -295,7 +295,7 @@ prepare:
mkdir -p $(obj)/util/kconfig/lxdialog $(obj)/util/cbfstool mkdir -p $(obj)/util/kconfig/lxdialog $(obj)/util/cbfstool
test -n "$(alldirs)" && mkdir -p $(alldirs) || true test -n "$(alldirs)" && mkdir -p $(alldirs) || true
$(obj)/build.h $(abspath $(obj)/build.h): .xcompile $(obj)/build.h: .xcompile
@printf " GEN build.h\n" @printf " GEN build.h\n"
rm -f $(obj)/build.h rm -f $(obj)/build.h
printf "/* build system definitions (autogenerated) */\n" > $(obj)/build.ht printf "/* build system definitions (autogenerated) */\n" > $(obj)/build.ht

View File

@ -42,9 +42,9 @@ endif
bootblock_inc += $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc bootblock_inc += $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc
bootblock_inc += $(src)/arch/i386/lib/walkcbfs.S bootblock_inc += $(src)/arch/i386/lib/walkcbfs.S
bootblock_romccflags := -mcpu=i386 -O2 bootblock_romccflags := -mcpu=i386 -O2 -D__PRE_RAM__
ifeq ($(CONFIG_SSE),y) ifeq ($(CONFIG_SSE),y)
bootblock_romccflags := -mcpu=k7 -msse -O2 bootblock_romccflags := -mcpu=k7 -msse -O2 -D__PRE_RAM__
endif endif
$(obj)/bootblock/ldscript.ld: $$(bootblock_lds) $(obj)/ldoptions $(obj)/bootblock/ldscript.ld: $$(bootblock_lds) $(obj)/ldoptions

View File

@ -193,8 +193,7 @@ ROMCCFLAGS ?= -mcpu=p2 -O2
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/romcc $(OPTION_TABLE_H) $(obj)/build.h $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/romcc $(OPTION_TABLE_H) $(obj)/build.h
printf " ROMCC romstage.inc\n" printf " ROMCC romstage.inc\n"
$(ROMCC) -c -S $(ROMCCFLAGS) -I. $(INCLUDES) $< -o $@ $(ROMCC) -c -S $(ROMCCFLAGS) -D__PRE_RAM__ -I. $(INCLUDES) $< -o $@
else else
$(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o: $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c $(obj)/option_table.h $(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o: $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c $(obj)/option_table.h
@ -203,7 +202,7 @@ $(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o: $(src)/mainboard/$(MAINBOARDDIR)
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h
printf " CC romstage.inc\n" printf " CC romstage.inc\n"
$(CC) -MMD $(CFLAGS) -I$(src) -I. -c -S $< -o $@ $(CC) -MMD $(CFLAGS) -D__PRE_RAM__ -I$(src) -I. -c -S $< -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc
printf " POST romstage.inc\n" printf " POST romstage.inc\n"

View File

@ -8,3 +8,5 @@ obj-y += exception.o
initobj-y += printk_init.o initobj-y += printk_init.o
initobj-y += cbfs_and_run.o initobj-y += cbfs_and_run.o
$(obj)/arch/i386/lib/console.o :: $(obj)/build.h

View File

@ -29,3 +29,5 @@ obj-$(CONFIG_COMPRESSED_PAYLOAD_LZMA) += lzma.o
obj-$(CONFIG_BOOTSPLASH) += jpeg.o obj-$(CONFIG_BOOTSPLASH) += jpeg.o
smmobj-y += memcpy.o smmobj-y += memcpy.o
$(obj)/lib/version.o :: $(obj)/build.h

View File

@ -35,7 +35,6 @@
#error COREBOOT_ASSEMBLER not defined #error COREBOOT_ASSEMBLER not defined
#endif #endif
#ifndef COREBOOT_EXTRA_VERSION #ifndef COREBOOT_EXTRA_VERSION
#define COREBOOT_EXTRA_VERSION "" #define COREBOOT_EXTRA_VERSION ""
#endif #endif
@ -55,6 +54,3 @@ const char coreboot_compiler[] = COREBOOT_COMPILER;
const char coreboot_linker[] = COREBOOT_LINKER; const char coreboot_linker[] = COREBOOT_LINKER;
const char coreboot_assembler[] = COREBOOT_ASSEMBLER; const char coreboot_assembler[] = COREBOOT_ASSEMBLER;