forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.sh
executable file
·58 lines (42 loc) · 1.1 KB
/
configure.sh
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
#! /bin/bash
rm -f sourceme.sh Makefile.conf
if (($#==1)) ; then
conf=$1
else
prefix=""
case "$(uname)" in
(Linux) prefix=linux. ;;
(AIX) prefix=aix. ;;
(Darwin) prefix=mac. ;;
esac
conflist=$(cd configurations ; echo $prefix*)
PS3="Choose a configuration:"
select conf in $conflist
do
[[ -n "$conf" ]] && break
done
fi
ln -s configurations/$conf Makefile.conf
case "$conf" in
(aix.*)
SOEXT=so
echo "On cineca, you may need to load the following modules:"
echo "module load make"
echo "module load sed"
;;
(mac.*)
SOEXT=dylib
;;
(*)
SOEXT=so
esac
echo 'export PATH="'"$PWD"'/src/lib/:$PATH"' >> sourceme.sh
# this is just for mac:
echo 'export DYLD_LIBRARY_PATH="'"$PWD"'/src/lib:$DYLD_LIBRARY_PATH"' >> sourceme.sh
cat << EOF >> sourceme.sh
export PLUMED_KERNEL="$PWD/src/lib/libplumedKernel.$SOEXT"
EOF
echo "PLUMED will be installed using prefix /usr/local"
echo "If you wish to change this, set PLUMED_PREFIX environment variable before compiling"
echo "Executable will be named 'plumed'"
echo "To add a suffix to this name, set PLUMED_LIBSUFFIX environment variable before compiling"