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 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
|
#! /usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
# Handmodified by P. Frauenfelder for debhelper support, 5 Sept 1998
topdir=$(shell pwd)
# Read the MPI implementation provided by mpi-default-dev.
include /usr/share/mpi-default-dev/debian_defaults
build: build-$(ARCH_DEFAULT_MPI_IMPL)
build-openmpi: build-stamp-openmpi
build-lam: build-stamp-lam
build-mpich: build-stamp-mpich
build-mpich2: build-stamp-mpich2
patch-stamp:
patch -p1 < debian/blacs-mpi-implementations.patch
touch $@
unpatch: patch-stamp
patch -p1 -R < debian/blacs-mpi-implementations.patch
rm -f patch-stamp
build-stamp-openmpi: patch-stamp
dh_testdir
[ -d TESTING/EXE ] || mkdir TESTING/EXE
# build the static libraries
BASEDIR=$(topdir) MPI=openmpi make mpi
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='$$(BLACSFINIT) $$(BLACSLIB) $$(BLACSFINIT) $$(MPILIB)' \
BUILD=static MPI=openmpi make
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the shared libraries
BASEDIR=$(topdir) FPIC=-fPIC MPI=openmpi make mpi
mkdir -p tmp
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cd tmp ;\
ar x ../LIB/$${i}_MPI-LINUX-0.a ;\
mkdir -p tmp ;\
for j in $$(find -name "*.C") ;\
do mv $$j tmp/$$(echo $$j | sed 's,C$$,o,g') ;\
done;\
cd .. ;\
gcc -shared -Wl,-soname=lib$$i-openmpi.so.1 -o lib$$i-openmpi.so.1.1 \
-L/usr/lib/openmpi/lib/ -lmpi -lmpi_f77 $$(find tmp -name "*.o");\
ln -fs lib$$i-openmpi.so.1.1 lib$$i-openmpi.so.1 ;\
ln -fs lib$$i-openmpi.so.1 lib$$i-openmpi.so ;\
rm -f tmp/tmp/* ; rmdir tmp/tmp ; rm tmp/* ;\
done
rmdir tmp
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='-L.. -lblacsF77init-openmpi -lblacs-openmpi -lblacsF77init-openmpi $$(MPILIB)' \
BUILD=shared MPI=openmpi make
touch build-stamp-openmpi
build-stamp-lam: patch-stamp
dh_testdir
[ -d TESTING/EXE ] || mkdir TESTING/EXE
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the static libraries
BASEDIR=$(topdir) MPI=lam make mpi
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='$$(BLACSFINIT) $$(BLACSLIB) $$(BLACSFINIT) $$(MPILIB)' \
BUILD=static MPI=lam make
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the shared libraries
BASEDIR=$(topdir) FPIC=-fPIC MPI=lam make mpi
mkdir -p tmp
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cd tmp ;\
ar x ../LIB/$${i}_MPI-LINUX-0.a ;\
mkdir -p tmp ;\
for j in $$(find -name "*.C") ;\
do mv $$j tmp/$$(echo $$j | sed 's,C$$,o,g') ;\
done;\
cd .. ;\
gcc -shared -Wl,-soname=lib$$i-lam.so.1 -o lib$$i-lam.so.1.1 \
$$(find tmp -name "*.o");\
ln -fs lib$$i-lam.so.1.1 lib$$i-lam.so.1 ;\
ln -fs lib$$i-lam.so.1 lib$$i-lam.so ;\
rm -f tmp/tmp/* ; rmdir tmp/tmp ; rm tmp/* ;\
done
rmdir tmp
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='-L.. -lblacsF77init-lam -lblacs-lam -lblacsF77init-lam $$(MPILIB)' \
BUILD=shared MPI=lam make
touch build-stamp-lam
build-stamp-mpich: patch-stamp
dh_testdir
[ -d TESTING/EXE ] || mkdir TESTING/EXE
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the static libraries
BASEDIR=$(topdir) MPI=mpich make mpi
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='$$(BLACSFINIT) $$(BLACSLIB) $$(BLACSFINIT) $$(MPILIB)' \
BUILD=static MPI=mpich make
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the shared libraries
BASEDIR=$(topdir) FPIC=-fPIC MPI=mpich make mpi
mkdir -p tmp
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cd tmp ;\
ar x ../LIB/$${i}_MPI-LINUX-0.a ;\
mkdir -p tmp ;\
for j in $$(find -name "*.C") ;\
do mv $$j tmp/$$(echo $$j | sed 's,C$$,o,g') ;\
done;\
cd .. ;\
gcc -shared -Wl,-soname=lib$$i-mpich.so.1 -o lib$$i-mpich.so.1.1 \
$$(find tmp -name "*.o");\
ln -fs lib$$i-mpich.so.1.1 lib$$i-mpich.so.1 ;\
ln -fs lib$$i-mpich.so.1 lib$$i-mpich.so ;\
rm -f tmp/tmp/* ; rmdir tmp/tmp ; rm tmp/* ;\
done
rmdir tmp
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='-L.. -lblacsF77init-mpich -lblacs-mpich -lblacsF77init-mpich $$(MPILIB)' \
BUILD=shared MPI=mpich make
touch build-stamp-mpich
build-stamp-mpich2: patch-stamp
dh_testdir
[ -d TESTING/EXE ] || mkdir TESTING/EXE
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the static libraries
BASEDIR=$(topdir) MPI=mpich2 make mpi
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='$$(BLACSFINIT) $$(BLACSLIB) $$(BLACSFINIT) $$(MPILIB)' \
BUILD=static MPI=mpich2 make
# next is a clean
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
# build the shared libraries
BASEDIR=$(topdir) FPIC=-fPIC MPI=mpich2 make mpi
mkdir -p tmp
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cd tmp ;\
ar x ../LIB/$${i}_MPI-LINUX-0.a ;\
mkdir -p tmp ;\
for j in $$(find -name "*.C") ;\
do mv $$j tmp/$$(echo $$j | sed 's,C$$,o,g') ;\
done;\
cd .. ;\
gcc -shared -Wl,-soname=lib$$i-mpich2.so.1 -lmpich -o lib$$i-mpich2.so.1.1 \
$$(find tmp -name "*.o");\
ln -fs lib$$i-mpich2.so.1.1 lib$$i-mpich2.so.1 ;\
ln -fs lib$$i-mpich2.so.1 lib$$i-mpich2.so ;\
rm -f tmp/tmp/* ; rmdir tmp/tmp ; rm tmp/* ;\
done
rmdir tmp
# the testing binaries
cd TESTING && BASEDIR=$(topdir) \
BTLIBS='-L.. -lblacsF77init-mpich2 -lblacs-mpich2 -lblacsF77init-mpich2 $$(MPILIB)' \
BUILD=shared MPI=mpich2 make
touch build-stamp-mpich2
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp-* install-stamp-*
BASEDIR=$(topdir) make cleanall
cd TESTING && BASEDIR=$(topdir) make clean
cd LIB && rm -f *.a
rm -f *so*
rm -rf TESTING/EXE
dh_clean
install: install-$(ARCH_DEFAULT_MPI_IMPL)
install-openmpi: install-stamp-openmpi
install-lam: install-stamp-lam
install-mpich: install-stamp-mpich
install-mpich2: install-stamp-mpich2
install-stamp-openmpi: build-stamp-openmpi
dh_testdir
dh_testroot
dh_prep
dh_installdirs -v -a
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cp -a lib$$i-openmpi.so.* \
`pwd`/debian/libblacs-mpi1/usr/lib/ ;\
cp -a lib$$i-openmpi.so \
`pwd`/debian/libblacs-mpi-dev/usr/lib/ ;\
done
set -e ;\
for i in shared static ; do \
install TESTING/EXE/xCbtest_MPI-LINUX-0-$$i-openmpi \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/cblacs_test_$$i-openmpi ;\
install TESTING/EXE/xFbtest_MPI-LINUX-0-$$i-openmpi \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/fblacs_test_$$i-openmpi ;\
done
set -e ;\
install LIB/blacsCinit_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsCinit-openmpi.a
install LIB/blacsF77init_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsF77init-openmpi.a
install LIB/blacs_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacs-openmpi.a
touch install-stamp-openmpi
install-stamp-lam: build-stamp-lam
dh_testdir
dh_testroot
dh_prep
dh_installdirs -v -a
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cp -a lib$$i-lam.so.* \
`pwd`/debian/libblacs-mpi1/usr/lib/ ;\
cp -a lib$$i-lam.so \
`pwd`/debian/libblacs-mpi-dev/usr/lib/ ;\
done
set -e ;\
for i in shared static ; do \
install TESTING/EXE/xCbtest_MPI-LINUX-0-$$i-lam \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/cblacs_test_$$i-lam ;\
install TESTING/EXE/xFbtest_MPI-LINUX-0-$$i-lam \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/fblacs_test_$$i-lam ;\
done
set -e ;\
install LIB/blacsCinit_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsCinit-lam.a
install LIB/blacsF77init_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsF77init-lam.a
install LIB/blacs_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacs-lam.a
touch install-stamp-lam
install-stamp-mpich: build-stamp-mpich
dh_testdir
dh_testroot
dh_prep
dh_installdirs -v -a
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cp -a lib$$i-mpich.so.* \
`pwd`/debian/libblacs-mpi1/usr/lib/ ;\
cp -a lib$$i-mpich.so \
`pwd`/debian/libblacs-mpi-dev/usr/lib/ ;\
done
set -e ;\
for i in shared static ; do \
install TESTING/EXE/xCbtest_MPI-LINUX-0-$$i-mpich \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/cblacs_test_$$i-mpich ;\
install TESTING/EXE/xFbtest_MPI-LINUX-0-$$i-mpich \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/fblacs_test_$$i-mpich ;\
done
set -e ;\
install LIB/blacsCinit_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsCinit-mpich.a
install LIB/blacsF77init_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsF77init-mpich.a
install LIB/blacs_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacs-mpich.a
touch install-stamp-mpich
install-stamp-mpich2: build-stamp-mpich2
dh_testdir
dh_testroot
dh_prep
dh_installdirs -v -a
set -e ;\
for i in blacs blacsF77init blacsCinit ; do \
cp -a lib$$i-mpich2.so.* \
`pwd`/debian/libblacs-mpi1/usr/lib/ ;\
cp -a lib$$i-mpich2.so \
`pwd`/debian/libblacs-mpi-dev/usr/lib/ ;\
done
set -e ;\
for i in shared static ; do \
install TESTING/EXE/xCbtest_MPI-LINUX-0-$$i-mpich2 \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/cblacs_test_$$i-mpich2 ;\
install TESTING/EXE/xFbtest_MPI-LINUX-0-$$i-mpich2 \
`pwd`/debian/blacs-mpi-test/usr/lib/blacs/fblacs_test_$$i-mpich2 ;\
done
set -e ;\
install LIB/blacsCinit_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsCinit-mpich2.a
install LIB/blacsF77init_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsF77init-mpich2.a
install LIB/blacs_MPI-LINUX-0.a \
`pwd`/debian/libblacs-mpi-dev/usr/lib/libblacs-mpich2.a
touch install-stamp-mpich2
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a README
dh_installexamples -a
dh_installman -a
dh_installchangelogs -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_strip -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -Lblacs-mpi-test -ldebian/blacs-mpi-test/usr/lib/blacs/ -Llibblacs-mpi-dev -ldebian/libblacs-mpi-dev/usr/lib/ \
LD_LIBRARY_PATH="/usr/lib/openmpi/lib$${LD_LIBRARY_PATH:+:}$$LD_LIBRARY_PATH" -Llibblacs-mpi1 -l/usr/lib/openmpi/lib/
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary-indep:
dh_testdir -i
dh_testroot -i
dh_installdirs -i
dh_installdocs -i README
dh_installchangelogs -i
cd TESTING && BASEDIR=$(topdir) make dat
set -e ;\
for i in $$(find TESTING/EXE -name "*.dat"); do \
install -m 644 $$i `pwd`/debian/blacs-test-common/usr/lib/blacs ;\
done
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean build
|