#!/usr/bin/make -f
# -*- makefile -*-

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

PACKAGE = ttyload
MANSECT = 1

include debian/debian-compile.mk

CFLAGS_EXTRA = -Wall --pedantic $(CFLAGS)

man:
	# target: man -- convert *.pod to manual page
	$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
	MANSECT=$(MANSECT) makeman

build-stamp:
	# target: build-stamp
	dh_testdir

	# Use DEBUG variable to pass more flags to compiling
	$(MAKE) DEBUG="$(CFLAGS_EXTRA)"

	touch $@

build: build-stamp man

install: build
	# target: install

	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install
	dh_installchangelogs
	dh_installdocs
	dh_installman

binary-arch: install
	# target: binary-arch -- Build architecture-dependent files
	dh_testdir
	dh_testroot
#	dh_installexamples
#	dh_install
#	dh_installmenu
#	dh_installdebconf
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_python
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_perl
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

%:
	dh $@

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

# End of file
