#!/usr/bin/make -f
-# MAde with the aid of dh_make, by Craig Small
+# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-CFLAGS =
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
verbose = # -v
configure = \
- CFLAGS="$(CFLAGS)" ../../configure \
+ CFLAGS="$(CFLAGS)" \
+ CPPFLAGS="$(CPPFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" ../../configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
cd t/ncurses6; $(configure) \
--bindir=\$${prefix}/bin/$(NCURSES_PKG) \
+ --datadir=\$${prefix}/share/$(NCURSES_PKG) \
--with-screen=ncursesw6
touch $@
cd t/ncursest6; $(configure) \
--bindir=\$${prefix}/bin/$(NCURSEST_PKG) \
+ --datadir=\$${prefix}/share/$(NCURSEST_PKG) \
--with-screen=ncursestw6
touch $@