summaryrefslogtreecommitdiff
path: root/Build/Makefile
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2021-08-26 08:18:35 +0100
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2021-08-26 08:18:35 +0100
commit3834bc793857aae02198d8f4c8a8373957269678 (patch)
tree89d84ea6341795c79d538b53a76866faed00a795 /Build/Makefile
parent12abfa14f5a3b328ddb78620486b40d46fe213ec (diff)
downloadNaiveFFT-3834bc793857aae02198d8f4c8a8373957269678.tar.gz
NaiveFFT-3834bc793857aae02198d8f4c8a8373957269678.zip
Added emcc compilation
Diffstat (limited to 'Build/Makefile')
-rw-r--r--Build/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/Makefile b/Build/Makefile
index 8b31c12..e19df12 100644
--- a/Build/Makefile
+++ b/Build/Makefile
@@ -1,12 +1,17 @@
-
+EMCC=emcc
CC=gcc
SOURCEDIR=../NaiveFFT
LDFLAGS=-lm
+EM_LDFALGS=-s LLD_REPORT_UNDEFINED
+
make:
$(CC) -c $(SOURCEDIR)/main.c -g3
$(CC) main.o -o NaiveFFT $(LDFLAGS)
+emcc:
+ $(EMCC) $(SOURCEDIR)/main.c ../NaiveFFT/fft.c -s WASM=1 -O3 -o index.js $(EM_LDFALGS) -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]'
+
web:
darkhttpd ./ --port 12345