diff --git a/debian/rules b/debian/rules
index b4d76a0d46c00f506d68c7e9fa19d2baae71000a..3b8f4f0210e8e4b74a4daf7449357bec3ce179f9 100755 (executable)
--- a/debian/rules
+++ b/debian/rules
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-CXXFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CXXFLAGS += -O0
-else
- CXXFLAGS += -O2
-endif
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
+CXXFLAGS += -Wall
MDIR = $(shell octave-config --print LOCALFCNFILEDIR)
OCTDIR = $(shell octave-config --print LOCALOCTFILEDIR)
fi \
done
- ./configure $(confflags) CXXFLAGS="$(CXXFLAGS)"
+ ./configure $(confflags) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
+ CXXFLAGS="$(CXXFLAGS)"
build: build-arch build-indep
build-arch: build-stamp