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)
24 ifneq ($(MY_DIR),/usr)
25 RPATH_ENV = RPATH_LIST=../lib:$(MY_DIR)/lib
26 RPATH_OPT = --enable-rpath
29 RPATH_OPT = --disable-rpath --disable-rpath-hack
32 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
37 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
42 configure: configure-stamp
46 $(RPATH_ENV) CFLAGS="$(CFLAGS)" ./configure $(RPATH_OPT) \
47 --host=$(DEB_HOST_GNU_TYPE) \
48 --build=$(DEB_BUILD_GNU_TYPE) \
50 --with-default-terminfo-dir=$(MYDATA) \
51 --with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \
67 --enable-wgetch-events \
69 --program-suffix=$(MY_ABI) \
71 --with-chtype=uint32_t \
72 --with-mmask_t=uint32_t \
74 --with-extra-suffix=$(MY_ABI) \
80 --with-versioned-syms \
81 --with-xterm-kbs=DEL \
89 build-stamp: configure-stamp
100 [ ! -f makefile ] || $(MAKE) distclean
102 rm -f configure-stamp build-stamp install-stamp
106 install: install-stamp
107 install-stamp: build-stamp
113 $(MAKE) install.libs install.progs DESTDIR=$(BUILD_DIR)
115 ( cd test && make ncurses LOCAL_LIBDIR=$(MY_DIR)/lib )
116 mv test/ncurses $(BUILD_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
120 # Build architecture-independent files here.
121 binary-indep: build install
122 # No binary-indep target.
124 # Build architecture-dependent files here.
125 binary-arch: build install
128 dh_installchangelogs NEWS
139 binary: binary-indep binary-arch
140 .PHONY: build clean binary-indep binary-arch binary install install-stamp