#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
WEAK_HOSTS := arm64 hppa

# Use less optimization on architectures that FTBFS otherwise
ifneq (,$(findstring $(DEB_HOST_ARCH),$(WEAK_HOSTS)))
export DEB_CXXFLAGS_MAINT_APPEND=-O0
endif

%:
	dh $@

override_dh_auto_build:
	$(RM) src/glew.c
	dh_auto_build -Dsrc
