aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-12-11 21:43:05 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-12-11 21:43:05 -0500
commit3ffa8cc090cd0277db25819b6f00864eaf113f26 (patch)
tree3ccfcc2c52cf341749a913f24d31fc27a70838ec /Makefile
parentf9c307260ee5b1603f3c35cb7c9b4ec711256a0c (diff)
downloadseabios-hppa-3ffa8cc090cd0277db25819b6f00864eaf113f26.zip
seabios-hppa-3ffa8cc090cd0277db25819b6f00864eaf113f26.tar.gz
seabios-hppa-3ffa8cc090cd0277db25819b6f00864eaf113f26.tar.bz2
Don't recursively evaluate CFLAGS variables.
The $(cc-option) macro was being executed multiple times for each compiler invocation. That's a waste of time. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 8e32670..fa30bb3 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ SRC32SEG=util.c output.c pci.c pcibios.c apm.c stacks.c
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
; then echo "$(2)"; else echo "$(3)"; fi ;)
-COMMONCFLAGS = -I$(OUT) -Os -MD -g \
+COMMONCFLAGS := -I$(OUT) -Os -MD -g \
-Wall -Wno-strict-aliasing -Wold-style-definition \
$(call cc-option,$(CC),-Wtype-limits,) \
-m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \
@@ -36,14 +36,14 @@ COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
-CFLAGS32FLAT = $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0 -fomit-frame-pointer
-CFLAGSSEG = $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \
+CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0 -fomit-frame-pointer
+CFLAGSSEG := $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \
$(call cc-option,$(CC),-fno-jump-tables,-DMANUAL_NO_JUMP_TABLE) \
$(call cc-option,$(CC),-fno-tree-switch-conversion,)
-CFLAGS32SEG = $(CFLAGSSEG) -DMODE16=0 -fomit-frame-pointer
-CFLAGS16INC = $(CFLAGSSEG) -DMODE16=1 -Wa,src/code16gcc.s \
+CFLAGS32SEG := $(CFLAGSSEG) -DMODE16=0 -fomit-frame-pointer
+CFLAGS16INC := $(CFLAGSSEG) -DMODE16=1 -Wa,src/code16gcc.s \
$(call cc-option,$(CC),--param large-stack-frame=4,-fno-inline)
-CFLAGS16 = $(CFLAGS16INC) -fomit-frame-pointer
+CFLAGS16 := $(CFLAGS16INC) -fomit-frame-pointer
# Run with "make V=1" to see the actual compile commands
ifdef V