3 include /usr/share/cdbs/1/rules/debhelper.mk
4 include /usr/share/cdbs/1/class/autotools.mk
6 DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
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)
16 ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
17 SPECIFIC_CFLAGS=$(N770_CFLAGS)
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)
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)
35 SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
44 CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)