#!/usr/bin/make -f

# PIE currently breaks compilation
DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
# LTO can cause a seg. fault on s390x, under certain conditions
ifneq ($(findstring $(DEB_HOST_ARCH), s390x),)
        DEB_BUILD_MAINT_OPTIONS += optimize=-lto
endif
export DEB_BUILD_MAINT_OPTIONS

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

LDFLAGS += -Wl,--as-needed
CFLAGS += $(CPPFLAGS)

export PYBUILD_NAME=gssapi

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_test:

override_dh_auto_clean:
	find . \( -name \*.pyc -or -name \*.c -or -name \*.so -or -name \*.egg \) -delete
