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

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

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

# See also bug report #839602
ifneq (,$(findstring $(DEB_HOST_ARCH),hppa))
export DEB_CXXFLAGS_MAINT_APPEND=-mlong-calls
endif


%:
	dh $@ --no-parallel

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