summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-12-22 12:51:53 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-05 11:35:59 +0900
commit59de50963cc49f6aa003bd10f5a20f766186c02a (patch)
treee438f41a3413b034804fb39e15411b411a4551c3 /Makefile
parentf2e1d57e43a0688901cc5f83546c66079fce5451 (diff)
Build: use CPP just for pre-processing
Using AS for pre-processing looks a bit weird, and some assembly specific options are given for nothing. Rather, use CPP. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 8 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index bb46afcb..adfdba6c 100644
--- a/Makefile
+++ b/Makefile
@@ -143,16 +143,14 @@ TF_CFLAGS_aarch64 = -mgeneral-regs-only -mstrict-align
ASFLAGS_aarch32 = -march=armv8-a
TF_CFLAGS_aarch32 = -march=armv8-a
-ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
- -Werror -Wmissing-include-dirs \
- -D__ASSEMBLY__ $(ASFLAGS_$(ARCH)) \
- ${DEFINES} ${INCLUDES}
-TF_CFLAGS += -nostdinc -ffreestanding -Wall \
- -Werror -Wmissing-include-dirs \
- -std=c99 -Os \
- $(TF_CFLAGS_$(ARCH)) \
- ${DEFINES} ${INCLUDES}
-TF_CFLAGS += -ffunction-sections -fdata-sections
+CPPFLAGS = ${DEFINES} ${INCLUDES} -nostdinc \
+ -Wmissing-include-dirs -Werror
+ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \
+ -D__ASSEMBLY__ -ffreestanding \
+ -Wa,--fatal-warnings
+TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
+ -ffreestanding -Wall -std=c99 -Os \
+ -ffunction-sections -fdata-sections
LDFLAGS += --fatal-warnings -O1
LDFLAGS += --gc-sections