#!/usr/bin/make -f

include /usr/share/hardening-includes/hardening.make

CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
LDFLAGS+=$(HARDENING_LDFLAGS) -Wl,-z,defs -Wl,--as-needed -Wl,-O1
CFLAGS+=$(HARDENING_CFLAGS)

export CFLAGS LDFLAGS

override_dh_install:
	rm -f $(CURDIR)/debian/tmp/usr/lib/xfce4/panel/plugins/*.a
	dh_install --fail-missing --sourcedir=debian/tmp -X .la

override_dh_strip:
	dh_strip --dbg-package=xfce4-panel-dbg

override_dh_auto_configure:
	dh_auto_configure
	find .pc -type f -exec echo '{}' >> po/POTFILES.skip \;

override_dh_auto_clean:
	rm -f po/POTFILES.skip
	dh_auto_clean

%:
	dh $@
