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)
18 CC_NORMAL = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
19 CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
21 TARGET = i686-w64-mingw32
23 MINGW_TOP = /usr/$(TARGET)
24 MINGW_TMP = $(CURDIR)/debian/mingw32-ncurses$(MY_ABI)td
31 --disable-db-install \
40 --enable-opaque-curses \
41 --enable-opaque-form \
42 --enable-opaque-menu \
43 --enable-opaque-panel \
45 --enable-term-driver \
49 --with-abi-version=$(MY_ABI) \
52 --with-fallbacks=unknown,ms-terminal,xterm-256color \
53 --with-tic-path=/usr/bin/tic$(MY_ABI) \
54 --with-infocmp-path=/usr/bin/infocmp$(MY_ABI) \
57 --with-xterm-kbs=DEL \
64 export CFLAGS BUILD_CC
66 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
71 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
75 configure: configure-stamp
84 --prefix=$(MINGW_TOP) \
85 --with-build-cc=$(BUILD_CC) \
86 --with-config-suffix=td \
87 --with-pc-suffix=$(MY_ABI)td \
88 --with-pkg-config-libdir=/usr/$(TARGET)/lib/pkgconfig \
94 build-stamp: configure-stamp
105 [ ! -f makefile ] || $(MAKE) distclean
107 rm -f configure-stamp build-stamp install-stamp
111 install: install-stamp
112 install-stamp: build-stamp
116 dh_installdirs $(verbose)
118 $(MAKE) install.libs DESTDIR=$(MINGW_TMP)
120 mkdir -p $(MINGW_TMP)$(MINGW_BIN)
121 for name in $(MINGW_TMP)$(MINGW_TOP)/bin/*-config; \
123 base=`basename $$name`; \
124 ln -v $$name $(MINGW_TMP)$(MINGW_BIN)/$(TARGET)-$$base; \
129 # Build architecture-independent files here.
130 binary-indep: build install
131 # No binary-indep target.
133 # Build architecture-dependent files here.
134 binary-arch: build install
136 dh_testroot $(verbose)
137 dh_lintian $(verbose)
138 dh_installdocs $(verbose)
139 dh_installchangelogs $(verbose) NEWS
141 dh_compress $(verbose)
142 dh_fixperms $(verbose)
143 dh_installdeb $(verbose)
144 dh_shlibdeps $(verbose)
145 dh_gencontrol $(verbose)
146 dh_md5sums $(verbose)
147 dh_builddeb $(verbose)
149 binary: binary-indep binary-arch
150 .PHONY: build clean binary-indep binary-arch binary install install-stamp