1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
SO=4
VER=4.0
package=xmpi
version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
ARCH:=$(shell dpkg --print-architecture)
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CONFFLAGS =
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
ifneq (,$(findstring strict,$(DEB_BUILD_OPTIONS)))
CONFFLAGS += --enable-warnings-are-errors
endif
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
dh_autoreconf --as-needed
touch configure
touch -r configure $$(find -name "*.am") $$(find -name "*.in") $$(find -name "*.m4")
./configure \
$(CONFFLAGS) \
--with-cc=mpicc.lam \
--with-cxx=mpic++.lam \
--prefix=/usr \
--enable-shared=yes
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
! [ -f Makefile ] || $(MAKE) clean
-rm -f Config/config
-rm -f app-defaults/XMPI.LINUX.$(ARCH) config.status confdefs.h config.log config.mk
-rm -f src/libxmpi/Makefile src/xmpi/xmpi_config.h src/xmpi/Makefile \
src/xmpi/stamp-h src/Bitmaps/Makefile src/Pixmaps/Makefile \
src/Makefile man/man1/Makefile man/Makefile app-defaults/Makefile \
config/Makefile libtool Makefile
-cd debian/conf/ && find * -type f -exec mv {} ../../{} \;
rm -rf debian/conf
rm -rf debian/tmp src/libxmpi/nodeslist.loT src/xmpi/stamp-h1
dh_autoreconf_clean
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) install DESTDIR=`pwd`/debian/tmp
rm -f debian/tmp/usr/lib/libxmpi.so.0.0.0
rm -f debian/tmp/usr/lib/libxmpi.so.0
g++ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) \
-shared -Wl,-soname=libxmpi.so.$(SO) src/libxmpi/.libs/*.o \
-o debian/tmp/usr/lib/libxmpi.so.$(VER) -llam++ -llam
ln -s libxmpi.so.$(VER) debian/tmp/usr/lib/libxmpi.so.$(SO)
ln -snf libxmpi.so.$(SO) debian/tmp/usr/lib/libxmpi.so
rm src/xmpi/xmpi
cd src/xmpi && make -n | awk '/libtool/ {gsub("[^ ]*libxmpi.la","-L../../debian/tmp/usr/lib -lxmpi"); sub("^.* mpic","mpic");gsub("-o xmpi","-o ../../debian/tmp/usr/bin/xmpi"); print}' | bash -x -e
mkdir -p debian/tmp/etc/X11/app-defaults
install -m 0644 app-defaults/XMPI debian/tmp/etc/X11/app-defaults/XMPI
mkdir -p debian/tmp/usr/share
dh_movefiles
touch install-stamp
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installdocs -i
dh_installexamples -i
dh_installmenu -i
dh_installcron -i
dh_installchangelogs -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdirs -a
dh_installdocs -a README NEWS
dh_installexamples -a
dh_installchangelogs -a
dh_installmenu -a
dh_installcron -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a
dh_shlibdeps -a -l `pwd`/debian/libxmpi4/usr/lib
dh_gencontrol -a
dh_installdeb -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-arch # binary-indep
.PHONY: build clean binary-indep binary-arch binary
|