#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CONFIGURE_FLAGS += --disable-avx

ifeq ($(DEB_HOST_ARCH),i386)
CONFIGURE_FLAGS += --disable-sse2
endif

ifeq ($(DEB_HOST_ARCH),armhf)
CONFIGURE_FLAGS += --disable-neon
endif

%:
	dh $@

override_dh_clean:
	rm -rf bin/
	dh_clean

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

licensecheck:
	licensecheck --deb-machine -r * \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints