#!/usr/bin/make -f

export DH_VERBOSE=1

CFLAGS += -Wall -g

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


%:
	dh $@ --with autotools-dev --with autoreconf

override_dh_auto_clean:
	-$(MAKE) debclean

override_dh_auto_configure:
	env CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_configure

override_dh_auto_install:
	dh_auto_install
	dh_install

override_dh_installdocs:
	dh_installdocs -A README README.gtk-defs README.guile-gtk

override_dh_installchangelogs:
	dh_installchangelogs -prep-gtk NEWS

override_dh_installexamples:
	dh_installexamples -prep-gtk examples/*
