#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Fail the build if the symbols are incorrect
export DPKG_GENSYMBOLS_CHECK_LEVEL=4


%:
	dh $@ --without=autoreconf

override_dh_auto_configure:
	./configure --disable-silent-rules --disable-maintainer-mode      \
		--disable-dependency-tracking --build=$(DEB_BUILD_GNU_TYPE)     \
		--prefix=/usr --includedir=/usr/include                         \
		--libdir=/usr/lib/$(DEB_BUILD_GNU_TYPE)                         \
		--docdir=/usr/share/doc/liblutok3                               \
		--htmldir=/usr/share/doc/liblutok-doc/html

override_dh_missing:
	dh_missing --fail-missing

# Generate demangled versions of the C++ symbol files
demangle_symbols: debian/liblutok3.demangled.symbols
	:

%.demangled.symbols: %.symbols
	sed 's/ \(_.*\) \(.*\)/ (c++)"\1" \2/' $< | c++filt > $@
