#!/usr/bin/make -f

DEB_CPPFLAGS_MAINT_APPEND	 = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500

include /usr/share/dpkg/buildflags.mk

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --with-X
	dh_auto_configure --sourcedirectory=tools/win -- --with-X --cache-file=../../config.cache

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --sourcedirectory=tools/win

override_dh_auto_clean:
	dh_auto_clean --sourcedirectory=tools/win
	dh_auto_clean
	$(RM) libXg/Makefile libframe/Makefile libmsg/Makefile wily/Makefile

override_dh_auto_install:
	mkdir -p debian/wily/etc/X11/app-defaults/
	install -m644 misc/Wily.ad \
           debian/wily/etc/X11/app-defaults/Wily

override_dh_installchangelogs:
	dh_installchangelogs Doc/changes.txt
