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
|
# Makefile for LinBox's examples/ directory
###########################################
# this section constructed at configure time (sets compiler, flags, header locations, library locations)
# basic terms
compiler=g++
# MPICH
# mpicompiler=mpicxx -D__LINBOX_HAVE_MPI
# LAM/MPI
mpicompiler=mpiCC -D__LINBOX_HAVE_MPI
flags=-g -Wall -DLinBoxSrcOnly
linboxincludes=-I..
# package headers locations. The default is to look in /usr/include and /usr/local/include
gmpincludes=
blasincludes=
ntlincludes=
givaroincludes=
# package library locations. Default is to look in /usr/lib and /usr/local/lib
gmplibdir=
blaslibdir=
ntllibdir=
givarolibdir=
###########################################
# Below this point the makefile is fixed.
###########################################
# add flags so linker can get the libfilename right
gmplibs=$(gmplibdir) -lgmp -lgmpxx
blaslibs=$(blaslibdir) -lcblas -llapack -latlas
ntllibs=$(ntllibdir) -lntl
givarolibs=$(givarolibdir) -lgivaro
includes=-I. $(linboxincludes) $(gmpincludes) $(blasincludes) $(ntlincludes) $(givaroincludes)
libs=$(gmplibs) $(blaslibs) $(ntllibs) $(givarolibs)
###########################################
# rules to make targets
# generic rule for any test program
%:%.C
$(compiler) $(flags) $*.C -o $* $(includes) $(libs)
# particular rule for some program using different setup from the generic one
test-rank: test-rank.C test-generic.h # dependence on linbox sources also wanted
g++ test-rank.C -o test-rank $(blasincludes) $(blaslibs)
minpoly: minpoly.C ../linbox/solutions/methods.h ../linbox/solutions/minpoly.h ../linbox/algorithms/cra-domain.h
$(mpicompiler) $(flags) minpoly.C -o minpoly $(includes) $(libs)
mpidet: mpidet.C ../linbox/solutions/methods.h ../linbox/solutions/det.h ../linbox/algorithms/cra-domain.h
$(mpicompiler) $(flags) mpidet.C -o mpidet $(includes) $(libs)
mpidet2: mpidet bigmat
./bigmat 200 > file
mpiexec C ./mpidet file
rm file bigmat
run: minpoly file
mpirun -np 1 ./minpoly file
clean:
rm mpidet minpoly test-det test-bitonic-sort test-rank a.out *.o
|