#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@ --verbose --with-autoreconf

override_dh_clean:
	dh_autoreconf_clean
	cd src && if [ -f Makefile ]; then $(MAKE) clean; fi
	cd src && rm -f config.h config.log config.status Makefile

override_dh_auto_configure:
	dh_autoreconf --sourcedirectory=src && \
	cd src && \
	 ./configure --with-tinyxml-libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build:
	cd src && $(MAKE)
