2 # Made with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Cristoph Lameter.
6 # Uncomment this to turn on verbose mode.
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CC_NORMAL = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
15 CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
19 MYDATA=/usr/local/ncurses/share/terminfo
20 BUILD_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
22 CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
23 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
24 LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
26 ifneq ($(MY_DIR),/usr)
27 RPATH_ENV = RPATH_LIST=../lib:$(MY_DIR)/lib
28 RPATH_OPT = --enable-rpath
31 RPATH_OPT = --disable-rpath --disable-rpath-hack
34 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
39 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
44 configure: configure-stamp
50 CPPFLAGS="$(CPPFLAGS)" \
51 LDFLAGS="$(LDFLAGS)" ./configure $(RPATH_OPT) \
52 --host=$(DEB_HOST_GNU_TYPE) \
53 --build=$(DEB_BUILD_GNU_TYPE) \
55 --with-default-terminfo-dir=$(MYDATA) \
56 --with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \
66 --enable-wgetch-events \
68 --program-suffix=$(MY_ABI) \
70 --with-abi-version=$(MY_ABI) \
72 --with-extra-suffix=$(MY_ABI) \
78 --with-versioned-syms \
79 --with-xterm-kbs=DEL \
87 build-stamp: configure-stamp
98 [ ! -f makefile ] || $(MAKE) distclean
100 rm -f configure-stamp build-stamp install-stamp
104 install: install-stamp
105 install-stamp: build-stamp
111 $(MAKE) install.libs install.progs DESTDIR=$(BUILD_DIR)
113 ( cd test && make ncurses LOCAL_LIBDIR=$(MY_DIR)/lib )
114 mv test/ncurses $(BUILD_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
118 # Build architecture-independent files here.
119 binary-indep: build install
120 # No binary-indep target.
122 # Build architecture-dependent files here.
123 binary-arch: build install
126 dh_installchangelogs NEWS
137 binary: binary-indep binary-arch
138 .PHONY: build clean binary-indep binary-arch binary install install-stamp