Try to guess the target system automatically
authoretrunko <eblima@gmail.com>
Mon, 7 Jul 2008 14:28:24 +0000 (14:28 +0000)
committeretrunko <eblima@gmail.com>
Mon, 7 Jul 2008 14:28:24 +0000 (14:28 +0000)
trunk/epsilon/debian/changelog
trunk/epsilon/debian/control
trunk/epsilon/debian/rules

index f72b404..50b43e4 100644 (file)
@@ -1,3 +1,10 @@
+epsilon (0.3.0.012-maemo4) unstable; urgency=low
+
+  * debian/rules: Try to guess the target device in a bit more clever way.
+  * debian/control: Fix build dependency info.
+
+ -- Eduardo Lima (Etrunko) <eduardo.lima@indt.org.br>  Thu, 03 Jul 2008 16:05:28 -0300
+
 epsilon (0.3.0.012-maemo3) unstable; urgency=low
 
   * New release.
index 4be4228..ffea036 100644 (file)
@@ -2,7 +2,7 @@ Source: epsilon
 Section: libs
 Priority: optional
 Maintainer: Maemo-EFL Team <maemo-efl-devel@garage.maemo.org>
-Build-Depends: cdbs, quilt, debhelper, zlib1g-dev, libepeg0-dev (>= 0.9.1.042-maemo2), libevas0-dev (>= 0.9.9.042-maemo3), libecore0-dev (>= 0.9.9.042-maemo3), libedje0-dev (>= 0.5.0.042-maemo4), libimlib2-dev (>= 1.4.1.000-maemo2), libpng12-dev
+Build-Depends: cdbs, quilt, debhelper, zlib1g-dev, libepeg0-dev (>= 0.9.1.042-maemo3), libevas0-dev (>= 0.9.9.042-maemo4), libecore0-dev (>= 0.9.9.042-maemo4), libedje0-dev (>= 0.5.0.042-maemo5), libimlib2-dev (>= 1.4.1.000-maemo3), libpng12-dev
 Standards-Version: 3.7.2
 
 Package: libepsilon0-dev
index f6328f0..31698d2 100755 (executable)
@@ -4,14 +4,43 @@ include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/autotools.mk
 include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
-DEB_BUILD_ARCH  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
-ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
-       CFLAGS += -DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
-       ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
-               CFLAGS += -mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
-       endif
-       ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
-               CFLAGS += -mcpu=arm926ej-s
+ifeq ($(DEB_BUILD_ARCH),armel)
+       COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
+       N770_CFLAGS=-mcpu=arm926ej-s
+       N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
+       ifneq ($(DEB_BUILD_OPTIONS),)
+               ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
+                       SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
+               else
+                       ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
+                               SPECIFIC_CFLAGS=$(N770_CFLAGS)
+                       endif
+               endif
        endif
+    ifeq ($(SPECIFIC_CFLAGS),)
+        ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?))
+            SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2)
+                       ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO))
+                               SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
+            endif
+               endif
+       ifeq ($(SPECIFIC_CFLAGS),)
+            # Our last hope is to look at the value returned by `sb-conf current`
+            SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1)
+                       ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO))
+                               ifeq ($(SB_CURRENT),GREGALE)
+                                       SPECIFIC_CFLAGS=$(N770_CFLAGS)
+                               else
+                                       SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
+                               endif
+                       else
+                               COMMON_CFLAGS=
+                       endif
+        endif
+    endif
 endif
+
+CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)
+