b925664278bd681b17e2f52f1057bd62e0122f01
[maemo-efl] / trunk / evas / 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 := --enable-software-16-x11                   \
7                                                          --enable-software-x11                  \
8                                                          --disable-scale-smooth                 \
9                                                          --disable-pthreads                     \
10                                                          --enable-no-dither-mask                \
11                                                          --enable-small-dither-mask             \
12                                                          --disable-fb                           \
13                                                          --disable-xrender-x11                  \
14                                                          --disable-image-loader-tiff            \
15                                                          --disable-image-loader-edb             \
16                                                          --disable-image-loader-xpm             \
17                                                          --disable-image-loader-svg             \
18                                                          --disable-convert-yuv                  \
19                                                          --disable-convert-8-rgb-332            \
20                                                          --disable-convert-8-rgb-666            \
21                                                          --disable-convert-8-rgb-232            \
22                                                          --disable-convert-8-rgb-222            \
23                                                          --disable-convert-8-rgb-221            \
24                                                          --disable-convert-8-rgb-121            \
25                                                          --disable-convert-8-rgb-111            \
26                                                          --disable-convert-16-bgr-565           \
27                                                          --disable-convert-16-rgb-555           \
28                                                          --disable-convert-16-rgb-444           \
29                                                          --disable-convert-16-rgb-ipq           \
30                                                          --disable-convert-24-rgb-888           \
31                                                          --disable-convert-24-bgr-888           \
32                                                          --disable-convert-32-rgb-8888          \
33                                                          --disable-convert-32-rgbx-8888         \
34                                                          --disable-convert-32-bgr-8888          \
35                                                          --disable-convert-32-bgrx-8888         \
36                                                          --disable-convert-32-rgb-rot-0         \
37                                                          --disable-convert-32-rgb-rot-180       \
38                                                          --disable-convert-32-rgb-rot-270       \
39                                                          --disable-convert-32-rgb-rot-90        \
40                                                          --disable-sdl
41
42
43 CFLAGS+=-I/usr/X11R6/include
44
45 DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
46
47 ifeq ($(DEB_BUILD_ARCH),armel)
48         COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
49         N770_CFLAGS=-mcpu=arm926ej-s
50         N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
51         ifneq ($(DEB_BUILD_OPTIONS),)
52                 ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
53                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
54                 else
55                         ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
56                                 SPECIFIC_CFLAGS=$(N770_CFLAGS)
57                         endif
58                 endif
59         endif
60     ifeq ($(SPECIFIC_CFLAGS),)
61         ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?))
62             SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2)
63                         ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO))
64                                 SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
65             endif
66                 endif
67         ifeq ($(SPECIFIC_CFLAGS),)
68             # Our last hope is to look at the value returned by `sb-conf current`
69             SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1)
70                         ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO))
71                                 ifeq ($(SB_CURRENT),GREGALE)
72                                         SPECIFIC_CFLAGS=$(N770_CFLAGS)
73                                 else
74                                         SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
75                                 endif
76                         else
77                                 COMMON_CFLAGS=
78                         endif
79         endif
80     endif
81 endif
82
83 CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)
84