make: Rename CFLAGS, CXXFLAGS and CPPFLAGS variables

Rename CFLAGS and friends to follow the conventions of the implicit rules
defined by GNU Make:

 - $(CPPFLAGS) is passed to both C++ and C compiler
 - $(CXXFLAGS) is passed to C++ compiler only
 - $(CFLAGS) is passed to C compiler only
 - C++ compiler is in $(CXX)

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-19 07:07:00 +00:00
commit 58ab619f0b
18 changed files with 71 additions and 111 deletions

View file

@ -6,7 +6,7 @@ CALLGRIND_OUT ?= callgrind.out
OPROF_OUT_DIR ?= oprofile-data
ifeq ($(USE_GPROF),true)
PROJECT_CPPFLAGS += -pg
PROJECT_CXXFLAGS += -pg
PROJECT_CFLAGS += -pg
PROJECT_LDFLAGS += -pg
clean: clean.gprof
@ -14,7 +14,7 @@ endif
ifeq ($(COMPILER_SUITE),gcc)
ifeq ($(USE_GCOV),true)
PROJECT_CPPFLAGS += -fprofile-arcs -ftest-coverage
PROJECT_CXXFLAGS += -fprofile-arcs -ftest-coverage
PROJECT_CFLAGS += -fprofile-arcs -ftest-coverage
PROJECT_LDFLAGS += -fprofile-arcs -ftest-coverage
clean: clean.gcov
@ -23,7 +23,7 @@ endif
ifeq ($(COMPILER_SUITE),clang)
ifeq ($(USE_XRAY),true)
PROJECT_CPPFLAGS += -fxray-instrument -fxray-instruction-threshold=1
PROJECT_CXXFLAGS += -fxray-instrument -fxray-instruction-threshold=1
PROJECT_CFLAGS += -fxray-instrument -fxray-instruction-threshold=1
#PROJECT_LDFLAGS += -fxray-instrument
endif