diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1f66159 --- /dev/null +++ b/debian/rules @@ -0,0 +1,34 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +HOST_CFLAGS := -g -Wall + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + HOST_CFLAGS += -O0 +else + HOST_CFLAGS += -O2 +endif + +HOST_CFLAGS += -Wno-error=unused-result + +unexport CFLAGS +export HOST_CFLAGS + +CROSS_COMPILE := $(DEB_HOST_GNU_TYPE)- +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + CROSS_COMPILE := +endif + +%: + dh $@ --parallel + +override_dh_auto_configure: + ./autogen.sh + dh_auto_configure -- --with-platform=uboot + +override_dh_auto_test: |