-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (19 loc) · 1015 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
CC = clang
TARGET = parser.wasm
SRC = src/engine/wasmMain.c src/engine/parser.c src/engine/tokenize.c src/engine/utils.c src/engine/serializer.c
INCLUDES = -I./
WASM_FLAGS = -DWASM --target=wasm32 -nostdlib -Wl,--no-entry -Wl,--export-all -Wl,--allow-undefined -Wl,-z,stack-size=8388608 -msimd128 -mbulk-memory -mmultivalue
LINUX_FLAGS = -DLINUX
DEBUG_FLAGS = -g -O0
RELEASE_FLAGS = -O2
.PHONY: all debug release
debug: $(SRC)
$(CC) $(WASM_FLAGS) $(DEBUG_FLAGS) -o src/deserializers/javascript/$(TARGET) src/engine/wasmMain.c $(INCLUDES)
node src/deserializers/javascript/inliner.js parser.wasm
release: $(SRC)
$(CC) $(WASM_FLAGS) $(RELEASE_FLAGS) -o src/deserializers/javascript/$(TARGET) src/engine/wasmMain.c $(INCLUDES)
node src/deserializers/javascript/inliner.js parser.wasm
linux: $(SRC)
$(CC) $(LINUX_FLAGS) $(DEBUG_FLAGS) -lm -o build/parser src/engine/linuxMain.c $(INCLUDES)
linux_release: $(SRC)
$(CC) $(LINUX_FLAGS) $(RELEASE_FLAGS) -lm -g -o build/parser src/engine/linuxMain.c $(INCLUDES)