#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # http://wiki.debian.org/Hardening#Using_Hardening_Options CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS := $(shell dpkg-buildflags --get CFLAGS) CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif config.status: configure dh_testdir dh_autoreconf ./configure $(shell dpkg-buildflags --export=configure) \ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man build: patch build-stamp build-stamp: config.status dh_testdir $(MAKE) ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) # Failure in test suite must cause a build failure. $(MAKE) check endif touch build-stamp clean: unpatch dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_autoreconf_clean dh_clean -a install: build dh_testdir dh_testroot dh_prep -a dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp binary-indep: build install build-arch: build build-indep: build binary-arch: build install dh_testdir dh_testroot dh_install -a --sourcedir=debian/tmp --list-missing dh_installdocs -a dh_installexamples -a dh_installchangelogs -a ChangeLog dh_strip -a dh_compress -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -psndfile-tools -ldebian/tmp/usr/lib dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install patch unpatch