summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-05-17 14:00:12 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-05-17 21:14:29 +0200
commit58f73a69cd83c46604795d728f296779c1de162c (patch)
tree742e007e50dc825988281e8c6b52da902a1f38bf /Makefile.inc
parent98f49d28233f68aeb9dfccc6d7e633ae35449e00 (diff)
downloadcoreboot-58f73a69cd83c46604795d728f296779c1de162c.tar.xz
build: separate CPPFLAGS from CFLAGS
There are a couple of places where CPPFLAGS are pasted into CFLAGS, eliminate them. Change-Id: Ic7f568cf87a7d9c5c52e2942032a867161036bd7 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/5765 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/Makefile.inc b/Makefile.inc
index d76fab9cbd..9e4c6b0f64 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -152,7 +152,7 @@ $(obj)/$(1).ramstage.o: src/$(1).asl $(obj)/config.h
$(CC_ramstage) -x assembler-with-cpp -E -MMD -MT $$(@) -D__ACPI__ -P -include $(src)/include/kconfig.h -I$(obj) -I$(src) -I$(src)/include -I$(src)/arch/$(ARCHDIR-$(ARCH-RAMSTAGE-y))/include -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
cd $$(dir $$@); $(IASL) -p $$(notdir $$@) -tc $$(notdir $$(basename $$@)).asl
mv $$(basename $$@).hex $$(basename $$@).c
- $(CC_ramstage) $$(CFLAGS_ramstage) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c
+ $(CC_ramstage) $$(CFLAGS_ramstage) $$(CPPFLAGS_ramstage) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c
# keep %.o: %.c rule from catching the temporary .c file after a make clean
mv $$(basename $$@).c $$(basename $$@).hex
endef
@@ -214,11 +214,11 @@ ifneq ($(CONFIG_LOCALVERSION),"")
COREBOOT_EXTRA_VERSION := -$(call strip_quotes,$(CONFIG_LOCALVERSION))
endif
-CPPFLAGS := -Isrc -Isrc/include -I$(obj)
-CPPFLAGS += -Isrc/device/oprom/include
-CPPFLAGS += -include $(src)/include/kconfig.h
+CPPFLAGS_common := -Isrc -Isrc/include -I$(obj)
+CPPFLAGS_common += -Isrc/device/oprom/include
+CPPFLAGS_common += -include $(src)/include/kconfig.h
-CFLAGS_common = $(CPPFLAGS) -Os -pipe -g -nostdinc
+CFLAGS_common = -Os -pipe -g -nostdinc
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
CFLAGS_common += -Wstrict-aliasing -Wshadow
@@ -314,15 +314,15 @@ $(objutil)/%.o: $(objutil)/%.c
$(obj)/%.ramstage.o $(abspath $(obj))/%.ramstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
@printf " CC $(subst $(obj)/,,$(@))\n"
- $(CC_ramstage) -MMD $(CFLAGS_ramstage) -c -o $@ $<
+ $(CC_ramstage) -MMD $(CFLAGS_ramstage) $(CPPFLAGS_ramstage) -c -o $@ $<
$(obj)/%.romstage.o $(abspath $(obj))/%.romstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
@printf " CC $(subst $(obj)/,,$(@))\n"
- $(CC_romstage) -MMD -D__PRE_RAM__ $(CFLAGS_romstage) -c -o $@ $<
+ $(CC_romstage) -MMD -D__PRE_RAM__ $(CFLAGS_romstage) $(CPPFLAGS_romstage) -c -o $@ $<
$(obj)/%.bootblock.o $(abspath $(obj))/%.bootblock.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
@printf " CC $(subst $(obj)/,,$(@))\n"
- $(CC_bootblock) -MMD $(bootblock-c-ccopts) $(CFLAGS_bootblock) -c -o $@ $<
+ $(CC_bootblock) -MMD $(bootblock-c-ccopts) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -c -o $@ $<
#######################################################################
# Clean up rules