Optimize for N8x0 on armel builds, and use Thumb if requested
[browser-switch] / debian / rules
index fc9cd65..70bd2b9 100755 (executable)
@@ -9,8 +9,14 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-
-
+# Optimize for N8x0 CPUs if building for armel
+ifeq ($(DEB_HOST_ARCH),armel)
+       EXTRA_CFLAGS += -march=arm1136jf-s
+       # Use Thumb for smaller binaries if requested
+       ifneq (,$(filter thumb,$(DEB_BUILD_OPTIONS)))
+               EXTRA_CFLAGS += -mthumb
+       endif
+endif
 
 configure: configure-stamp
 configure-stamp:
@@ -32,6 +38,9 @@ clean:
        dh_testroot
        rm -f build-stamp configure-stamp
 
+       make clean
+       make -C config-ui clean
+
        dh_clean 
 
 install: build
@@ -42,8 +51,8 @@ install: build
 
        # Add here commands to install the package into
        # debian/browser-switchboard.
-       make install
-       make -C config-ui install
+       make DESTDIR=debian/browser-switchboard install
+       make -C config-ui DESTDIR=../debian/browser-switchboard install
 
 
 binary-indep: build install