-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·59 lines (45 loc) · 963 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·59 lines (45 loc) · 963 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
app_name='Pathtracer.app'
executable_name='explore'
shared_flags='
-g -Wall -Wextra -std=c++11 -Wno-missing-field-initializers -Wno-unused-parameter
'
optimalization='-O0'
internal=''
libraries="
-I./libs/assimp/include
./build/$app_name/Contents/Frameworks/libassimp.3.1.1.dylib
-I./libs/stb
-I./libs/glm
-I./libs/base
-F./build/$app_name/Contents/Frameworks
-rpath @executable_path/../Frameworks
"
engine_main="src/main.cpp $libraries"
engine_flags="
-framework SDL2
"
build_engine() {
echo 'Building engine'
echo '=================='
clang++ $engine_main -o build/$app_name/Contents/MacOS/$executable_name $shared_flags $engine_flags $optimalization $internal
}
main() {
release=false
libs=false
for i in "$@"
do
case $i in
-i|--internal)
internal='-DINTERNAL'
;;
-r|--release)
optimalization='-O3'
;;
esac
shift
done
build_engine
}
main $@