From 99e33724f588f462d16a26f20af2d80a8cf4af18 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 27 Apr 2014 13:29:15 +0200 Subject: [PATCH] rules: Use dpkg-buildflags to get CPPFLAGS, CFLAGS, and LDFLAGS. --- debian/changelog | 1 + debian/rules | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) 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: -- 2.30.2