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

#export DH_VERBOSE=1


DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


CFLAGS = -Wall -g

DESTDIR = $(CURDIR)/debian/qtsixa

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

build: build-stamp

build-stamp:
	dh_testdir

	$(MAKE)

	touch $@

clean:
	dh_testdir
	dh_testroot

	rm -f build-stamp configure-stamp

	[ ! -f Makefile ] || $(MAKE) clean
	rm -f Makefile.in aclocal.m4 compile config.guess config.h.in config.sub configure data/Makefile.in depcomp install-sh intltool-extract.in intltool-merge.in intltool-update.in ltmain.sh missing mkinstalldirs po/Makefile.in.in src/Makefile.in

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	dh_install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	#maemo-optify
	dh_md5sums
	dh_builddeb

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