3 include /usr/share/cdbs/1/rules/debhelper.mk
4 include /usr/share/cdbs/1/class/autotools.mk
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)
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)
19 ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
20 SPECIFIC_CFLAGS=$(N770_CFLAGS)
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)
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)
38 SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
47 CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)