#!/usr/bin/make -f
# Copyright © martin f. krafft <madduck@debian.org>
# Distributable under the terms of the Artistic Licence 2.0

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR=$(CURDIR)/debian/molly-guard
makeargs = DEST=$(DESTDIR) REALPATH=/lib/molly-guard prefix=/usr libdir=/lib sbindir=/sbin etcdir=/etc

configure: configure-stamp
configure-stamp:
	dh_testdir
	touch $@

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE) $(makeargs)
	touch $@

clean:
	dh_testdir
	dh_testroot
	$(MAKE) clean
	rm -f build-stamp configure-stamp
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install $(makeargs)

binary-arch: build install

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installman
	dh_lintian
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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