#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
export DH_OPTIONS=-V

include /usr/share/dpkg/default.mk

export DEB_CFLAGS_MAINT_APPEND= -flto -flto-partition=none
export DEB_LDFLAGS_MAINT_APPEND= -flto -flto-partition=none
ifeq ($(DEB_HOST_ARCH),amd64)
export DEB_CFLAGS_MAINT_APPEND+= -fcf-protection
export DEB_LDFLAGS_MAINT_APPEND+= -fcf-protection
endif

%:
	dh $@ 

override_dh_auto_build:
	dh_auto_build -- LIBDIR=\$${PREFIX}/lib/$(DEB_HOST_MULTIARCH) CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-

override_dh_auto_install:
	dh_auto_install -- LIBDIR=\$${PREFIX}/lib/$(DEB_HOST_MULTIARCH)
