#!/usr/bin/make -f
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

build:
	dh_testdir
	./configure
	make CC=$(CC) CFLAGS="-I. -g  -O2 -Wall -Wno-implicit"

clean:
	dh_testdir
	dh_clean
	[ ! -f Makefile ] || $(MAKE) clean

binary-indep:
	dh_testdir

binary-arch: 
	dh_testdir
	dh_installdeb 
	dh_installdirs
	dh_testroot
	dh_install $(package) /usr/bin
	dh_installdocs ADMESH.DOC 
	dh_installchangelogs
	dh_installman debian/admesh.1
	chmod 0644 *.stl
	dh_installexamples *.stl
	dh_compress
	dh_shlibdeps
	dh_gencontrol
	dh_strip
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
