-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·47 lines (38 loc) · 1.48 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.48 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
#!/usr/bin/env bash
echo "make sure to have prerequisites installed, as described in this repo's README and in Panda3D."
sleep 0.5s
# ---- clone if needed ----
if [ ! -d "panda3d" ]; then
git clone https://github.com/panda3d/panda3d.git panda3d
fi
# ---- if thirdparty deps are present move them into the panda3d repo ----
if [ -d "thirdparty" ]; then
mv thirdparty panda3d/thirdparty
fi
cd panda3d
# ---- toolchain env ----
export CC=afl-clang-fast
export CXX=afl-clang-fast++
export CFLAGS="-g -O1 -fno-omit-frame-pointer"
export CXXFLAGS="-g -O1 -fno-omit-frame-pointer"
# ---- run minimal build ----
if [ -n "${PY_INC+x}" ]; then
python3 makepanda/makepanda.py --nothing --use-direct --use-egg --use-tinydisplay --static --threads $(nproc) \
--python-incdir "$PY_INC" --python-libdir "$PY_LIB" \
--override HAVE_THREADS=UNDEF
else
python3 makepanda/makepanda.py --nothing --use-direct --use-egg --use-tinydisplay --static --threads $(nproc) \
--override HAVE_THREADS=UNDEF
fi
cd ..
mkdir panda3d-built
mkdir panda3d-built/include
mkdir panda3d-built/lib
cp -r panda3d/built/include/* panda3d-built/include/
cp -r panda3d/built/lib/* panda3d-built/lib/
find panda3d/thirdparty -name "*.a" -exec cp {} panda3d-built/lib/ \;
# previously this removed the entire panda3d repo and placed the "built" directory
# where that previously was. This is difficult for debugging,
# so in these early stages I'm just shuffing this around.
mv panda3d panda3d-fullrepo
mv panda3d-built panda3d