17a1c0d96SNathan Whitehorn#!/usr/bin/make -f 2*f4f33ea0SBaptiste Daroussin# Made with the aid of dh_make, by Craig Small 37a1c0d96SNathan Whitehorn# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. 47a1c0d96SNathan Whitehorn# Some lines taken from debmake, by Cristoph Lameter. 57a1c0d96SNathan Whitehorn 67a1c0d96SNathan Whitehorn# Uncomment this to turn on verbose mode. 77a1c0d96SNathan Whitehorn#export DH_VERBOSE=1 87a1c0d96SNathan Whitehorn 97a1c0d96SNathan Whitehorn# These are used for cross-compiling and for saving the configure script 107a1c0d96SNathan Whitehorn# from having to guess our platform (since we know it already) 117a1c0d96SNathan WhitehornDEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 127a1c0d96SNathan WhitehornDEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 137a1c0d96SNathan Whitehorn 14*f4f33ea0SBaptiste DaroussinCPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) 15*f4f33ea0SBaptiste DaroussinCFLAGS := $(shell dpkg-buildflags --get CFLAGS) 16*f4f33ea0SBaptiste DaroussinLDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) 17*f4f33ea0SBaptiste Daroussin 18*f4f33ea0SBaptiste DaroussinACTUAL_PROG = cdialog 197a1c0d96SNathan Whitehorn 207a1c0d96SNathan Whitehornifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 217a1c0d96SNathan Whitehorn CFLAGS += -O0 227a1c0d96SNathan Whitehornelse 237a1c0d96SNathan Whitehorn CFLAGS += -O2 247a1c0d96SNathan Whitehornendif 257a1c0d96SNathan Whitehornifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 267a1c0d96SNathan Whitehorn INSTALL_PROGRAM += -s 277a1c0d96SNathan Whitehornendif 287a1c0d96SNathan Whitehorn 297a1c0d96SNathan Whitehorn 307a1c0d96SNathan Whitehornconfigure: configure-stamp 317a1c0d96SNathan Whitehornconfigure-stamp: 327a1c0d96SNathan Whitehorn dh_testdir 337a1c0d96SNathan Whitehorn 34*f4f33ea0SBaptiste Daroussin cp -v package/dialog.map package/${ACTUAL_PROG}.map 35*f4f33ea0SBaptiste Daroussin 36*f4f33ea0SBaptiste Daroussin CPPFLAGS="$(CPPFLAGS)" \ 37*f4f33ea0SBaptiste Daroussin CFLAGS="$(CFLAGS)" \ 38*f4f33ea0SBaptiste Daroussin LDFLAGS="$(LDFLAGS)" \ 39*f4f33ea0SBaptiste Daroussin ./configure \ 407a1c0d96SNathan Whitehorn --host=$(DEB_HOST_GNU_TYPE) \ 417a1c0d96SNathan Whitehorn --build=$(DEB_BUILD_GNU_TYPE) \ 427a1c0d96SNathan Whitehorn --prefix=/usr \ 437a1c0d96SNathan Whitehorn --mandir=\$${prefix}/share/man \ 447a1c0d96SNathan Whitehorn --enable-nls \ 457a1c0d96SNathan Whitehorn --enable-header-subdir \ 467a1c0d96SNathan Whitehorn --enable-widec \ 47*f4f33ea0SBaptiste Daroussin --with-shared \ 48*f4f33ea0SBaptiste Daroussin --with-screen=ncursesw6 \ 49*f4f33ea0SBaptiste Daroussin --with-package=${ACTUAL_PROG} \ 50*f4f33ea0SBaptiste Daroussin --with-versioned-syms \ 517a1c0d96SNathan Whitehorn --disable-rpath-hack 527a1c0d96SNathan Whitehorn 537a1c0d96SNathan Whitehorn touch configure-stamp 547a1c0d96SNathan Whitehorn 557a1c0d96SNathan Whitehornbuild: build-stamp 567a1c0d96SNathan Whitehornbuild-stamp: configure-stamp 577a1c0d96SNathan Whitehorn dh_testdir 587a1c0d96SNathan Whitehorn 597a1c0d96SNathan Whitehorn $(MAKE) 607a1c0d96SNathan Whitehorn 617a1c0d96SNathan Whitehorn touch build-stamp 627a1c0d96SNathan Whitehorn 637a1c0d96SNathan Whitehornclean: 647a1c0d96SNathan Whitehorn dh_testdir 657a1c0d96SNathan Whitehorn dh_testroot 667a1c0d96SNathan Whitehorn 677a1c0d96SNathan Whitehorn [ ! -f makefile ] || $(MAKE) distclean 687a1c0d96SNathan Whitehorn 697a1c0d96SNathan Whitehorn rm -f configure-stamp build-stamp install-stamp 707a1c0d96SNathan Whitehorn 717a1c0d96SNathan Whitehorn dh_clean 727a1c0d96SNathan Whitehorn 737a1c0d96SNathan Whitehorninstall: install-stamp 747a1c0d96SNathan Whitehorninstall-stamp: build-stamp 757a1c0d96SNathan Whitehorn dh_testdir 767a1c0d96SNathan Whitehorn dh_testroot 777a1c0d96SNathan Whitehorn dh_clean -k 787a1c0d96SNathan Whitehorn dh_installdirs 797a1c0d96SNathan Whitehorn 80*f4f33ea0SBaptiste Daroussin $(MAKE) install DESTDIR=$(CURDIR)/debian/${ACTUAL_PROG} 817a1c0d96SNathan Whitehorn 827a1c0d96SNathan Whitehorn touch install-stamp 837a1c0d96SNathan Whitehorn 847a1c0d96SNathan Whitehorn# Build architecture-independent files here. 857a1c0d96SNathan Whitehornbinary-indep: build install 867a1c0d96SNathan Whitehorn# No binary-indep target. 877a1c0d96SNathan Whitehorn 887a1c0d96SNathan Whitehorn# Build architecture-dependent files here. 897a1c0d96SNathan Whitehornbinary-arch: build install 907a1c0d96SNathan Whitehorn dh_testdir 917a1c0d96SNathan Whitehorn dh_testroot 927a1c0d96SNathan Whitehorn dh_installdocs 937a1c0d96SNathan Whitehorn dh_installexamples 947a1c0d96SNathan Whitehorn dh_installchangelogs CHANGES 957a1c0d96SNathan Whitehorn dh_strip 967a1c0d96SNathan Whitehorn dh_compress 977a1c0d96SNathan Whitehorn dh_fixperms 987a1c0d96SNathan Whitehorn dh_installdeb 99*f4f33ea0SBaptiste Daroussin dh_makeshlibs 1007a1c0d96SNathan Whitehorn dh_shlibdeps 1017a1c0d96SNathan Whitehorn dh_gencontrol 1027a1c0d96SNathan Whitehorn dh_md5sums 1037a1c0d96SNathan Whitehorn dh_builddeb 1047a1c0d96SNathan Whitehorn 1057a1c0d96SNathan Whitehornbinary: binary-indep binary-arch 1067a1c0d96SNathan Whitehorn.PHONY: build clean binary-indep binary-arch binary install install-stamp 107