summaryrefslogtreecommitdiff
path: root/Build/Makefile
blob: 06076fb9d5d62b6a3d336ab417d2bc4687866c1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
EMCC=emcc
CC=gcc
SOURCEDIR=../NaiveFFT
LDFLAGS=-lm
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
	$(CC) -c $(SOURCEDIR)/fft.c -g3
	$(CC) main.o fft.o -o NaiveFFT $(LDFLAGS)

#https://github.com/emscripten-core/emscripten/issues/6882 no malloc
emcc:
	$(EMCC) $(SOURCEDIR)/main.c $(SOURCEDIR)/fft.c -s WASM=1 -O0 -o index.js $(EM_LDFALGS) -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]'

	
web:
	darkhttpd ./ --port 12345