#!/usr/bin/make -f

#fix the lintian "hardening" message 
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -DCMAKE_INSTALL_RPATH="/usr/lib/fw4spl" -Wno-dev

override_dh_auto_install:
	dh_auto_install --destdir=debian/fw4spl
	rdfind -outputname /dev/null -makesymlinks true debian/fw4spl/
	symlinks -r -s -c debian/fw4spl

override_dh_auto_test:
	echo "test disabled"

override_dh_shlibdeps:
	dh_shlibdeps -v -l/usr/lib:/usr/lib/fw4spl:/usr/lib/fw4spl/Bundles:/usr/lib/fw4spl/Bundles/gui_0-1/:/usr/lib/fw4spl/Bundles:/usr/lib/fw4spl/Bundles/io_0-1/:/usr/lib/fw4spl/Bundles:/usr/lib/fw4spl/Bundles/ctrlSelection_0-1/:/usr/lib/fw4spl/Bundles/ioITK_0-1/




