[coreboot-gerrit] Change in coreboot[master]: vendorcode/amd/pi/00670F00: Clean up makefile

Martin Roth (Code Review) gerrit at coreboot.org
Fri Nov 17 07:17:38 CET 2017


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/22499


Change subject: vendorcode/amd/pi/00670F00: Clean up makefile
......................................................................

vendorcode/amd/pi/00670F00: Clean up makefile

- Remove unnecessary cflags, exports, and variables
- Don't include AGESA cflags in the entire build
- Reformat build target

BUG=b:69220826
TEST=Build

Change-Id: I60cb20a3849439cb808f5d3919588853e9c8c734
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/vendorcode/amd/pi/00670F00/Makefile.inc
1 file changed, 23 insertions(+), 33 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/22499/1

diff --git a/src/vendorcode/amd/pi/00670F00/Makefile.inc b/src/vendorcode/amd/pi/00670F00/Makefile.inc
index 3fb7870..d59b553 100644
--- a/src/vendorcode/amd/pi/00670F00/Makefile.inc
+++ b/src/vendorcode/amd/pi/00670F00/Makefile.inc
@@ -33,22 +33,21 @@
 
 AGESA_ROOT = $(call strip_quotes,$(CONFIG_AGESA_BINARY_PI_VENDORCODE_PATH))
 
+BINARY_PI_INC  = -I$(AGESA_ROOT)
+BINARY_PI_INC += -I$(AGESA_ROOT)/binaryPI
+BINARY_PI_INC += -I$(AGESA_ROOT)/Include
+BINARY_PI_INC += -I$(AGESA_ROOT)/Lib
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc/Common
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc/CPU
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc/CPU/Family
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc/Fch
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc/Fch/Common
+BINARY_PI_INC += -I$(AGESA_ROOT)/Proc/Psp/PspBaseLib
+
+
 AGESA_INC = -I$(obj)
-
-AGESA_INC += -I$(src)/mainboard/$(MAINBOARDDIR)
-AGESA_INC += -I$(AGESA_ROOT)/binaryPI
-AGESA_INC += -I$(AGESA_ROOT)
-AGESA_INC += -I$(AGESA_ROOT)/Include
-AGESA_INC += -I$(src)/vendorcode/amd/pi
-AGESA_INC += -I$(AGESA_ROOT)/Lib
-
-AGESA_INC += -I$(AGESA_ROOT)/Proc
-AGESA_INC += -I$(AGESA_ROOT)/Proc/Common
-AGESA_INC += -I$(AGESA_ROOT)/Proc/CPU
-AGESA_INC += -I$(AGESA_ROOT)/Proc/CPU/Family
-AGESA_INC += -I$(AGESA_ROOT)/Proc/Fch
-AGESA_INC += -I$(AGESA_ROOT)/Proc/Fch/Common
-AGESA_INC += -I$(AGESA_ROOT)/Proc/Psp/PspBaseLib
+AGESA_INC += $(BINARY_PI_INC)
 
 AGESA_INC += -I$(src)/soc/amd/stoneyridge/include
 AGESA_INC += -I$(src)/soc/amd/common
@@ -58,22 +57,12 @@
 AGESA_INC += -I$(src)/commonlib/include
 AGESA_INC += -I$(VBOOT_SOURCE)/firmware/include
 
-AGESA_CFLAGS += -march=amdfam10 -mno-3dnow -fno-zero-initialized-in-bss
-AGESA_CFLAGS += -fno-strict-aliasing -D__LIBAGESA__
-CFLAGS_x86_32 += $(AGESA_CFLAGS)
-CFLAGS_x86_64 += $(AGESA_CFLAGS)
+AGESA_CFLAGS += -march=amdfam10 -fno-strict-aliasing -D__LIBAGESA__
 
-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_bootblock := $(CC_bootblock) $(BINARY_PI_INC)
+CC_romstage := $(CC_romstage) $(BINARY_PI_INC)
 CC_postcar:= $(CC_postcar) -I$(AGESA_ROOT)/binaryPI
-CC_ramstage := $(CC_ramstage) $(AGESA_INC) $(AGESA_CFLAGS)
-
-CC_x86_32 := $(CC_x86_32) $(AGESA_INC) $(AGESA_CFLAGS)
-CC_x86_64 := $(CC_x86_64) $(AGESA_INC) $(AGESA_CFLAGS)
+CC_ramstage := $(CC_ramstage) $(BINARY_PI_INC)
 
 #######################################################################
 
@@ -88,10 +77,11 @@
 
 $(call src-to-obj,libagesa,$1): $(agesa_src_path)/$(notdir $1) $(obj)/config.h $(src)/include/kconfig.h
 	@printf "    CC         $$(subst $(obj)/,,$$(@))\n"
-	$(CC_libagesa) -c -MMD $(CFLAGS_libagesa) $(AGESA_CFLAGS)                 \
-	               $(AGESA_INC)                                               \
-	               -include $(src)/include/rules.h -include $(src)/include/kconfig.h \
-	               -o $$@                                                     \
+	$(CC_libagesa) -c -MMD $(CFLAGS_libagesa) $(AGESA_CFLAGS)             \
+	               $(AGESA_INC)                                           \
+	               -include $(src)/include/rules.h                        \
+	               -include $(src)/include/kconfig.h                      \
+	               -o $$@                                                 \
 	               $(agesa_src_path)/$(notdir $1)
 
 endef

-- 
To view, visit https://review.coreboot.org/22499
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I60cb20a3849439cb808f5d3919588853e9c8c734
Gerrit-Change-Number: 22499
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171117/5900117a/attachment.html>


More information about the coreboot-gerrit mailing list