From: Sebastian Harl Date: Sun, 27 Apr 2014 11:29:15 +0000 (+0200) Subject: rules: Use dpkg-buildflags to get CPPFLAGS, CFLAGS, and LDFLAGS. X-Git-Tag: ncmpc-0.21-1~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=99e33724f588f462d16a26f20af2d80a8cf4af18;p=pkg-ncmpc.git rules: Use dpkg-buildflags to get CPPFLAGS, CFLAGS, and LDFLAGS. --- diff --git a/debian/changelog b/debian/changelog index 82c2f74..b14251b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ ncmpc (0.21-1) UNRELEASED; urgency=low * debian/rules: - Enable chat-screen feature. - Split build target into build-arch and build-indep. + - Use dpkg-buildflags to get CPPFLAGS, CFLAGS, and LDFLAGS. * debian/control, debian/rules: - Enable documentation and build-depend on doxygen. * debian/patches, debian/control: diff --git a/debian/rules b/debian/rules index cf18017..042e001 100755 --- a/debian/rules +++ b/debian/rules @@ -11,13 +11,10 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif +CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS = $(shell dpkg-buildflags --get CFLAGS) +CFLAGS += -Wall +LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) CHECK = check @@ -48,7 +45,9 @@ config.status: configure --enable-outputs-screen \ --enable-documentation \ --with-ncursesw \ - CFLAGS="$(CFLAGS)" + CPPFLAGS="$(CPPFLAGS)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" build: build-arch build-indep build-indep: