summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/Debian/debian/rules')
-rwxr-xr-xpackaging/Debian/debian/rules18
1 files changed, 17 insertions, 1 deletions
diff --git a/packaging/Debian/debian/rules b/packaging/Debian/debian/rules
index 4cef604f8e..a8c83529a4 100755
--- a/packaging/Debian/debian/rules
+++ b/packaging/Debian/debian/rules
@@ -23,6 +23,22 @@ DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
export DEB_HOST_GNU_TYPE
export DEB_BUILD_GNU_TYPE
+
+# Support the DEB_BUILD_OPTIONS variable
+CFLAGS = -gstabs -Wall
+INSTALL = install
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL += -s
+endif
+
+
DESTDIR=`pwd`/debian/tmp
SWATDIR=`pwd`/debian/swat
SAMBABOOK=`pwd`/debian/swat
@@ -60,7 +76,7 @@ configure-stamp:
cp -f debian/config.cache source/config.cache; \
fi
- [ -f source/Makefile ] || (cd source && ./configure \
+ [ -f source/Makefile ] || (cd source && CFLAGS="$(CFLAGS)" ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--cache-file=./config.cache \