#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CFLAGS:= -lpthread $(CFLAGS)
LDFLAGS:= -lpthread $(LDFLAGS)

%:
	dh $@
	
execute_before_dh_autoreconf:
	# Copy the fixed ax_have_qt.m4 file. See #965273
	cp -f /usr/share/aclocal/ax_have_qt.m4 m4/autoconf-archive/ax_have_qt.m4

override_dh_auto_configure:
	dh_auto_configure -- --enable-gles
	
override_dh_auto_install:
	dh_auto_install
	# Clean installation
	rm $(CURDIR)/debian/tmp/usr/share/projectM/presets/*.so
	rm $(CURDIR)/debian/tmp/usr/share/projectM/presets/.*DS_Store
	find debian/tmp -name '*.a' -delete -or -name '*.la' -delete
