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

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

WAF=./waf
package = lifeograph
CC = gcc
CFLAGS = -g -Wall

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O2
endif


clean: 
		dh_testdir
		dh_clean
		$(WAF) --nocache distclean
#		rm -rf build

install: build
		dh_clean
		dh_installdirs
		$(WAF) --nocache install --destdir $(CURDIR)/debian/$(package)

configure:
		$(WAF) --nocache configure --prefix=/usr

build-arch: build
build-indep: build

build: configure
		$(WAF) --nocache build
		touch $@

binary-indep: install
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: install
		dh_testdir -a
		dh_testroot -a
		dh_installdocs -a
		dh_installchangelogs -a
#dh_installmenu
		dh_installman $(CURDIR)/lifeograph.1
		dh_strip -a
		dh_compress -a
		dh_fixperms -a
		dh_installdeb -a
		dh_shlibdeps -a
		dh_gencontrol -a
		dh_md5sums -a
		dh_builddeb -a

binary: binary-indep binary-arch

.PHONY: build build-arch build-indep binary binary-arch binary-indep \
        clean
