49312e60d4ba810b55122414649cb9c3579400c3
[maemo-efl] / trunk / ecore / 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 include /usr/share/cdbs/1/rules/simple-patchsys.mk
6
7 DEB_CONFIGURE_EXTRA_FLAGS :=                              --enable-ecore-evas-software-16-x11   \
8                                                           --disable-ecore-fb                    \
9                                                           --disable-ecore-directfb              \
10                                                           --disable-ecore-evas-gl               \
11                                                           --disable-ecore-evas-dfb              \
12                                                           --disable-ecore-evas-xrender  \
13                                                           --disable-ecore-evas-fb               \
14                                                           --disable-ecore-sdl                   \
15                                                           --disable-ecore-evas-sdl
16
17 DEB_CONFIGURE_SCRIPT_ENV += CURL_LIBS="-lcurl"
18
19 CFLAGS += -I/usr/X11R6/include
20
21 DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
22
23 ifeq ($(DEB_BUILD_ARCH),armel)
24         COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
25         N770_CFLAGS=-mcpu=arm926ej-s
26         N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
27         ifneq ($(DEB_BUILD_OPTIONS),)
28                 ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
29                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
30                 else
31                         ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
32                                 SPECIFIC_CFLAGS=$(N770_CFLAGS)
33                         endif
34                 endif
35         endif
36     ifeq ($(SPECIFIC_CFLAGS),)
37         ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?))
38             SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2)
39                         ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO))
40                                 SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
41             endif
42                 endif
43         ifeq ($(SPECIFIC_CFLAGS),)
44             # Our last hope is to look at the value returned by `sb-conf current`
45             SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1)
46                         ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO))
47                                 ifeq ($(SB_CURRENT),GREGALE)
48                                         SPECIFIC_CFLAGS=$(N770_CFLAGS)
49                                 else
50                                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
51                                 endif
52                         else
53                                 COMMON_CFLAGS=
54                         endif
55         endif
56     endif
57 endif
58
59 CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)
60