forked from ImperialCollegeLondon/pnextract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AllMakeMinGW
executable file
·76 lines (61 loc) · 1.67 KB
/
AllMakeMinGW
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
#!/bin/bash
echo "Run ./AllClean before running this script, when switching from Linux to Win or vise versa"
export psCXX=x86_64-w64-mingw32-g++
export psCFLAGS=-std=c++0x
export psLFLAGS=-static
export OPT=.exe
export preCC=x86_64-w64-mingw32-
export psHost=Windows
sleep 1
if ! [ -d thirdparty ]; then
if [ -d ../thirdparty ]; then
ln -s ../thirdparty ./
fi
fi
if ! [ -d bin ]; then
if [ -d ../bin/ ]; then
ln -s ../bin ./
fi
fi
SetedPoreScaleDir="$PoreScaleDir"
myCurrentDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo Running ${BASH_SOURCE[0]} on $myCurrentDIR \{
if ! [ -n "$PoreScaleDir" ]; then
echo " ";
echo " PoreScale paths are not set"
echo " please set them (preferably in your ~/.bashrc file) by adding in a new line:"
echo " Press Cntrl+C to stop "; echo " ";
sleep 1
echo "source $myCurrentDIR/bashrc"
source $myCurrentDIR/bashrc
fi
if [ -n "$1" ]; then
dataFiles=$1
else
dataFiles="$(ls -d */ )"
fi
# needed to compile thirdparty libraries first
for case in $dataFiles ; do
if [ -f $case/makefile ]; then
echo ; echo "* cd $case && make:"
(cd $case && make)
fi
done
for case in $dataFiles ; do
if [ -f $case/Makefile ]; then
echo ; echo "* cd $case && make:"
(cd $case && make)
elif [ -f $case/makefile ]; then echo
else
echo "* skipping $case"
fi
done
echo "Note: run ./AllClean before running this script, when switching from Linux to Win or vise versa"
echo "build directory: $myBinDir"
if ! [ -n "$SetedPoreScaleDir" ]; then
echo " "; echo " ";
echo " variable PoreScaleDir is not permanently set"
echo " please set in your ~/.bashrc file by adding new line:"
echo "source $PoreScaleDir/bashrc"
echo " ";
fi