#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifeq ($(DEB_HOST_ARCH_CPU),i386)
  export DEB_CXXFLAGS_MAINT_APPEND = -msse2 -mfpmath=sse
endif

%:
	dh $@ --buildsystem=meson

override_dh_auto_configure:
	mkdir -p test/resources
	cp debian/test/PublicSans-Regular.ttf test/resources/PublicSans-Regular.ttf
	dh_auto_configure -- \
		-Dloaders=all \
		-Dsavers=all \
		-Dengines="gl, sw" \
		-Dbindings=capi \
		-Dtools=all \
		-Dtests=true

override_dh_auto_clean:
	rm -f test/resources/PublicSans-Regular.ttf
	dh_auto_clean
