blob: c85c145e63f52d47ef2074c46c40e2ec98b38d15 (
plain)
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
|
#/bin/sh
case $1 in
gnu-linux)
NS=gl EXTENSION=x86_64 CFLAGS='-g1 -Os' make
;;
ms-windows)
NS=w EXTENSION=exe CFLAGS='-g1 -Os -mwindows' CC='x86_64-w64-mingw32-cc' make
;;
leak)
NS=leak CFLAGS='-g -Og -fsanitize=leak -llsan' make
;;
ub)
NS=ub CFLAGS='-g -Og -fsanitize=undefined -lubsan' make
;;
emscripten)
NS=em EXTENSION=js CC='/usr/lib/emscripten/emcc' CFLAGS='-g2 -O2 -sUSE_SDL=2 -sUSE_ZLIB' LDFLAGS='-sASYNCIFY --embed-file out/assets.res@./assets.res' make
;;
em-dbg)
NS=em-dbg EXTENSION=html CC='/usr/lib/emscripten/emcc' CFLAGS='-g2 -O0 -sUSE_SDL=2 -sUSE_ZLIB --memoryprofiler' LDFLAGS='-sASYNCIFY -lidbfs.js --embed-file out/assets.res@./assets.res' make
;;
*)
echo >&2 "dont know how to build '$1'"
exit 1
esac
|