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

DEB_COMPRESS_EXCLUDE = .c
ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(findstring i386,$(ARCH)))
  DEB_CONFIGURE_EXTRA_FLAGS := --disable-gtk-doc --with-flavour=glx \
			     --with-gles=2.0 --enable-debug=no
else
  DEB_CONFIGURE_EXTRA_FLAGS := --disable-gtk-doc --with-flavour=eglx \
			     --with-gles=2.0 --enable-debug=no
endif

CFLAGS=-DMAEMO

post-patches:: debian/stamp-gen-configure
debian/stamp-gen-configure:
	# -V option will cause configure to exit
	ACLOCAL="aclocal-1.9" AUTOMAKE="automake-1.9" ./autogen.sh -V
	touch $@

clean::
	rm -f debian/stamp-gen-configure
