BlockColor-Engine/build/iOS/deps/leveldb.sh

27 lines
667 B
Bash
Raw Permalink Normal View History

2016-11-05 23:14:22 +01:00
#!/bin/bash -e
2017-04-19 21:47:56 +02:00
. sdk.sh
2017-04-03 17:32:36 +02:00
LEVELDB_VERSION=1.20
2016-11-05 23:14:22 +01:00
if [ ! -d leveldb-src ]; then
wget https://github.com/google/leveldb/archive/v$LEVELDB_VERSION.tar.gz
tar -xzvf v$LEVELDB_VERSION.tar.gz
mv leveldb-$LEVELDB_VERSION leveldb-src
rm v$LEVELDB_VERSION.tar.gz
fi
cd leveldb-src
# prevent Makefile from fiddling with our flags
sed -i .old 's|^ifeq.*IOS.*|ifeq (0, 1)|g' Makefile
CC="$IOS_CC $IOS_FLAGS" CXX="$IOS_CC $IOS_FLAGS" \
TARGET_OS=IOS \
make -j$(sysctl -n hw.ncpu) out-static/libleveldb.a
[ -d ../leveldb ] && rm -r ../leveldb
mkdir -p ../leveldb/lib
cp -r include/ ../leveldb/include
cp out-static/libleveldb.a ../leveldb/lib
echo "leveldb build successful"