#!/usr/bin/make -f

DEB_PATCHDIRS := debian/patches
DEB_PATCH_SUFFIX := .diff

include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_DH_INSTALL_SOURCEDIR=debian/tmp
DEB_DESTDIR=$(CURDIR)/debian/tmp

DEB_CONFIGURE_PREFIX=/usr
DEB_CONFIGURE_SYSCONFDIR=/etc
DEB_DH_STRIP_ARGS=--dbg-package=libical

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	DEB_CONFIGURE_EXTRA_FLAGS=--enable-debug
endif

# Use soft-float and thumb mode if it enabled.
ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -mthumb
endif

debian/stamp-autotools-files:
	autoreconf -v --install
	touch debian/stamp-autotools-files
