From: Simon McVittie <smcv@debian.org>
Date: Thu, 14 Sep 2017 11:56:49 +0100
Subject: ctf: Append to CFLAGS, LDFLAGS instead of overriding

Also add CPPFLAGS.

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 ctf/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/ctf/Makefile b/ctf/Makefile
index e2a18d6..c147997 100644
--- a/ctf/Makefile
+++ b/ctf/Makefile
@@ -65,11 +65,12 @@ endif
 # -fPIC for position independend code.
 #
 # -MMD to generate header dependencies.
+CFLAGS += $(CPPFLAGS)
 ifeq ($(OSTYPE), Darwin)
-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
+CFLAGS += -O2 -fno-strict-aliasing -fomit-frame-pointer \
 		  -Wall -pipe -g -fwrapv -arch i386 -arch x86_64
 else
-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
+CFLAGS += -O2 -fno-strict-aliasing -fomit-frame-pointer \
 		  -Wall -pipe -g -MMD -fwrapv
 endif
 
@@ -93,11 +94,11 @@ endif
 
 # Base LDFLAGS.
 ifeq ($(OSTYPE), Darwin)
-LDFLAGS := -shared -arch i386 -arch x86_64 
+LDFLAGS += -shared -arch i386 -arch x86_64 
 else ifeq ($(OSTYPE), Windows)
-LDFLAGS := -shared -static-libgcc
+LDFLAGS += -shared -static-libgcc
 else
-LDFLAGS := -shared
+LDFLAGS += -shared
 endif
 
 # ----------
