@@ -8,17 +8,57 @@ if [ -n "$WEB" ]; then
8
8
fi
9
9
10
10
if [ -n " $SETUP " ]; then
11
+ rm -rf raylib lib include
12
+ mkdir lib include
13
+ mkdir lib/web
14
+ git clone https://github.com/raysan5/raylib --depth=1
15
+ cd raylib/src
16
+
17
+ if [ -n " $WEB " ]; then
18
+ emcc -c rcore.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2
19
+ emcc -c rshapes.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2
20
+ emcc -c rtextures.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2
21
+ emcc -c rtext.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2
22
+ emcc -c rmodels.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2
23
+ emcc -c utils.c -Os -Wall -DPLATFORM_WEB
24
+ emcc -c raudio.c -Os -Wall -DPLATFORM_WEB
25
+
26
+ emar rcs libraylib.a rcore.o rshapes.o rtextures.o rtext.o rmodels.o utils.o raudio.o
27
+ mv libraylib.a ../../lib/web/
28
+ rm * .o
29
+ fi
30
+
31
+ make clean
32
+ make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC
33
+
34
+ mv libraylib.a ../../lib/
35
+ mv raylib.h ../../include/
36
+ mv raymath.h ../../include/
37
+ mv rlgl.h ../../include/
38
+ mv rcamera.h ../../include/
39
+ mv rgestures.h ../../include/
40
+
41
+ cd ../..
42
+ rm -rf raylib
43
+
44
+
45
+
11
46
rm -rf bruter
12
47
rm include/bruter.h
13
- git clone https://github.com/jardimdanificado/bruter # -b experimental
48
+ git clone https://github.com/jardimdanificado/bruter -b experimental
14
49
cd bruter
15
50
EMCC=emcc ./build.sh
16
51
cd ..
17
- rm lib/bruter.js lib/bruter.wasm
52
+ rm lib/bruter.js lib/bruter.wasm lib/bruter.o
18
53
cp bruter/build/web/bruter.js lib/
19
54
cp bruter/build/web/bruter.wasm lib/
20
- cp bruter/include/bruter.h include/
55
+ cp bruter/build/include/bruter.h include/
56
+ cd bruter
57
+ rm -rf build
58
+ EMCC=emcc WOUT=' bruter.o -r' ./build.sh
59
+ cd ..
60
+ cp bruter/build/web/bruter.o lib/
21
61
rm -rf bruter
22
62
fi
23
63
24
- emcc -o build/index.html src/main.c -Llib -Iinclude $RLPATH -s USE_GLFW=3 -s ASYNCIFY --shell-file src/minshell.html
64
+ emcc -o build/index.html src/main.c lib/bruter.o -Llib -Iinclude $RLPATH -s USE_GLFW=3 -s ASYNCIFY --shell-file src/minshell.html
0 commit comments