- fortify/harden the compile
[ossec-hids.git] / debian / rules
index 4e01349..032ac9a 100755 (executable)
@@ -11,6 +11,15 @@ DESTDIR = $(PKGDIR)/var/ossec
 # OSSEC INSTALL SUBDIRS
 SUBDIRS = .ssh active-response active-response/bin agentless bin etc etc/shared logs logs/alerts logs/archives logs/firewall queue queue/agent-info queue/agentless queue/alerts queue/diff queue/fts queue/ossec queue/rids queue/rootcheck queue/syscheck rules stats tmp var var/run
 
+###################### hardening #################
+
+include /usr/share/hardening-includes/hardening.make
+
+CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
+CFLAGS+=$(HARDENING_CFLAGS)
+LDFLAGS+=$(HARDENING_LDFLAGS)
+
 ###################### main ######################
 
 build: build-stamp
@@ -22,6 +31,9 @@ build-stamp:
 
        touch build-stamp
 
+build-arch: build
+build-indep: build
+
 clean:
        dh_testdir
        dh_testroot
@@ -136,6 +148,7 @@ binary-arch: build install
 #      dh_installcron
 #      dh_installinfo
 #      dh_undocumented
+       dh_lintian
        dh_installman
        dh_link
        dh_compress