#!/usr/bin/make -f # Copyright (C) 2004-2005 Anibal Monsalve Salazar # Copyright (c) 2005 Juan Esteban Monsalve Tobon include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildtools.mk STRIP := $(STRIP) --strip-unneeded --remove-section=.comment --remove-section=.note CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) CXXFLAGS += -ffile-prefix-map=$(CURDIR)=. build-arch: dh_testdir dh_update_autotools_config dh_autoreconf ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --enable-shared ./configure --prefix=/usr --enable-shared $(MAKE) install prefix=$(CURDIR)/shared CXXFLAGS="$(CXXFLAGS)" [ ! -f Makefile ] || $(MAKE) distclean -rm -f config.log config.cache ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --enable-static $(MAKE) install prefix=$(CURDIR)/static CXXFLAGS="$(CXXFLAGS)" touch build clean: dh_testdir -rm -f build [ ! -f Makefile ] || $(MAKE) distclean -rm -f config.log config.cache -rm -rf tnt shared static dh_autoreconf_clean dh_clean binary-indep: build-indep binary-arch: build-arch dh_testdir dh_prep install -d debian/liblip2t64/usr/share/doc/liblip2t64/examples cd debian && install -d liblip2t64 liblip-dev cd debian/liblip2t64 && install -d usr/share/doc usr/lib/lip cd debian/liblip-dev && install -d usr/share/doc usr/lib/lip usr/include/lip cd shared/lib && $(STRIP) --strip-unneeded liblip.so.2.0.0 cd static/lib && strip --strip-debug liblip.a mv shared/lib/liblip.so.* debian/liblip2t64/usr/lib/lip mv shared/lib/liblip.so debian/liblip-dev/usr/lib/lip sed "s/^libdir=.*/libdir=\'\/usr\/lib\/lip\'/" shared/lib/liblip.la > debian/liblip-dev/usr/lib/lip/liblip.la mv static/lib/liblip.a debian/liblip-dev/usr/lib/lip sed "s/^#include \"forest.h\"/#include /" static/include/interpol.h > debian/liblip-dev/usr/include/lip/interpol.h sed "s/^#include \"memblock.h\"/#include /" static/include/forest.h > debian/liblip-dev/usr/include/lip/forest.h mv static/include/liblip.h debian/liblip-dev/usr/include/lip mv static/include/memblock.h debian/liblip-dev/usr/include/lip dh_installdocs --link-doc=liblip2t64 docs/* dh_installchangelogs dh_installexamples -v examples/example* examples/Makefile dh_fixperms dh_compress dh_makeshlibs dh_shlibdeps dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch build: build-arch build-indep build-indep: build .PHONY: binary binary-arch binary-indep build-arch build-indep clean