forked from michaelforney/oscmix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (26 loc) · 877 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
.POSIX:
-include ../config.mk
WASM_CC?=clang --target=wasm32-unknown-wasi
WASM_CFLAGS?=-O2 -Wall -Wpedantic
WASM_LDFLAGS?=-mexec-model=reactor
CC=$(WASM_CC)
CFLAGS=$(WASM_CFLAGS)
LDFLAGS=$(WASM_LDFLAGS)
.PHONY: all
all: oscmix.wasm
OBJ=oscmix.o osc.o sysex.o util.o wasm.o device_ffucxii.o
oscmix.o: ../oscmix.c
$(CC) $(CFLAGS) -c -o $@ ../oscmix.c
osc.o: ../osc.c
$(CC) $(CFLAGS) -c -o $@ ../osc.c
sysex.o: ../sysex.c
$(CC) $(CFLAGS) -c -o $@ ../sysex.c
util.o: ../util.c
$(CC) $(CFLAGS) -c -o $@ ../util.c
device_ffucxii.o: ../device_ffucxii.c
$(CC) $(CFLAGS) -c -o $@ ../device_ffucxii.c
oscmix.wasm: $(OBJ) oscmix.imports
$(CC) $(LDFLAGS) -o $@ -Wl,--export=init,--export=handletimer,--export=handlesysex,--export=handleosc,--export=jsdata,--export=jsdatalen -Wl,--allow-undefined-file=oscmix.imports $(OBJ)
.PHONY: clean
clean:
rm -f oscmix.wasm $(OBJ)