#!/usr/bin/make -f

# No setting build flag for hardening here since those are overwritten
# by the Makefile. The Makefile is patched instead.

export DEB_BUILD_MAINT_OPTIONS= hardening=+all
SOFILE=usr/lib/${DEB_HOST_MULTIARCH}/libaxc.so

%:
	dh $@

# Makefile is not generated so we need to explicitely set PREFIX variable
override_dh_auto_install:
	PREFIX=/usr dh_auto_install

override_dh_auto_build:
	PREFIX=/usr dh_auto_build

override_dh_link:
	dh_link -plibaxc0 ${SOFILE}.0.3.3 ${SOFILE}.0.3
	dh_link -plibaxc0 ${SOFILE}.0.3.3 ${SOFILE}.0
	dh_link -plibaxc-dev ${SOFILE}.0 ${SOFILE}

override_dh_auto_test:
	dh_auto_test -- -j1
