-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (31 loc) · 895 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
base_sources = ./module/catnip_assert.c ./module/catnip_blockutil.c ./module/catnip_hstring.c ./module/catnip_list.c \
./module/catnip_mem.c ./module/catnip_numconv.c ./module/catnip_runtime.c ./module/catnip_sprite.c ./module/catnip_target.c \
./module/catnip_thread.c ./module/catnip_unicode.c ./module/catnip_util.c ./module/catnip_value.c
catnip_sources = ./module/catnip.c
debug:
clang \
--target=wasm32 \
-O3 \
-flto \
-nostdlib \
-mbulk-memory \
-Wl,--import-memory \
-Wl,--import-table \
-Wl,--no-entry \
-Wl,--lto-O3 \
-o ./public/catnip.wasm \
-D CATNIP_DEBUG \
$(base_sources) $(catnip_sources)
release:
clang \
--target=wasm32 \
-O3 \
-flto \
-nostdlib \
-mbulk-memory \
-Wl,--import-memory \
-Wl,--import-table \
-Wl,--no-entry \
-Wl,--lto-O3 \
-o ./public/catnip.wasm \
$(base_sources) $(catnip_sources)