-
Notifications
You must be signed in to change notification settings - Fork 5
/
make_compare_traces.sh
executable file
·50 lines (45 loc) · 1.76 KB
/
make_compare_traces.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
#!/bin/sh
ROOT_DIR=$1
CUR_DIR=`basename "$PWD"`
OBJ_DIR=CMakeFiles/seismic-forward-lib.dir
EXE=compare_traces
if [ ${CUR_DIR} = "seismic-forward" ]; then
echo "The test program cannot be compiled in the source directory. Please,"
echo "copy the script to the top directory where object files are stores"
echo "and execute from there."
exit;
fi
if [ -e ${OBJ_DIR}/src/compare_traces.o ] ; then
echo "Removing old object file compare_traces.o"
rm ${OBJ_DIR}/src/compare_traces.o
fi
if [ -e ${EXE} ] ; then
echo "Removing old executable"
rm ${EXE}
fi
echo "Compiling compare_traces.cpp"
g++ -c -O2 \
-I${ROOT_DIR} \
-I${ROOT_DIR}/nr \
-I${ROOT_DIR}/${BOOST_DIR} \
${ROOT_DIR}/src/compare_traces.cpp -o ${OBJ_DIR}/src/compare_traces.o
if [ -e ${OBJ_DIR}/src/compare_traces.o ] ; then
echo "Linking compare_traces"
g++ ${OBJ_DIR}/src/compare_traces.o \
${OBJ_DIR}/nr/nrlib/iotools/fileio.cpp.o \
${OBJ_DIR}/nr/nrlib/iotools/logstream.cpp.o \
${OBJ_DIR}/nr/nrlib/iotools/bigfile.cpp.o \
${OBJ_DIR}/nr/nrlib/iotools/stringtools.cpp.o \
${OBJ_DIR}/nr/nrlib/iotools/logkit.cpp.o \
${OBJ_DIR}/nr/nrlib/segy/segy.cpp.o \
${OBJ_DIR}/nr/nrlib/segy/segytrace.cpp.o \
${OBJ_DIR}/nr/nrlib/segy/segygeometry.cpp.o \
${OBJ_DIR}/nr/nrlib/segy/traceheader.cpp.o \
${OBJ_DIR}/nr/nrlib/segy/commonheaders.cpp.o \
${OBJ_DIR}/nr/nrlib/stormgrid/stormcontgrid.cpp.o \
${OBJ_DIR}/nr/nrlib/volume/volume.cpp.o \
${OBJ_DIR}/nr/nrlib/surface/surfaceio.cpp.o \
${OBJ_DIR}/nr/nrlib/math/constants.cpp.o \
-lboost_system -lboost_filesystem \
-o ${EXE}
fi