-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (35 loc) · 962 Bytes
/
Makefile
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
# -pthread \
# -s EXPORTED_FUNCTIONS="['_main', '_demux', '_initTransmux']" \
# -g4 --source-map-base http://localhost:1234/ \
# -s EXTRA_EXPORTED_RUNTIME_METHODS="[cwrap, ccall, getValue, setValue, writeAsciiToMemory]" \
# -pthread \
# -s PROXY_TO_PTHREAD \
# -s PTHREAD_POOL_SIZE=1 \
# -sEXPORT_NAME=worker \
# disable for build
# -g \
# -gsource-map \
# --source-map-base http://localhost:1234/dist/ \
# -s ASSERTIONS=2 \
dist/libav-wasm.js:
mkdir -p dist && \
emcc --bind \
-Oz \
-L/opt/ffmpeg/lib \
-I/opt/ffmpeg/include/ \
-I/tmp/ffmpeg-5.1/ \
-s FILESYSTEM=0 \
-s ENVIRONMENT=web \
-s INITIAL_MEMORY=150mb \
-s TOTAL_MEMORY=125mb \
-s STACK_SIZE=50mb \
-s ALLOW_MEMORY_GROWTH=1 \
-s ASYNCIFY \
-s MODULARIZE=1 \
-g \
-gsource-map \
--source-map-base http://localhost:1234/dist/ \
-s ASSERTIONS=2 \
-lavcodec -lavformat -lavfilter -lavdevice -lswresample -lswscale -lavutil -lm -lx264 \
-o dist/libav.js \
src/main.cpp