#!/usr/bin/make -f

DEB_DH_INSTALL_SOURCEDIR=debian/tmp

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

DEB_CONFIGURE_PREFIX=/usr
DEB_CONFIGURE_SYSCONFDIR=/etc
DEB_CONFIGURE_EXTRA_FLAGS := --disable-sequence-diagrams
#DEB_DH_STRIP_ARGS=--dbg-package=farsight0.1-dbg

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

cleanbuilddir/libfarsight::
	rm -f configure Makefile.in depcomp compile config.guess ltmain.sh config.sub config.h.in
	rm -f missing aclocal.m4 install-sh m4/Makefile.in m4/Makefile plugins/Makefile.in plugins/rtp/Makefile.in
	rm -f docs/Makefile.in docs/core/Makefile.in tests/Makefile.in pkgconfig/Makefile.in farsight/Makefile.in
	rm -f po/Makefile.in po/POTFILES po/Makefile

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