#!/usr/bin/make -f CC =gcc CPPFLAGS := `dpkg-buildflags --get CPPFLAGS` CFLAGS := `dpkg-buildflags --get CFLAGS` LDFLAGS := `dpkg-buildflags --get LDFLAGS` STRIP =strip BGINCS =/usr/include/bglibs ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP =: nostrip endif DIR =$(shell pwd)/debian/ucspi-proxy configure: deb-checkdir configure-stamp configure-stamp: for i in conf-*; do \ test -e $${i%'{orig}'}'{orig}' || cp -v $$i $$i'{orig}'; \ done echo '/usr/bin' >conf-bin echo '$(BGINCS)' >conf-bgincs echo '$(CC) $${CPPFLAGS} $${CFLAGS}' >conf-cc echo '$(CC) $${LDFLAGS}' >conf-ld echo '/usr/share/man' >conf-man touch configure-stamp build: deb-checkdir build-stamp build-stamp: configure-stamp $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" touch build-stamp clean: deb-checkdir $(MAKE) clean for i in `ls *'{orig}' || :`; do mv -vf $$i $${i%'{orig}'}; done rm -f build-stamp configure-stamp rm -rf '$(DIR)' rm -f debian/files debian/substvars changelog install: deb-checkdir build-stamp rm -rf '$(DIR)' $(MAKE) install install_prefix='$(DIR)' $(STRIP) -R .comment -R .note '$(DIR)'/usr/bin/ucspi-proxy* gzip -9n '$(DIR)'/usr/share/man/man1/*.1 chmod u=rwx,og=rx '$(DIR)' '$(DIR)/usr' '$(DIR)/usr/bin' '$(DIR)/usr/share' '$(DIR)/usr/share/man' test -r changelog || ln -s ChangeLog changelog binary-indep: binary-arch: deb-checkdir install ucspi-proxy.deb dpkg-shlibdeps '$(DIR)'/usr/bin/* dpkg-gencontrol -isp -pucspi-proxy -P'$(DIR)' dpkg-deb --root-owner-group -b '$(DIR)' .. binary: binary-indep binary-arch .PHONY: build clean install binary-indep binary-arch binary include debian/implicit