-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild
More file actions
executable file
·42 lines (39 loc) · 769 Bytes
/
build
File metadata and controls
executable file
·42 lines (39 loc) · 769 Bytes
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
#! /bin/sh
SIMPLE=`echo $1 | tr -dc [0-9]`
shift
case "$SIMPLE" in
102)
B=OpenSSL_1_0_2-stable
D=-DOPENSSL_102
;;
110)
B=OpenSSL_1_1_0-stable
D=-DOPENSSL_110
;;
111)
B=OpenSSL_1_1_1-stable
D=-DOPENSSL_111
;;
3 | 30 | 300)
B=openssl-3.0
D=-DOPENSSL_30
;;
*)
echo Unknown version -- 1.1.0 or 1.1.1 or 3.0 1>&2
exit 1
;;
esac
echo Fetching openssl
test -d openssl || git clone git@github.com:openssl/openssl.git
echo Config and building openssl
cd openssl
git pull
git checkout $B || exit 1
./config $*
make -s clean
rm -f libssl.a libcrypto.a
make -s build_libs #>../openssl-build-log.txt 2>&1
cd ..
set -x
gcc -Iopenssl/include $D -o ttfb ttfb.c openssl/libssl.a openssl/libcrypto.a
cp ttfb ttfb.$SIMPLE