summaryrefslogtreecommitdiff
path: root/Build/Makefile
blob: 40d6a2e6cc621479bdca3fb946a51cb7149cbc50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
EMCC=emcc
CC=gcc
SOURCEDIR=../WasmAudio
LDFLAGS=-lSDL2 -lSDL2_ttf
EM_LDFALGS=-s USE_SDL=2  -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s LLD_REPORT_UNDEFINED -s USE_GLFW=3

make:
	$(CC) -c $(SOURCEDIR)/main.c -g3

emcc:
	$(EMCC) $(SOURCEDIR)/main.c -s WASM=1 -O3 -o index.js $(EM_LDFALGS) -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]'
	


web:
	darkhttpd ./ --port 12345