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)
16 CC_NORMAL = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
17 CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
19 TARGET = i686-w64-mingw32
21 MINGW_TOP = /usr/$(TARGET)
22 MINGW_TMP = $(CURDIR)/debian/mingw32-ncurses6
30 --disable-db-install \
39 --enable-term-driver \
43 --with-abi-version=6 \
46 --with-fallbacks=unknown,rxvt \
49 --with-xterm-kbs=DEL \
56 export CFLAGS BUILD_CC
58 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
63 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
67 configure: configure-stamp
76 --prefix=$(MINGW_TOP) \
77 --with-build-cc=$(BUILD_CC) \
78 --with-pkg-config-libdir=/usr/$(TARGET)/lib/pkgconfig \
84 build-stamp: configure-stamp
95 [ ! -f makefile ] || $(MAKE) distclean
97 rm -f configure-stamp build-stamp install-stamp
101 install: install-stamp
102 install-stamp: build-stamp
106 dh_installdirs $(verbose)
108 $(MAKE) install.libs DESTDIR=$(MINGW_TMP)
110 mkdir -p $(MINGW_TMP)$(MINGW_BIN)
111 for name in $(MINGW_TMP)$(MINGW_TOP)/bin/*-config; \
113 base=`basename $$name`; \
114 ln -v $$name $(MINGW_TMP)$(MINGW_BIN)/$(TARGET)-$$base; \
119 # Build architecture-independent files here.
120 binary-indep: build install
121 # No binary-indep target.
123 # Build architecture-dependent files here.
124 binary-arch: build install
126 dh_testroot $(verbose)
127 dh_lintian $(verbose)
128 dh_installdocs $(verbose)
129 dh_installchangelogs $(verbose) NEWS
131 dh_compress $(verbose)
132 dh_fixperms $(verbose)
133 dh_installdeb $(verbose)
134 dh_shlibdeps $(verbose)
135 dh_gencontrol $(verbose)
136 dh_md5sums $(verbose)
137 dh_builddeb $(verbose)
139 binary: binary-indep binary-arch
140 .PHONY: build clean binary-indep binary-arch binary install install-stamp