forked from strongswan/strongswan
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild.sh
executable file
·56 lines (40 loc) · 984 Bytes
/
build.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
#source /opt/xilinx_linux_gnu/environment-setup-zynq-arch-linux-gnu
export LD_LIBRARY_PATH=/ipsec/lib
export PKG_CONFIG_PATH=/ipsec/lib/pkgconfig/
export PKG_CONFIG_LIBDIR=/ipsec/lib/pkgconfig/
USAGE="Usage: $0 Platform (linux/arm) InstallRoot(/tmp/ipsec)"
usage()
{
echo $USAGE
exit
}
system=$1
# --host=arm-hisiv510-linux
if [ -z "$2" ];then
echo $USAGE
exit
fi
if [ ! -d "$2" ]; then
echo "Creating directory $2"
mkdir $2
fi
PREFIX=$2
case $system in
linux )
./configure --prefix=$PREFIX \
--enable-kernel-libipsec \
--enable-gmalg --with-gmalg_interior=yes
;;
arm )
./configure --host=arm-linux --prefix=$PREFIX \
--enable-kernel-libipsec \
--enable-rng
--enable-gmalg --with-gmalg_interior=yes
;;
* )
usage
;;
esac
make clean && make
rm -rf $PREFIX
make install