#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_HARDENING=1

%:
	dh $@

override_dh_auto_configure:
	./configure --with-platform=linux \
		    --prefix=/usr \
		    --includedir=/usr/include \
		    --mandir=/usr/share/man \
		    --infodir=/usr/share/info \
		    --sysconfdir=/etc \
		    --localstatedir=/var \
		    --enable-shared \
		    --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \

override_dh_install:
	dh_install -plibpomp2-dev usr/include/*
	dh_install -plibpomp2-dev usr/bin/opari2-config
	dh_install -plibpomp2-dev usr/share/doc/opari2/example/libpomp.a /usr/lib/$(DEB_HOST_MULTIARCH)/
	dh_install -plibpomp2-dev usr/bin/pomp2-parse-init-regions.awk
	dh_install -Nlibpomp2-dev
