-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_adapter
More file actions
executable file
·69 lines (56 loc) · 1.71 KB
/
Copy pathmake_adapter
File metadata and controls
executable file
·69 lines (56 loc) · 1.71 KB
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
#!/bin/sh
# --------------------------------------------------------------------
# Script to build and install the parafem-adapter
# --------------------------------------------------------------------
# use the following command to build the adapter
# ./make_adapter MACHINE=machinename > make.log 2>&1
# TODO:
# * Script assumes parafem has been installed correctly
# * tidy up make file
# Default
DO_CLEAN=0
DO_RELEASE=1
DO_DEBUG=0
# make bin and mod directories
if [ ! -d "bin" ]; then
mkdir -p bin
fi
if [ ! -d "mod" ]; then
mkdir -p mod
fi
while [ $# -gt 0 ]; do
ARG=`echo $1 | tr "[:upper:]" "[:lower:]"`
case $ARG in
clean) DO_CLEAN=1; DO_RELEASE=0; DO_DEBUG=0;;
release) DO_CLEAN=0; DO_RELEASE=1; DO_DEBUG=0;;
debug) DO_CLEAN=0; DO_RELEASE=0; DO_DEBUG=1;;
machine=*) MACHINE=`echo $ARG | sed -e 's/machine=//g'`;;
esac
shift
done
if [ -z "$MACHINE" ] ; then
echo "\n***********************************************"
echo "ERROR: MACHINE not set!"
echo "***********************************************\n"
exit 2
else
export MACHINE=`echo $MACHINE | tr "[:upper:]" "[:lower:]"`
fi
echo "\nBuilding parafem-adpater for: $MACHINE\n"
export MK_DEFS=build/"$MACHINE".inc
if ! [ -f $MK_DEFS ] ; then
echo "\n****************************************************"
echo "ERROR: Machine include file $MK_DEFS does not exist"
echo "******************************************************\n"
exit 2
fi
# Make adapter
if [ $DO_CLEAN -gt 0 ]; then
cd src && make clean
fi
if [ $DO_RELEASE -gt 0 ]; then
cd src && make release
fi
if [ $DO_DEBUG -gt 0 ]; then
cd src && make debug
fi