#!/usr/bin/make -f SHELL+= -e DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc endif CFLAGS=-g -O2 -include /usr/share/dpkg/buildflags.mk D := $(CURDIR)/debian/gup build: dh_testdir $(MAKE) $(CROSS) P_CFLAGS="$(CFLAGS) $(CPPFLAGS)" P_LDFLAGS="$(LDFLAGS)" touch $@ clean: dh_testdir -rm -f build $(MAKE) clean dh_clean binary-arch: checkroot build dh_testdir dh_prep dh_installchangelogs dh_installdocs README INSTALL dh_installdirs /usr/lib/gup install --mode=755 gup scripts/* $D/usr/lib/gup dh_installman gup.8 dh_installlogrotate dh_installcron dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb -- -Zxz binary-indep: build-arch: build build-indep: build binary: binary-arch checkroot: test root = "`whoami`" .PHONY: binary binary-arch binary-indep build-arch build-indep clean checkroot