#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build:
	dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dh_auto_build -- 'GPP=$$(CXX)'
	help2man ./pilercr \
	    --name 'software for finding CRISPR repeats' \
	    --help-option '-options' --no-discard-stderr \
            --version-string ${DEB_VERSION_UPSTREAM} \
	    --no-info > pilercr.1
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
	$(RM) pilercr *.o
	dh_auto_build -- 'GPP=$$(CXX)'
endif

override_dh_auto_clean:
	rm -f *.o pilercr pilercr.1
