-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-all
executable file
·56 lines (44 loc) · 1.5 KB
/
build-all
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
#!/bin/bash
# you should only need to modify the following four lines
CHEETAHDIR=$HOME/cheetah # Your cheetah directory
export INSTALLDIR=$HOME/local # Your local installation directory
export HDF5DIR=$HOME/local
export LIBPATH=$HOME/local/lib
########################
# LATEST PSANA
########################
cd $CHEETAHDIR/source/lcls-psana
relupgrade ana-current
. /reg/g/psdm/bin/sit_setup.sh
export LIBPATH=$HOME/local/lib
scons -c
scons
########################
# LIBCHEETAH
########################
export LD_LIBRARY_PATH="$INSTALLDIR/lib:$HDF5DIR/lib"
export LD_LIBRARY_PATH="$CHEETAHDIR/source/lcls/myana/release/build/pdsdata/lib/x86_64-linux:$LD_LIBRARY_PATH"
export LD_RUN_PATH=$LD_LIBRARY_PATH
# build libcheetah
cd $CHEETAHDIR/source
make clean
make libcheetah
# Now "install" the libcheetah library...
mkdir -p $INSTALLDIR
cp libcheetah.so.* $INSTALLDIR/lib
# I'm mystified by the naming conventions for shared libraries.. but this seems to work... for now
latestlib=$(find $INSTALLDIR/lib -name libcheetah.so.* | tail -n 1)
rm $INSTALLDIR/lib/libcheetah.so
rm $INSTALLDIR/lib/libcheetah.so.1
ln -s $latestlib $INSTALLDIR/lib/libcheetah.so
ln -s $latestlib $INSTALLDIR/lib/libcheetah.so.1
# if you want to install scripts
cd $CHEETAHDIR/scripts
cp hitfinder quickview framesorter $INSTALLDIR/scripts
########################
# PSANA
########################
export LIBPATH=/reg/neh/home3/yoon82/local/lib:$LIBPATH
cd $CHEETAHDIR/source/lcls-psana
. /reg/g/psdm/bin/sit_setup.sh
scons # Do not scons -c here