Subject: add hardening flags
Description: upstream makefile does not ake env CFLAGS. Add those
 to manage hardening and fortity
Author: Olivier Sallou <osallou@debian.org>
Last-Updated: 2014-01-13
Forwarded: no
--- a/makefile
+++ b/makefile
@@ -1,5 +1,7 @@
 CC=g++
-CFLAGS = -O4 -D_FILE_OFFSET_BITS=64 # needed to handle files > 2 GB on 32 bits systems
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -O4 -D_FILE_OFFSET_BITS=64 # needed to handle files > 2 GB on 32 bits systems
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 SRC=Pool.cpp Bank.cpp Bloom.cpp Hash16.cpp LargeInt.cpp Kmer.cpp Terminator.cpp Traversal.cpp LinearCounter.cpp Set.cpp Utils.cpp SortingCount.cpp Debloom.cpp OAHash.cpp
 EXEC=minia
 OBJ= $(SRC:.cpp=.o)
@@ -60,7 +62,7 @@
 all: $(EXEC)
 
 minia: clean $(OBJ) Minia.cpp
-	$(CC) -o $@ $(OBJ) Minia.cpp $(CFLAGS) -lz
+	$(CC) -o $@ $(OBJ) Minia.cpp $(CFLAGS) $(LDFLAGS) -lz
 
 %.o: %.cpp %.h
 	$(CC) -o $@ -c $< $(CFLAGS)
