agent mac: move from common

Windows agent has been moved from common to core,
so for consistency move mac agent too.

Since agent and agent-enabled client depend on jsoncpp,
also move jsoncpp build scripts.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
This commit is contained in:
Lev Stipakov
2021-05-27 15:37:32 +03:00
committed by David Sommerseth
parent 0ad1bfecc0
commit d31620d0c6
12 changed files with 925 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
if [ "$1" = "args" ]; then
echo " JSON=1 -- build with JsonCpp library"
elif [ "$1" = "deps" ]; then
# JsonCpp
if [ "$JSON" = "1" ]; then
CPPFLAGS="$CPPFLAGS $(pkg-config --cflags jsoncpp) -DHAVE_JSONCPP"
EXTRA_SRC_OBJ="$EXTRA_SRC_OBJ $(pkg-config --libs jsoncpp)"
fi
fi

View File

@@ -5,7 +5,7 @@ if [ -z "$O3" ]; then
echo O3 var must point to ovpn3 tree ; exit 1
fi
cd $DEP_DIR
rm -rf asio* boost* lz4* lzo* minicrypto openssl* polarssl* mbedtls* snappy*
rm -rf asio* boost* lz4* lzo* minicrypto openssl* polarssl* mbedtls* snappy* jsoncpp*
echo "******* ASIO"
$O3/core/deps/asio/build-asio
@@ -33,6 +33,9 @@ $O3/core/scripts/mac/build-lz4
echo "******* xxHash"
$O3/core/deps/xxHash/build-xxHash
echo "******* JSONCPP"
$O3/core/scripts/mac/build-jsoncpp
#echo "******* MINICRYPTO"
#$O3/core/scripts/mac/build-minicrypto

28
scripts/mac/build-jsoncpp Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -e
if [ -z "$O3" ]; then
echo O3 var must point to ovpn3 tree
exit 1
fi
if [ -z "$DEP_DIR" ]; then
echo DEP_DIR var must point to ovpn3 dependency tree
exit 1
fi
cd $DEP_DIR
rm -rf jsoncpp
mkdir jsoncpp
if [ "$OSX_ONLY" != "1" ]; then
for target in ios ios-dbg iossim iossim-dbg ; do
echo '***************' TARGET $target
TARGET=$target $O3/core/deps/jsoncpp/build-jsoncpp
done
fi
for target in osx osx-dbg ; do
echo '***************' TARGET $target
TARGET=$target $O3/core/deps/jsoncpp/build-jsoncpp
done
exit 0