update compile flags for fremantle
[tunertool] / debian / rules
index dc00473..fbea5e7 100755 (executable)
@@ -10,32 +10,33 @@ export DH_VERBOSE=1
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-CFLAGS = -Wall -g -mcpu=arm926ej-s 
+CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
        CFLAGS += -O2
+       ifneq (,$(findstring $(DEB_HOST_ARCH),arm armel))
+               CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp
+       endif
 endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
 endif
 
-config.status: configure
+config.status:
        dh_testdir
+       ./autogen.sh
        # Add here commands to configure the package.
        CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
      --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man \
      --infodir=\$${prefix}/share/info --with-maemo
 
-configure:
-       ./autogen.sh
-
-
 build: build-stamp
 
-build-stamp:  config.status
+build-stamp: config.status
        dh_testdir
 
        # Add here commands to compile the package.