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