#!/usr/bin/make -f

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_DH_STRIP_ARGS := --dbg-package=sharing-service-picasa

CFLAGS = -Wall -g

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

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

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

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

ifneq (,$(findstring cov,$(DEB_BUILD_OPTIONS)))
	DEB_CONFIGURE_EXTRA_FLAGS += --enable-coverage
endif

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

ifneq (,$(findstring doc,$(DEB_BUILD_OPTIONS)))
	DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc
endif

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


# Prevent the ChangeLog file to be installed.
# The debian/chagelog file will be installed.
DEB_INSTALL_CHANGELOGS_ALL=

debian/stamp-autotools-files:
	./autogen.sh
	touch debian/stamp-autotools-files
