Add configure and make script

This commit is contained in:
Ugljesa Jovanovic 2020-05-28 23:02:30 +02:00 committed by Ugljesa Jovanovic
parent 55007cb911
commit 1a4c07b961
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F
3 changed files with 32 additions and 2 deletions

4
.gitignore vendored
View File

@ -13,5 +13,5 @@ build/
/package.json
/multiplatform-crypto/src/jsMain/npm/node_modules
/multiplatform-crypto/src/jsMain/npm/package-lock.json
./sodiumWrapper/include
./sodiumWrapper/lib
/sodiumWrapper/include/
/sodiumWrapper/lib/

27
sodiumWrapper/configure vendored Executable file
View 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
View File

@ -0,0 +1,3 @@
./configure
make -j32 -C libsodium
make -j32 -C libsodium install