1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: Add Hardening changes to Makefile
* Add Hardening changes to Makefile
Author: Cord Beermann <cord@debian.org>
Index: passwordmaker-cli-1.5+dfsg/unix.mak
===================================================================
--- passwordmaker-cli-1.5+dfsg.orig/unix.mak
+++ passwordmaker-cli-1.5+dfsg/unix.mak
@@ -29,6 +29,10 @@ LINK = $(CXX)
DEFINES = -DUSE_MHASH -DTIXML_USE_STL
CFLAGS = -O2 -Wall $(DEFINES)
CXXFLAGS = -O2 -frtti -fexceptions -Wall $(DEFINES)
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS += $(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
INCPATH = -I.
LIBS = -lmhash -lpcrecpp
@@ -44,21 +48,21 @@ OBJECTS = $(SOURCE:.cpp=.o)
TARGET = passwordmaker
$(TARGET): $(OBJECTS)
- $(LINK) -o "$(TARGET)" $(OBJECTS) $(LIBS)
+ $(LINK) -o "$(TARGET)" $(OBJECTS) $(LIBS) $(LDFLAGS)
.SUFFIXES: .c .cpp .cc .cxx
.cpp.o:
- $(CXX) -g -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+ $(CXX) -g -c $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) -o $@ $<
.cc.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) -o $@ $<
.c.o:
- $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCPATH) -o $@ $<
include unix/depends
|