7c7946978589eb0563e8c0d0c0804b54be8c48d6
[maemo-efl] / trunk / edje / 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_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
7
8 ifeq ($(DEB_BUILD_ARCH),armel)
9         COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
10         N770_CFLAGS=-mcpu=arm926ej-s
11         N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
12         ifneq ($(DEB_BUILD_OPTIONS),)
13                 ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
14                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
15                 else
16                         ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
17                                 SPECIFIC_CFLAGS=$(N770_CFLAGS)
18                         endif
19                 endif
20         endif
21     ifeq ($(SPECIFIC_CFLAGS),)
22         ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?))
23             SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2)
24                         ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO))
25                                 SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
26             endif
27                 endif
28         ifeq ($(SPECIFIC_CFLAGS),)
29             # Our last hope is to look at the value returned by `sb-conf current`
30             SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1)
31                         ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO))
32                                 ifeq ($(SB_CURRENT),GREGALE)
33                                         SPECIFIC_CFLAGS=$(N770_CFLAGS)
34                                 else
35                                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
36                                 endif
37                         else
38                                 COMMON_CFLAGS=
39                         endif
40         endif
41     endif
42 endif
43
44 CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)
45