forked from Soulghost/iblessing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile-cmake.command
More file actions
executable file
·43 lines (33 loc) · 908 Bytes
/
compile-cmake.command
File metadata and controls
executable file
·43 lines (33 loc) · 908 Bytes
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
35
36
37
38
39
40
41
42
43
#!/bin/bash
# todo: use fakeroot
cd "$(dirname "$0")"
set -xe
cd submodules/capstone
make
cd ../..
cd submodules/unicorn
UNICORN_ARCHS="arm aarch64 x86" ./make.sh
cd ../..
cd submodules/keystone
mkdir -p build
cd build
../make-lib.sh
cd ../../..
cp submodules/capstone/libcapstone.a iblessing/iblessing/vendor/libs/
cp submodules/unicorn/libunicorn.a iblessing/iblessing/vendor/libs/
cp submodules/keystone/build/llvm/lib/libkeystone.a iblessing/iblessing/vendor/libs/
mkdir -p cmake-build
cd cmake-build
if [[ "$OSTYPE" == "darwin"* ]]; then
cmake --clean-first -Diblessing.PLATFORM=macos ../iblessing
else
cmake --clean-first -Diblessing.PLATFORM=linux ../iblessing
fi
cmake --build .
if [[ "$OSTYPE" == "darwin"* ]]; then
mv iblessing iblessing-darwin
else
mv iblessing iblessing-linux
fi
cd ..
echo "[+] iblessing is in cmake-build directory~"