forked from frank-w/BPI-Router-Linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenssl.sh
executable file
·41 lines (32 loc) · 956 Bytes
/
openssl.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
#!/bin/bash
if [[ ! -d ./openssl ]];
then
git clone --depth 1 https://github.com/openssl/openssl.git --branch OpenSSL_1_1_1-stable ./openssl
fi
cd openssl
git fetch --depth 1
export INSTALL_DIR=$(pwd)/arm
export PATH=$INSTALL_DIR/bin:$PATH
export TARGETMACH=arm-none-linux-gnueabihf
export BUILDMACH=i686-pc-linux-gnu
export CROSS=arm-linux-gnueabihf
export CC=${CROSS}-gcc
export LD=${CROSS}-ld
export AS=${CROSS}-as
export AR=${CROSS}-ar
#cryptodev needs cryptodev-dir...crypto/cryptodev.h
CDOPTS="-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -I../cryptodev/cryptodev-linux/"
make clean
./Configure linux-generic32 -DOPENSSL_NO_HEARTBEATS ${CDOPTS} --prefix=$INSTALL_DIR --openssldir=${INSTALL_DIR}/final shared
echo $?
echo "========================================================"
make
#cd ${INSTALL_DIR}/
#cd lib
#$AR -x libcrypto.a
#$CC -shared *.o -o libcrypto.so
#rm *.o
#$AR -x libssl.a
#$CC -shared *.o -o libssl.so
#rm *.o
#checkinstall