#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644

build: build-stamp
build-stamp:
	dh_testdir
	cd src && imake -I/usr/lib/X11/config
	cd src && $(MAKE) 
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	[ ! -f src/Makefile ] || ( cd src && $(MAKE) clean )
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(INSTALL_FILE) src/xgammon.ad $(CURDIR)/debian/xgammon/etc/X11/app-defaults/XGammon
	dh_install

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdirs
	dh_installdocs
	dh_installmenu
	dh_installman
	dh_installchangelogs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
