From 8edc44150dc5daae47172c963d0cc4df687eca5a Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 18 Mar 2018 20:44:31 +0100 Subject: [PATCH] Add support for "cppflags" for C++ programs --- src/makefile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/makefile.c b/src/makefile.c index 1aedf2c..bfd957c 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -1166,7 +1166,10 @@ static void _flags_cxx(Makefile * makefile, String const * target) String const * p; _makefile_print(makefile, "%s%s", target, "_CXXFLAGS = $(CPPFLAGSF)" - " $(CPPFLAGS) $(CXXFLAGSF) $(CXXFLAGS)"); + " $(CPPFLAGS)"); + if((p = _makefile_get_config(makefile, target, "cppflags")) != NULL) + _makefile_print(makefile, " %s", p); + _makefile_print(makefile, "%s", " $(CXXFLAGSF) $(CXXFLAGS)"); if((p = _makefile_get_config(makefile, target, "cxxflags")) != NULL) _makefile_print(makefile, " %s", p); _makefile_print(makefile, "\n%s%s", target,