-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure_ace.sh
129 lines (121 loc) · 4.5 KB
/
configure_ace.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
#========================================================================
# Author: Edoardo Pasca
# Author: Ben Thomas
# Copyright 2016 - 2018 University College London
# Copyright 2016 - 2018 Science Technology Facilities Council
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#=========================================================================
version="6.4.7"
threads=2
while getopts p:v:j:s:h option
do
case "${option}"
in
p) target=$OPTARG;;
v) version=$OPTARG;;
j) threads=$OPTARG;;
s) src=$OPTARG;;
h)
echo "Usage: $0 -p platform [-v ACE_Version]"
echo "Use the platform option to build for a specific platform."
echo "Currently only linux is available."
echo "Use the -v to define a specific version, defaults to 6.4.7"
exit
;;
*)
echo "Wrong option passed. Use the -h option to get some help." >&2
exit 1
;;
esac
done
echo $target
echo $version
#mkdir src
#cd src
#if [ ! -f ACE-${version}.zip ]
#then
# wget -nc http://download.dre.vanderbilt.edu/previous_versions/ACE-${version}.zip
#fi
#unzip -n ACE-${version}.zip
#WORKING_DIR=`pwd`
WORKING_DIR=${src}
echo ${WORKING_DIR}
#export ACE_ROOT=${WORKING_DIR}/ACE_wrappers
export ACE_ROOT=${WORKING_DIR}/
if [ $target = "linux" ] ; then
cd ${ACE_ROOT}/ace
ln -s config-linux.h config.h
cd ../include/makeinclude
ln -s platform_linux.GNU platform_macros.GNU
cd ../../ace
elif [ $target = "macosx" ] ; then
cd ${ACE_ROOT}/ace
ln -s config-macosx.h config.h
cd ../include/makeinclude
ln -s platform_macosx.GNU platform_macros.GNU
cd ../../ace
fi
#make -j${threads}
# # copy all the binaries to the install directory
#echo "**************************************************************"
#echo "Copying to install directory"
#echo "**************************************************************"
#cd ${WORKING_DIR}
#INSTALL_DIR=${WORKING_DIR}/install/lib
#mkdir -p $INSTALL_DIR
#if [ $target = "linux" ] ; then
#
# cp -v ${ACE_ROOT}/ace/libACE.so.${version} ${INSTALL_DIR}
# if [ -h ${INSTALL_DIR}/libACE.so ] ; then
# rm ${INSTALL_DIR}/libACE.so
# fi
# ln -s ${INSTALL_DIR}/libACE.so.${version} ${INSTALL_DIR}/libACE.so
#
# cp -v ${ACE_ROOT}/ace/ETCL/libACE_ETCL.so.${version} ${INSTALL_DIR}
# cp -v ${ACE_ROOT}/ace/ETCL/libACE_ETCL_Parser.so.${version} ${INSTALL_DIR}
# if [ -h ${INSTALL_DIR}/libACE_ETCL.so ] ; then
# rm ${INSTALL_DIR}/libACE_ETCL.so
# fi
# ln -s ${INSTALL_DIR}/libACE_ETCL.so ${INSTALL_DIR}/libACE_ETCL.so
# if [ -h ${INSTALL_DIR}/libACE_ETCL_Parser.so ] ; then
# rm ${INSTALL_DIR}/libACE_ETCL_Parser.so
# fi
# ln -s ${INSTALL_DIR}/libACE_ETCL_Parser_Parser.so.${version} ${INSTALL_DIR}/libACE_ETCL_Parser.so
# cp -v ${ACE_ROOT}/ace/Compression/libACE_Compression.so.${version} ${INSTALL_DIR}
# if [ -h ${INSTALL_DIR}/libACE_Compression.so ] ; then
# rm ${INSTALL_DIR}/libACE_Compression.so
# fi
# ln -s ${INSTALL_DIR}/libACE_Compression.so.${version} ${INSTALL_DIR}/libACE_Compression.so
# cp -v ${ACE_ROOT}/ace/Compression/rle/libACE_RLECompression.so.${version} ${INSTALL_DIR}
# if [ -h ${INSTALL_DIR}/libACE_RLECompression.so ] ; then
# rm ${INSTALL_DIR}/libACE_RLECompression.so
# fi
# ln -s ${INSTALL_DIR}/libACE_RLECompression.so.${version} ${INSTALL_DIR}/libACE_RLECompression.so
# cp -v ${ACE_ROOT}/ace/Monitor_Control/libACE_Monitor_Control.so.${version} ${INSTALL_DIR}
# if [ -h ${INSTALL_DIR}/libACE_Monitor_Control.so ] ; then
# rm ${INSTALL_DIR}/libACE_Monitor_Control.so
# fi
# ln -s ${INSTALL_DIR}/libACE_Monitor_Control.so.${version} ${INSTALL_DIR}/libACE_Monitor_Control.so
#
#elif [ $target = "macosx" ] ; then
#
# cp -v ${ACE_ROOT}/ace/libACE.dylib ${INSTALL_DIR}
# cp -v ${ACE_ROOT}/ace/ETCL/libACE_ETCL.dylib ${INSTALL_DIR}
# cp -v ${ACE_ROOT}/ace/ETCL/libACE_ETCL_Parser.dylib ${INSTALL_DIR}
# cp -v ${ACE_ROOT}/ace/Compression/libACE_Compression.dylib ${INSTALL_DIR}
# cp -v ${ACE_ROOT}/ace/Compression/rle/libACE_RLECompression.dylib ${INSTALL_DIR}
# cp -v ${ACE_ROOT}/ace/Monitor_Control/libACE_Monitor_Control.dylib ${INSTALL_DIR}
#fi