Skip to content

Commit 68b7cf0

Browse files
some changes
1 parent 7e0d2e7 commit 68b7cf0

File tree

8 files changed

+53
-9923
lines changed

8 files changed

+53
-9923
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build
2+
include
3+
lib
24
.git
3-
include/bruter.h
4-
lib/bruter.js
5-
lib/bruter.wasm
5+
.vscode

build.sh

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,57 @@ if [ -n "$WEB" ]; then
88
fi
99

1010
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+
1146
rm -rf bruter
1247
rm include/bruter.h
13-
git clone https://github.com/jardimdanificado/bruter # -b experimental
48+
git clone https://github.com/jardimdanificado/bruter -b experimental
1449
cd bruter
1550
EMCC=emcc ./build.sh
1651
cd ..
17-
rm lib/bruter.js lib/bruter.wasm
52+
rm lib/bruter.js lib/bruter.wasm lib/bruter.o
1853
cp bruter/build/web/bruter.js lib/
1954
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/
2161
rm -rf bruter
2262
fi
2363

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

Comments
 (0)