#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

GNOME_MODULE = clutter
GNOME_DOWNLOAD_URL = http://www.clutter-project.org/sources/clutter/$(DEB_UPSTREAM_VERSION_MAJOR_MINOR)/$(GNOME_TARBALL)

LDFLAGS += -Wl,-O1 -Wl,--as-needed
DEB_COMPRESS_EXCLUDE += .c

ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(findstring armel,$(ARCH)))
   DEB_CONFIGURE_EXTRA_FLAGS += --disable-gtk-doc \
				--disable-introspection \
				--with-flavour=eglx \
				--with-gles=2.0 \
				--enable-debug=no  \
				--enable-cogl-debug=no \
				--with-json=internal
   CFLAGS=-DMAEMO -O2

else
   DEB_CONFIGURE_EXTRA_FLAGS += --disable-gtk-doc \
				--disable-introspection \
				--with-flavour=glx \
				--enable-debug=no  \
				--enable-cogl-debug=no \
				--with-json=internal
endif


#CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
#ifeq ($(CPU),arm)
#CFLAGS += -march=armv5t
#endif

$(patsubst %,binary-predeb/%,$(DEB_ALL_PACKAGES)) ::

common-binary-predeb-arch:: list-missing
