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

@ -1,6 +1,6 @@
# variables
DEPEND_CFLAGS += -D__MAKEDEPEND__
DEPEND_CPPFLAGS += -D__MAKEDEPEND__
DEPEND_CXXFLAGS += -D__MAKEDEPEND__
DEPEND_MK += $(addprefix .,$(addsuffix .dep.mk, $(OBJ)))
ifeq ($(DEPEND_MK_INCLUDED),)
@ -27,13 +27,13 @@ endif
%.o: .%.o.dep.mk
.%.o.dep.mk: %.cpp $(BUILD_HDR)
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
$(CC) -M $(BUILD_CXXFLAGS) $(BUILD_CPPFLAGS) $(DEPEND_CXXFLAGS) $< -o $@
.%.o.dep.mk: %.cc $(BUILD_HDR)
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
$(CC) -M $(BUILD_CXXFLAGS) $(BUILD_CPPFLAGS) $(DEPEND_CXXFLAGS) $< -o $@
.%.o.dep.mk: %.c $(BUILD_HDR)
$(CC) -M $(BUILD_CFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
$(CC) -M $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(DEPEND_CXXFLAGS) $< -o $@
show-vars: show-vars-depend-mk
show-vars-depend-mk: