-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild
More file actions
72 lines (54 loc) · 1.23 KB
/
build
File metadata and controls
72 lines (54 loc) · 1.23 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
if [ $# -lt 1 ]; then
echo ""
echo "build [Release | Release32 | Debug | Debug32 | clean]"
echo ""
exit 0
fi
OS=`uname`
VENDER_PATH=`pwd`
OUT_PATH=${VENDER_PATH}/../out
if [ $1 = 'clean' ]; then
if [ -e "out" ]; then
rm -rf "${OUT_PATH}/${OS}_Release"
rm -rf "${OUT_PATH}/${OS}_Debug"
rm -rf "${OUT_PATH}/${OS}_Release32"
rm -rf "${OUT_PATH}/${OS}_Debug32"
fi
exit 0
fi
if [ $1 != 'Release' ] && [ $1 != 'Release32' ] && [ $1 != 'Debug' ] && [ $1 != 'Debug32' ]; then
echo ""
echo "build [Release | Release32 | Debug | Debug32 | clean]"
echo ""
exit 0
fi
if [ ! -e "${OUT_PATH}" ]; then
mkdir "${OUT_PATH}"
fi
if [ ! -e "${OUT_PATH}/${OS}_$1" ]; then
mkdir "${OUT_PATH}/${OS}_$1"
fi
OUT_PATH="${OUT_PATH}/${OS}_$1"
cd ${OUT_PATH}
for lib in exlib expat gumbo gd tiff jpeg png webp zlib leveldb snappy ev pcre sqlite mongo umysql uuid exif winiconv mbedtls v8 unzip
do
if [ ! -e ${lib} ]; then
mkdir ${lib}
fi
cd ${lib}
cmake -DBUILD_TYPE=$1 ${VENDER_PATH}/${lib} > CMake.log
if [ $? != 0 ]; then
exit 1
fi
if [ ! "$BUILD_JOBS" = "" ]; then
sh -c "${BUILD_VERBOSE} make -j${BUILD_JOBS}"
else
sh -c "${BUILD_VERBOSE} make"
fi
if [ $? != 0 ]; then
exit 1
fi
cd ..
done
cd ${VENDER_PATH}