From: Scott Leggett <scott@sl.id.au>
Date: Wed, 21 Aug 2013 22:05:42 +1000
Subject: Use debhelper CPPFLAGS, CFLAGS, LDFLAGS in build.

---
 Makefile  |    2 +-
 config.mk |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 63270a3..5a8463a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ $(OBJ): config.mk config.h $(HEADERS)
 
 .c.o:
 	@echo CC $<
-	@cc -c $(CFLAGS) $<
+	@cc -c $(CFLAGS) $(CPPFLAGS) $<
 
 $(TARGETS): $(OBJ)
 	@echo LD $@
diff --git a/config.mk b/config.mk
index 07f2a8f..f8d2f07 100644
--- a/config.mk
+++ b/config.mk
@@ -14,8 +14,8 @@ INCS = -I. -I/usr/include ${SDLINC}
 LIBS = -L/usr/lib -lc ${SDLLIB}
 
 # flags
-CFLAGS = -std=gnu99 -Wall -Werror ${INCS} -DVERSION=\"${VERSION}\"
-LDFLAGS = ${LIBS}
+CFLAGS += -std=gnu99 -Wall -Werror ${INCS} -DVERSION=\"${VERSION}\"
+LDFLAGS += ${LIBS}
 
 # compiler and linker
 CC = cc
