#!/usr/bin/make -f
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS +=$(CPPFLAGS)
CFLAGS   +=$(CPPFLAGS)

%:
	dh $@

override_dh_missing:
	dh_missing --list-missing

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--bindir=/usr/games \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--datadir=\$${prefix}/share/games \
		--sysconfdir=/etc

override_dh_auto_install:
	dh_auto_install
	$(RM) -r \
		$(CURDIR)/debian/tmp/usr/share/games/applications/ \
		$(CURDIR)/debian/tmp/usr/share/games/pixmaps/ \
		$(CURDIR)/debian/tmp/usr/share/games/doc/