-
Notifications
You must be signed in to change notification settings - Fork 13
/
install-git-deps.sh
executable file
·72 lines (56 loc) · 1.8 KB
/
install-git-deps.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
#!/bin/sh
BUILDTOP=`pwd`/stuff
USE_WOLFSSL=false
USE_MBEDTLS=true
set -e
touch Makefile.local
if ${USE_MBEDTLS}; then
mkdir -p $BUILDTOP
cd $BUILDTOP
[ -d mbedtls ] || git clone -b mcr_add_otherName https://github.com/mcr/mbedtls.git
(cd mbedtls && cmake -DCMAKE_INSTALL_PREFIX=$BUILDTOP . && make && make install )
if grep MBEDTLS Makefile.local
then
:
else
echo MBEDTLSH=-I${BUILDTOP}/include >>Makefile.local
echo MBEDTLSLIB=${BUILDTOP}/lib >>Makefile.local
fi
fi
if ${USE_WOLFSSL}; then
mkdir -p $BUILDTOP
cd $BUILDTOP
[ -d wolfssl ] || git clone https://github.com/wolfSSL/wolfssl.git
# (cd wolfssl && ./autogen.sh && ./configure --prefix= )
if grep WOLFSSL Makefile.local
then
:
else
echo WOLFSSLH=-I/sandel/include/wolfssl >>Makefile.local
echo WOLFSSLLIB=-L/sandel/lib -lwolfssl >>Makefile.local
fi
fi
if [ ! -f $BUILDTOP/mbedtls/Makefile ]
then
git clone -b mcr_add_otherName https://github.com/mcr/mbedtls.git
(cd $BUILDTOP/mbedtls && cmake -DCMAKE_INSTALL_PREFIX=$BUILDTOP . && make && make install )
fi
if grep MBEDTLS Makefile.local
then
:
else
echo MBEDTLSH=-I${BUILDTOP}/include >>Makefile.local
echo MBEDTLSLIB=${BUILDTOP}/lib >>Makefile.local
fi
if [ ! -f $BUILDTOP/include/cbor.h ]
then
if [ ! -d ${BUILDTOP}/libcbor ]; then ( cd $BUILDTOP && git clone https://github.com/mcr/libcbor.git) ; fi
(cd ${BUILDTOP}/libcbor && cmake . -DCMAKE_INSTALL_PREFIX:PATH=${BUILDTOP} && make && make install)
fi
if grep CBOR_INCLUDE Makefile.local
then
:
else
echo CBOR_LIB=${BUILDTOP}/libcbor/src/libcbor.a >>Makefile.local
echo CBOR_INCLUDE=-I${BUILDTOP}/include -Drestrict=__restrict__ >>Makefile.local
fi