Fixed build-dependencies, made package compile also on x86
[tunertool] / debian / rules
index dc00473..d9926a0 100755 (executable)
@@ -10,13 +10,17 @@ 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 += -mcpu=arm926ej-s 
+       endif
 endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s