#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

override_dh_auto_configure:
	dh_auto_configure -- --enable-shared

override_dh_install:
	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	cp libdwarf/libdwarf.a libdwarf/libdwarf.so.* \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/ && \
		ln -s libdwarf.so.* libdwarf.so
	dh_install
