-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathliberation
executable file
·34 lines (26 loc) · 929 Bytes
/
liberation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
function help {
echo "Help:"
echo "$0 setup - setup build files"
echo "$0 build - build liberation"
echo "$0 clean - clean project"
}
MODE=$1
echo "This build script is not really meant for public use. It may work, it may not."
if [[ "$MODE" == "build" ]]; then
mkdir build
cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="AArch64;ARM" -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=ios.cmake -DIOS_PLATFORM=OS -DIOS_DEPLOYMENT_TARGET=5.0 -DPYTHON_EXECUTABLE=`which python` -B./build
make -C build
libtool -static lib/* -o lib/libLiberation.a
elif [[ "$MODE" == "clean" ]]; then
make -C build clean
rm -rf build/*
rm -rf lib/*
elif [[ "$MODE" == "setup" ]]; then
git submodule init
git submodule update
elif [[ "$MODE" == "format" ]]; then
echo "not implemented yet. If anyone sees this DM me on twitter"
else
help
fi