#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.

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

# Hardening stuff, see http://wiki.debian.org/Hardening
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

# applying quilt the modern way (http://pkg-perl.alioth.debian.org/howto/quilt.html)
%:
	dh $@


.PHONY: build
build: build-stamp


build-stamp: 
	dh_testdir
	dh_prep

# Proper Makefile settings have been defined in src/Makefile_ubuntu
# with a corresponding patch.

	cd src && $(MAKE) -f Makefile_ubuntu

	touch build-stamp


.PHONY: clean
clean: 
	dh_testdir
	dh_testroot
	dh_clean 

	rm -f bin/tandem
	rm -f src/*.d src/*.o

	rm -f build-stamp


.PHONY: build-indep
build-indep:
# We have nothing to do by default.


.PHONY: build-arch
build-arch: build


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


# Build architecture-dependent files here.
.PHONY: binary-arch
binary-arch: build-arch
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_install
	dh_installman
	dh_lintian
	dh_strip --dbg-package=tandem-mass-dbg -a
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


.PHONY: binary
binary: binary-indep binary-arch
