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 TARGET_DIR = $(CURDIR)/debian/adacurses
15 SAMPLE_DIR = $(TARGET_DIR)/usr/bin/AdaCurses
17 CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
18 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
19 LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
31 configure: configure-stamp
36 CPPFLAGS="$(CPPFLAGS)" \
37 LDFLAGS="$(LDFLAGS)" ./configure \
38 --host=$(DEB_HOST_GNU_TYPE) \
39 --build=$(DEB_BUILD_GNU_TYPE) \
41 --disable-rpath-link \
43 --with-ada-sharedlib \
49 build-stamp: configure-stamp
60 [ ! -f makefile ] || $(MAKE) distclean
62 rm -f configure-stamp build-stamp install-stamp
66 install: install-stamp
67 install-stamp: build-stamp
73 $(MAKE) install DESTDIR=$(TARGET_DIR)
75 # FIXME: it would be nice to make these into separate packages
76 ( cd samples && $(MAKE) install.examples DESTDIR=$(TARGET_DIR) BINDIR=$(SAMPLE_DIR) )
77 ( cd doc && $(MAKE) install.html DESTDIR=$(TARGET_DIR) )
81 # Build architecture-independent files here.
82 binary-indep: build install
83 # No binary-indep target.
85 # Build architecture-dependent files here.
86 binary-arch: build install
91 dh_installchangelogs NEWS
102 binary: binary-indep binary-arch
103 .PHONY: build clean binary-indep binary-arch binary install install-stamp