Enable hardening flags harder.
[disorder] / debian / rules
index ea9a54c..d539af7 100755 (executable)
@@ -20,17 +20,15 @@ cgiexecdir=/usr/lib/cgi-bin
 httpdir=/var/www
 browser=x-www-browser
 
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+export CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
 # Options to configure.  This can be overridden by the caller if necessary.
 CONFIGURE=--prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --mandir=/usr/share/man --with-browser=${browser} cgiexecdir="${cgiexecdir}" httpdir="${httpdir}"
 
-# Set DEB_BUILD_OPTIONS=noopt to produce a non-optimized build.
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-CFLAGS=-O0 -g
-else
-CFLAGS=-O2 -g
-endif
-export CFLAGS
-
 # Install commands.  You wouldn't normally override these.
 INSTALL=install
 INSTALL_DATA=$(INSTALL) -p -o root -g root -m 644