Add configure and make script
This commit is contained in:
parent
55007cb911
commit
1a4c07b961
4
.gitignore
vendored
4
.gitignore
vendored
@ -13,5 +13,5 @@ build/
|
|||||||
/package.json
|
/package.json
|
||||||
/multiplatform-crypto/src/jsMain/npm/node_modules
|
/multiplatform-crypto/src/jsMain/npm/node_modules
|
||||||
/multiplatform-crypto/src/jsMain/npm/package-lock.json
|
/multiplatform-crypto/src/jsMain/npm/package-lock.json
|
||||||
./sodiumWrapper/include
|
/sodiumWrapper/include/
|
||||||
./sodiumWrapper/lib
|
/sodiumWrapper/lib/
|
||||||
|
27
sodiumWrapper/configure
vendored
Executable file
27
sodiumWrapper/configure
vendored
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
## and then borrowed and slightly modified from https://github.com/datkt/sodium/configure
|
||||||
|
## borrowed from https://github.com/sodium-friends/sodium-native/blob/master/configure
|
||||||
|
PREFIX="${PREFIX:-$PWD}"
|
||||||
|
KONAN="${KONAN:-$HOME/.konan}"
|
||||||
|
ARCH=${ARCH:-$(uname -m)}
|
||||||
|
|
||||||
|
cd libsodium
|
||||||
|
|
||||||
|
./autogen.sh -s -f
|
||||||
|
|
||||||
|
if [ -z "$SYSROOT" ]; then
|
||||||
|
case $(uname -a) in
|
||||||
|
**Linux*x86_64**)
|
||||||
|
GCC=${GCC:-gcc}
|
||||||
|
GCC=gcc
|
||||||
|
;;
|
||||||
|
|
||||||
|
**Darwin*x86_64**)
|
||||||
|
GCC=${GCC:-clang}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
./configure --prefix=$PREFIX "$@"
|
3
sodiumWrapper/makeForKonan.sh
Executable file
3
sodiumWrapper/makeForKonan.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
./configure
|
||||||
|
make -j32 -C libsodium
|
||||||
|
make -j32 -C libsodium install
|
Loading…
x
Reference in New Issue
Block a user