create_lib.sh 683 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. CUR_DIR=$(cd $(dirname $0) && pwd -P)
  5. ROOT_DIR=${CUR_DIR}/../../..
  6. UNAME=$(uname -s|tr A-Z a-z)
  7. WAMR_BUILD_PLATFORM=${WAMR_BUILD_PLATFORM:-${UNAME}}
  8. cd ${ROOT_DIR}/product-mini/platforms/${WAMR_BUILD_PLATFORM}
  9. mkdir -p build && cd build
  10. cmake ..
  11. make -j
  12. case ${UNAME} in
  13. darwin)
  14. LIBNAME=libiwasm.dylib
  15. ;;
  16. *)
  17. LIBNAME=libiwasm.so
  18. ;;
  19. esac
  20. cp ${LIBNAME} ${CUR_DIR}/../src/wamr/libs
  21. cd ${ROOT_DIR}/language-bindings/python/src/wamr/wamrapi
  22. ctypesgen \
  23. ${ROOT_DIR}/core/iwasm/include/wasm_export.h \
  24. -l ../libs/${LIBNAME} \
  25. -o iwasm.py