New release based on Enlightenment SVN r38812
[maemo-efl] / trunk / eina / debian / rules
1 #!/usr/bin/make -f
2
3 include /usr/share/cdbs/1/rules/debhelper.mk
4 include /usr/share/cdbs/1/class/autotools.mk
5
6 DEB_CONFIGURE_EXTRA_FLAGS := --disable-magic-debug
7 #DEB_MAKE_CLEAN_TARGET := clean
8 #DEB_DH_STRIP_ARGS := --dbg-package=libeina-dbg
9 DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
10
11 ifeq ($(DEB_BUILD_ARCH),armel)
12         COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
13         N770_CFLAGS=-mcpu=arm926ej-s
14         N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
15         ifneq ($(DEB_BUILD_OPTIONS),)
16                 ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
17                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
18                 else
19                         ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
20                                 SPECIFIC_CFLAGS=$(N770_CFLAGS)
21                         endif
22                 endif
23         endif
24     ifeq ($(SPECIFIC_CFLAGS),)
25         ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?))
26             SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2)
27                         ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO))
28                                 SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
29             endif
30                 endif
31         ifeq ($(SPECIFIC_CFLAGS),)
32             # Our last hope is to look at the value returned by `sb-conf current`
33             SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1)
34                         ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO))
35                                 ifeq ($(SB_CURRENT),GREGALE)
36                                         SPECIFIC_CFLAGS=$(N770_CFLAGS)
37                                 else
38                                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
39                                 endif
40                         else
41                                 COMMON_CFLAGS=
42                         endif
43         endif
44     endif
45 endif
46
47 CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)
48