#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf))
	CFLAGS=-g -O0
endif

# To enable PIE and ld -z "now".
# Experimental 5 Feb 2016 to silence lintian hardening-no-pie and
# hardening-no-bindnow
# https://wiki.debian.org/HardeningWalkthrough#Selecting_security_hardening_options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --exclude=.la

override_dh_autoreconf:
	AUTOMAKE='automake --foreign' dh_autoreconf

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_clean:
	$(RM) -f doc/doxygen.conf
	$(RM) -r doc/html
	if [ -f Makefile ]; then $(MAKE) clean; fi
	dh_clean
