Use CFLAGS and LDFLAGS provided by dpkg-buildflags
Author: Stefan Ott <stefan@ott.net>
Last-Update: 2013-10-20
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,9 @@
 SHELL = /bin/sh
 
 CC = gcc
-CFLAGS = -g -O2
-LDFLAGS = 
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 LIBS = 
 DEFS =  
 INSTALL = /usr/bin/install -c
@@ -23,7 +24,7 @@
 .SUFFIXES: .c .o
 
 .c.o:
-	$(CC) $(DEFS) $(CFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $<
 
 all: $(PRODUCT)
 
