-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure.win
executable file
·42 lines (33 loc) · 1004 Bytes
/
configure.win
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
# Library versions
LIB_VER="110-2"
TLS_VER="362"
tar -xf src/mbedtls-$TLS_VER.tar.xz
tar -xf src/nng-$LIB_VER.tar.xz
for ARCH in x64 i386; do
if [ -e "${R_HOME}/bin/${ARCH}/R" ]; then
CC=`"${R_HOME}/bin/${ARCH}/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/${ARCH}/R" CMD config CFLAGS`
LDFLAGS=`"${R_HOME}/bin/${ARCH}/R" CMD config LDFLAGS`
export CC CFLAGS LDFLAGS
cd mbedtls-$TLS_VER
mkdir ${ARCH}
cd ${ARCH}
echo "Compiling 'libmbedtls' from source for ${ARCH} ..."
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../../install/${ARCH} ..
cmake --build . --target install
cd ../..
cd nng-$LIB_VER
mkdir ${ARCH}
cd ${ARCH}
echo "Compiling 'libnng' from source for ${ARCH} ..."
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../../install/${ARCH} ..
cmake --build . --target install
cd ../..
else
echo "Note: ${ARCH} not installed, skipping ..."
fi
done
rm -rf mbedtls-$TLS_VER
rm -rf nng-$LIB_VER
# Success
exit 0