You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

47 lines
1.3 KiB

if [ -f "${PREFIX}/bin/pEp-mini-json-adapter" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "JSON_SERVER_ADAPTER_VERSION")
PEP_JSON_ADAPTER_DIR="${TMP_DIR}/pEpJSONServerAdapter"
if [ ! -d "${PEP_JSON_ADAPTER_DIR}" ]; then
git clone -b ${VERSION} https://gitea.pep.foundation/pEp.foundation/pEpJSONServerAdapter.git
fi
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH}"
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH} -stdlib=libc++"
export LDFLAGS="-arch ${ARCH}"
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c14"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
pushd "${PEP_JSON_ADAPTER_DIR}/server"
LOCAL_CONF="\n
\n
NDEBUG=yes\n
\n
DEBUG=${BUILD_FOR_DEBUG}\n
\n
PREFIX=${CURRENT_LIB_DIR}\n
\n
PEP_INCLUDE=${PREFIX}/include\n
\n
PEP_LIB_PATH=${PREFIX}/lib\n
\n
LIBRARY_PATH=${PREFIX}/lib\n
\n
BOOST_MT=\n
"
echo ${LOCAL_CONF} > local.conf
make clean
make
popd
unset CXXFLAGS
unset CXX
unset LDFLAGS
unset CFLAGS
unset CC
# Copy Artefact
cp pEpJSONServerAdapter/server/pEp-mini-json-adapter "${CURRENT_LIB_DIR}/bin/"