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)
25 --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
26 --disable-tools --disable-scripts \
27 --disable-sha1 --disable-sha2 --disable-aes --disable-des \
28 --disable-md5 --disable-gmp --disable-pgp --disable-dnskey \
29 --enable-openssl --enable-monolithic --enable-eap-identity \
30 --enable-eap-md5 --enable-eap-mschapv2 --enable-maemo
32 CFLAGS = -Wall -g -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter
34 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
40 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
44 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
45 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
46 MAKEFLAGS += -j$(NUMJOBS)
49 # Use hardware floating point
50 ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS)))
51 CFLAGS += -mfpu=vfp -mfloat-abi=softfp
54 config.status: configure
56 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info $(CONFIG_OPTIONS) CFLAGS="$(CFLAGS)"
57 #LDFLAGS="-Wl,-z,defs"
61 build: build-arch build-indep
63 build-arch: build-arch-stamp
64 build-arch-stamp: config.status
66 # Add here commands to compile the arch part of the package.
70 build-indep: build-indep-stamp
71 build-indep-stamp: config.status
73 # Add here commands to compile the indep part of the package.
80 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
82 # Add here commands to clean up after the build process.
84 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
85 cp -f /usr/share/misc/config.sub config.sub
87 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
88 cp -f /usr/share/misc/config.guess config.guess
94 install: install-indep install-arch
101 # Add here commands to install the indep part of the package into
102 # debian/<package>-doc.
113 # Add here commands to install the arch part of the package into
115 $(MAKE) DESTDIR=$(CURDIR)/debian/strongswan install
118 # Must not depend on anything. This is to be called by
119 # binary-arch/binary-indep
120 # in another 'make' thread.
124 dh_installchangelogs NEWS
129 # dh_installlogrotate
149 # Build architecture independant packages using the common target.
150 binary-indep: build-indep install-indep
151 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
153 # Build architecture dependant packages using the common target.
154 binary-arch: build-arch install-arch
155 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
157 binary: binary-arch binary-indep
158 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch