make: rename CFLAGS in target Makefiles to TGT_CFLAGS

Renamed every instance of variable CFLAGS in target specific Makefiles
to TGT_CFLAGS to free up CFLAGS for user defined compiler flags.

Added information in README.md about existence and usage of CFLAGS
environment variable in build process.
This commit is contained in:
Tido Klaassen
2015-10-06 08:04:14 +02:00
committed by Karl Palsson
parent 9217a5f888
commit aad8d06c3f
25 changed files with 59 additions and 47 deletions

View File

@@ -26,10 +26,10 @@ PREFIX ?= arm-none-eabi
#PREFIX ?= arm-elf
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -O2 -Wall -Wextra -I../../../include -fno-common \
TGT_CFLAGS = -O2 -Wall -Wextra -I../../../include -fno-common \
-mcpu=cortex-m0 -mthumb -Wstrict-prototypes \
-ffunction-sections -fdata-sections -MD -DLPC43XX -DLPC43XX_M0
CFLAGS += $(DEBUG_FLAGS)
TGT_CFLAGS += $(DEBUG_FLAGS)
# ARFLAGS = rcsv
ARFLAGS = rcs

View File

@@ -28,7 +28,7 @@ PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -O2 \
TGT_CFLAGS = -O2 \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \
-Wundef -Wshadow \
@@ -36,7 +36,7 @@ CFLAGS = -O2 \
-mcpu=cortex-m4 -mthumb -Wstrict-prototypes \
-ffunction-sections -fdata-sections -MD \
$(FP_FLAGS) -DLPC43XX -DLPC43XX_M4
CFLAGS += $(DEBUG_FLAGS)
TGT_CFLAGS += $(DEBUG_FLAGS)
ARFLAGS = rcs