diff options
author | Bruce Griffith <Bruce.Griffith@se-eng.com> | 2014-09-25 16:45:45 -0600 |
---|---|---|
committer | Bruce Griffith <Bruce.Griffith@se-eng.com> | 2014-10-09 20:06:56 +0200 |
commit | 2c0f46afbbee078881ad9e9a99f5c219c2ed528e (patch) | |
tree | 4361ec6bdc26b785de80a1cbcc5edc42b8b69001 | |
parent | b9a0809faeeef67e46cda17cf8f7a839c6fe614c (diff) |
AGESA stub 00730F01: Add config.h and kconfig.h to Makefile.inc
The static library builder for the stub that interfaces to the
AGESA binary does not include config.h and kconfig.h, so any
header file changes that depend on Kconfig variables fail. Force
these two system headers to be included in the build of any AGESA
stub files.
Signed-off-by: Bruce Griffith <Bruce.Griffith@se-eng.com>
Change-Id: I2e8d38fa5aa21cc31b995ee3abe68ab3c3c55a68
Reviewed-on: http://review.coreboot.org/6979
Reviewed-by: Martin Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins)
-rw-r--r-- | src/vendorcode/amd/pi/00730F01/Makefile.inc | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/src/vendorcode/amd/pi/00730F01/Makefile.inc b/src/vendorcode/amd/pi/00730F01/Makefile.inc index 2e24719e26..c1b87effe6 100644 --- a/src/vendorcode/amd/pi/00730F01/Makefile.inc +++ b/src/vendorcode/amd/pi/00730F01/Makefile.inc @@ -33,7 +33,7 @@ AGESA_ROOT = $(call strip_quotes,$(src)/../$(CONFIG_AGESA_BINARY_PI_PATH)) AGESA_INC = -I$(obj) -AGESA_INC += -Isrc/mainboard/$(MAINBOARDDIR) +AGESA_INC += -I$(src)/mainboard/$(MAINBOARDDIR) AGESA_INC += -I$(AGESA_ROOT)/binaryPI AGESA_INC += -I$(AGESA_ROOT) AGESA_INC += -I$(AGESA_ROOT)/Include @@ -49,29 +49,40 @@ AGESA_INC += -I$(AGESA_ROOT)/Proc/Fch/Common AGESA_INC += -I$(src)/southbridge/amd/agesa/hudson -AGESA_INC += -Isrc/arch/x86/include -AGESA_INC += -Isrc/include +AGESA_INC += -I$(src)/arch/x86/include +AGESA_INC += -I$(src)/include -CFLAGS_x86_32 += -march=amdfam10 -mno-3dnow -fno-zero-initialized-in-bss -fno-strict-aliasing +AGESA_CFLAGS += -march=amdfam10 -mno-3dnow -fno-zero-initialized-in-bss -fno-strict-aliasing +CFLAGS_x86_32 += $(AGESA_CFLAGS) export AGESA_ROOT := $(AGESA_ROOT) export AGESA_INC := $(AGESA_INC) export AGESA_CFLAGS := $(AGESA_CFLAGS) + CC_bootblock := $(CC_bootblock) $(AGESA_INC) $(AGESA_CFLAGS) CC_romstage := $(CC_romstage) $(AGESA_INC) $(AGESA_CFLAGS) CC_ramstage := $(CC_ramstage) $(AGESA_INC) $(AGESA_CFLAGS) CC_x86_32 := $(CC_x86_32) $(AGESA_INC) $(AGESA_CFLAGS) + ####################################################################### define create_agesa_cp_template # $1 AGESA source file # $2 AGESA copy-to location -$(agesa_obj_path)/$1: $2 - @printf " AGESA Copying $$(notdir $$(@F)) => $$(@D)\n" - cp -pf $$? $$(@D) - -libAgesa.$1: $(agesa_obj_path) $(agesa_obj_path)/$1 +$(agesa_src_path)/$(notdir $2): $2 $(agesa_src_path) + @printf " AGESA Copying $$(notdir $2) => $$(@D)\n" + if [ ! -r $(agesa_src_path)/$(notdir $2) ]; then \ + cp -uf $2 $$(@D); \ + fi + +$(agesa_obj_path)/$1.libagesa.o: $(agesa_src_path)/$(notdir $2) $(obj)/config.h $(src)/include/kconfig.h $(agesa_obj_path) + @printf " CC $(subst $(agesa_obj_path)/,,$$(@))\n" + $(CC_libagesa) -c -MMD $(CFLAGS_libagesa) $(AGESA_CFLAGS) \ + $(AGESA_INC) \ + -include $(obj)/config.h -include $(src)/include/kconfig.h \ + -o $$@ \ + $(agesa_src_path)/$(notdir $2) endef @@ -82,18 +93,18 @@ classes-$(CONFIG_CPU_AMD_AGESA_BINARY_PI) += libagesa $(eval $(call create_class_compiler,libagesa,x86_32)) agesa_src_files := $(strip $(sort $(foreach file,$(strip $(agesa_raw_files)),$(call strip_quotes,$(file))))) -agesa_obj_path := $(strip $(obj)/agesa) +agesa_obj_path := $(strip $(obj)/vendorcode/amd) +agesa_src_path := $(strip $(obj)/agesa) agesa_src_copies := $(strip $(foreach file,$(agesa_src_files),$(agesa_obj_path)/$(notdir $(file)))) agesa_obj_copies := $(strip $(agesa_src_copies:.c=.libagesa.o)) -$(agesa_obj_path): - mkdir $@ +$(agesa_src_path): + mkdir -p $@ -$(foreach file,$(strip $(agesa_src_files)),$(eval $(call create_agesa_cp_template,$(notdir $(file)),$(file)))) +$(agesa_obj_path): + mkdir -p $@ -$(agesa_obj_path)/%.libagesa.o: libAgesa.%.c - @printf " CC $(subst $(agesa_obj_path)/,,$(@))\n" - $(CC_libagesa) -MMD $(CFLAGS_libagesa) $(AGESA_INC) -c -o $@ $(agesa_obj_path)/$*.c +$(foreach file,$(strip $(agesa_src_files)),$(eval $(call create_agesa_cp_template,$(basename $(notdir $(file))),$(file)))) $(obj)/agesa/libagesa.00730F01.a: $(agesa_obj_copies) @printf " AGESA $(subst $(agesa_obj_path)/,,$(@))\n" |