3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
16 # This has to be exported to make some magic below work.
19 # These are used for cross-compiling and for saving the configure script
20 # from having to guess our platform (since we know it already)
21 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
27 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
33 # Use hardware floating point
34 ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS)))
35 CFLAGS += -mfpu=vfp -mfloat-abi=softfp
38 config.status: configure
40 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
44 build: build-arch build-indep
46 build-arch: build-arch-stamp
47 build-arch-stamp: config.status
51 build-indep: build-indep-stamp
52 build-indep-stamp: config.status
53 # Add here commands to compile the indep part of the package.
60 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
63 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
64 cp -f /usr/share/misc/config.sub config.sub
66 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
67 cp -f /usr/share/misc/config.guess config.guess
78 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
80 dh_install --list-missing --sourcedir=debian/tmp
82 # Must not depend on anything. This is to be called by
83 # binary-arch/binary-indep
84 # in another 'make' thread.
88 dh_installchangelogs NEWS
113 # Build architecture independent packages using the common target.
114 binary-indep: build-indep install
115 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
117 # Build architecture dependent packages using the common target.
118 binary-arch: build-arch install
119 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
121 binary: binary-arch binary-indep
122 .PHONY: build clean binary-indep binary-arch binary install