#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_EXTRA_FLAGS := --enable-png-theme --with-pango DEB_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')

ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -DG_DEBUG_DISABLE
else
CFLAGS += -O0
endif

ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -mthumb -Wno-error=unused-but-set-variable -Wno-error=unused-function
endif

DEB_DH_STRIP_ARGS := --dbg-package=libmatchbox2

makebuilddir/libmatchbox2::
	[ -f configure ] || autoreconf -i -f
