Description: Make sure CFLAGS and CPPFLAGS are respected in build
Author: Andreas Bombe <aeb@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # all of these can be over-ridden on the "make" command line if they don't suit your environment.
 
-CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow
-BIN=/usr/local/bin
+CFLAGS := -O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow $(CFLAGS)
+BIN=$(DESTDIR)/usr/bin
 INSTALL=install
 CC=gcc
 
--- a/extracters/rstsflx/Makefile
+++ b/extracters/rstsflx/Makefile
@@ -55,18 +55,18 @@
 #	coff2exe -s /djgpp/bin/go32.exe flx
 
 flx: $(OBJS)
-	$(CC) $(LDFLAGS) -o flx $(OBJS) $(EXTRAOBJS) -lreadline -lncurses $(EXTRAFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o flx $(OBJS) $(EXTRAOBJS) -lreadline -lncurses $(EXTRAFLAGS)
 
 # *** the rule below builds absio.o.  You need to use as source file
 # *** an appropriate file; in Unix that's probably unxabsio.c but check
 # *** the source file to be sure.
 
 absio.o: unxabsio.c
-	$(CC) -c -o absio.o $(CFLAGS) $<
+	$(CC) -c -o absio.o $(CPPFLAGS) $(CFLAGS) $<
 
 # general build rule for all other object files:
 .c.o:
-	$(CC) -c $(CFLAGS) $<
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
 
 kit:
 	rm -f *~
