-
-
Notifications
You must be signed in to change notification settings - Fork 118
/
make_emscripten.sh
executable file
·50 lines (45 loc) · 1.05 KB
/
make_emscripten.sh
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
#!/bin/bash
set -e
rm -rf emscripten/*
mkdir -p emscripten
cmake .
emcc -D "PB_FIELD_16BIT=1" \
-Isrc/ \
-Isrc/cdogs/ \
-Isrc/proto/nanopb/ \
-Isrc/cdogs/enet/include/ \
-Isrc/cdogs/include/ \
-Isrc/tests/ \
src/*.c \
$(find src/cdogs/ -name "*.c") \
src/json/*.c \
src/proto/*.c \
src/proto/nanopb/*.c \
-c \
-O3 \
-s USE_SDL=2 \
-s USE_SDL_IMAGE=2 \
-s USE_SDL_MIXER=2 \
-s SDL2_IMAGE_FORMATS='["png"]' \
-s USE_VORBIS=1 \
-s USE_OGG=1
emcc -O3 \
*.o \
-o emscripten/index.html \
-s USE_SDL=2 \
-s USE_SDL_IMAGE=2 \
-s SDL2_IMAGE_FORMATS='["png"]' \
-s USE_SDL_MIXER=2 \
-s SDL2_MIXER_FORMATS='["ogg"]' \
-lidbfs.js \
-sASYNCIFY \
-sSTACK_SIZE=131072 \
-sINITIAL_MEMORY=128mb \
--preload-file data \
--preload-file doc \
--preload-file dogfights \
--preload-file graphics \
--preload-file missions \
--preload-file music \
--preload-file sounds
cp build/windows/cdogs-icon.ico emscripten/favicon.ico