#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) BUILD = --build=$(DEB_BUILD_GNU_TYPE) else BUILD = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) endif CFLAGS := $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS) CPPFLAGS := $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS) LDFLAGS := $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS) CFLAGS += -Wall -g -Wextra -Wmissing-prototypes -Wstrict-prototypes LDFLAGS += -Wl,-z,defs ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif config.status: configure dh_testdir ./configure $(BUILD) \ --prefix=/usr --mandir=\$${prefix}/share/man \ --disable-maintainer-mode \ CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' \ LDFLAGS='$(LDFLAGS)' \ || ( echo configure failed with $$? ; cat config.log ; \ echo "*** end of config.log after failed configure ***" ; exit 1 ) build-indep: build-arch: build-arch-stamp build: build-arch-stamp build-arch-stamp: config.status dh_testdir $(MAKE) touch $@ clean: dh_testdir dh_testroot rm -f build-arch-stamp if [ -f config.log -o -f config.status ] ; then \ $(MAKE) distclean ;\ fi dh_clean binary-indep: build-indep # We have nothing to do binary-arch: build-arch dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) DESTDIR='$(CURDIR)/debian/inoticoming' install dh_installchangelogs ChangeLog dh_installdocs dh_installexamples dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build build-arch build-indep clean binary-indep binary-arch binary