-
Notifications
You must be signed in to change notification settings - Fork 3
/
capstone-build.sh
executable file
·38 lines (30 loc) · 980 Bytes
/
capstone-build.sh
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
#!/bin/sh
echo "${ACTION}"
if [ "${ACTION}" = "clean" ]; then
echo "Cleaning Libraries..."
rm -fd "${BUILD_DIR}/Universal/*"
rm -fd ${CONFIGURATION_BUILD_DIR}/libcapstone-64.a
#rm -fd ${CONFIGURATION_BUILD_DIR}/libcapstone-32.a
cd ./${PROJECT_NAME}
make clean
fi
if [ "${ACTION}" = "build" ] || [ "${ACTION}" = "" ]; then
cd ./${PROJECT_NAME}
mkdir -p ${CONFIGURATION_BUILD_DIR}
if [ ! -f ${CONFIGURATION_BUILD_DIR}/libcapstone.a ]; then
echo "Building capstone for x86_64"
./make.sh
mv libcapstone.a ${CONFIGURATION_BUILD_DIR}/libcapstone.a
make clean
fi
# if [ ! -f ${CONFIGURATION_BUILD_DIR}/libcapstone-32.a ]; then
# echo "Building capstone for i386"
# ./make.sh nix32
# mv libcapstone.a ${CONFIGURATION_BUILD_DIR}/libcapstone-32.a
# make clean
# fi
# echo "Creating fat binary"
# cd ${BUILD_DIR}/Universal
# lipo -create ${CONFIGURATION_BUILD_DIR}/libcapstone-64.a ${CONFIGURATION_BUILD_DIR}/libcapstone-32.a -o libcapstone.a
echo "Complete"
fi