From: etrunko Date: Fri, 4 Jul 2008 18:16:48 +0000 (+0000) Subject: Try to guess the target system automatically X-Git-Url: https://vcs.maemo.org/git/?p=maemo-efl;a=commitdiff_plain;h=4e50fbc9e7fa898b3bc07f1c87198d1a9fbec697 Try to guess the target system automatically --- diff --git a/trunk/epeg/debian/changelog b/trunk/epeg/debian/changelog index 6aefda4..5d3253c 100644 --- a/trunk/epeg/debian/changelog +++ b/trunk/epeg/debian/changelog @@ -1,3 +1,9 @@ +epeg (0.9.1.042-maemo3) unstable; urgency=low + + * debian/rules: Try to guess the target device in a bit more clever way. + + -- Eduardo Lima (Etrunko) Thu, 03 Jul 2008 16:05:28 -0300 + epeg (0.9.1.042-maemo2) unstable; urgency=low * New upstream version. diff --git a/trunk/epeg/debian/rules b/trunk/epeg/debian/rules index a4b2b90..31698d2 100755 --- a/trunk/epeg/debian/rules +++ b/trunk/epeg/debian/rules @@ -4,15 +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) +