#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)

# Verbose output of every command that modifies files on the build system.
# Uncomment if needed.
#export DH_VERBOSE = 1

include /usr/share/dpkg/buildflags.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

# Directory for out of tree build.
DEB_BUILD_DIR=debian/build

# Default install folder.
INSTDIR=$(CURDIR)/debian/tmp

# Additional configure options.
DEB_CONFIGURE_OPTS := \
    --prefix=$(INSTDIR)/usr

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure --sourcedirectory=$(CURDIR) \
	                  --builddirectory=$(DEB_BUILD_DIR) -- \
	                  $(DEB_CONFIGURE_OPTS)

override_dh_auto_install:
	dh_auto_install --builddirectory=$(DEB_BUILD_DIR)

override_dh_installchangelogs:
	dh_installchangelogs NEWS