-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap
executable file
·90 lines (63 loc) · 1.36 KB
/
bootstrap
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env bash
if [[ "${XCTOOLCHAIN}" = "" ]]; then
XCTOOLCHAIN=XcodeDefault
fi
export XCTOOLCHAIN
set -eux
pushd "$(dirname ${0})"
path=$(pwd)
trap 'rm -rf "${path}/build_deps"' INT TERM HUP
export install_prefix=$(pwd)/build/deps
if [[ -d "${install_prefix}" ]]; then
rm -rf "${install_prefix}"
fi
common_flags="-arch arm64 -arch x86_64 -mmacosx-version-min=10.9"
export CC="xcrun --toolchain ${XCTOOLCHAIN} --sdk macosx clang"
export CXX="xcrun --toolchain ${XCTOOLCHAIN} --sdk macosx clang++"
export CFLAGS="${common_flags} -std=gnu11"
export CXXFLAGS="${common_flags} -std=gnu++14"
export LDFLAGS="-mmacosx-version-min=10.9 -Wl,-rpath,@executable_path/../lib"
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
pushd python3
./build-python3.sh
popd
pushd swig
./build-swig.sh
popd
pushd ncurses
./build-ncurses.sh
popd
pushd libedit
./build-libedit.sh
popd
pushd cmake
./build-cmake.sh
popd
export -n CC
export -n CXX
export -n CFLAGS
export -n CXXFLAGS
export -n LDFLAGS
unset CC
unset CXX
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
export PATH=${install_prefix}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
pushd re2c
./build-re2c.sh
popd
pushd ninja
./build-ninja.sh
popd
pushd tbb
./build-tbb.sh
popd
pushd zstd
./build-zstd.sh
popd
export -n install_prefix
unset install_prefix
popd
export -n XCTOOLCHAIN
unset XCTOOLCHAIN