#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/architecture.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic

CONFIGURE_OPTS = \
		--prefix=/usr \
		--libdir=/usr/lib/${DEB_HOST_MULTIARCH} \
		--enable-pic \
		--disable-strip \
		--enable-doc

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CONFIGURE_OPTS += --disable-optimize
else
        CONFIGURE_OPTS +=
endif

%:
	dh $@

override_dh_auto_clean:
	touch config.mak
	dh_auto_clean

override_dh_auto_configure:
	./configure $(CONFIGURE_OPTS)

override_dh_strip:
	dh_strip --dbgsym-migration='libnfo1-dbg (<< 1.0.1-2~)'
