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.

46 lines
1.3 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. if [ -f "${PREFIX}/bin/pEp-mini-json-adapter" ]; then
  2. echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
  3. exit 0
  4. fi
  5. VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "JSON_SERVER_ADAPTER_VERSION")
  6. PEP_JSON_ADAPTER_DIR="${TMP_DIR}/pEpJSONServerAdapter"
  7. if [ ! -d "${PEP_JSON_ADAPTER_DIR}" ]; then
  8. git clone -b ${VERSION} https://gitea.pep.foundation/pEp.foundation/pEpJSONServerAdapter.git
  9. fi
  10. export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH}"
  11. export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH} -stdlib=libc++"
  12. export LDFLAGS="-arch ${ARCH}"
  13. export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c14"
  14. export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
  15. pushd "${PEP_JSON_ADAPTER_DIR}/server"
  16. LOCAL_CONF="\n
  17. \n
  18. NDEBUG=yes\n
  19. \n
  20. DEBUG=${BUILD_FOR_DEBUG}\n
  21. \n
  22. PREFIX=${CURRENT_LIB_DIR}\n
  23. \n
  24. PEP_INCLUDE=${PREFIX}/include\n
  25. \n
  26. PEP_LIB_PATH=${PREFIX}/lib\n
  27. \n
  28. LIBRARY_PATH=${PREFIX}/lib\n
  29. \n
  30. BOOST_MT=\n
  31. "
  32. echo ${LOCAL_CONF} > local.conf
  33. make clean
  34. make
  35. popd
  36. unset CXXFLAGS
  37. unset CXX
  38. unset LDFLAGS
  39. unset CFLAGS
  40. unset CC
  41. # Copy Artefact
  42. cp pEpJSONServerAdapter/server/pEp-mini-json-adapter "${CURRENT_LIB_DIR}/bin/"