Skip to content
Snippets Groups Projects
Makefile 1 KiB
Newer Older
# change '../../em++' to path to em++ in emscriten folder
EMSCR=../../em++ 

# ----------------------------------------
# Maximilian base stuff

# POST_JS is all the external js stuff that handles web audio etc
POST_JS=src/js/maxi_webAudio.js

#the .cpp file that is used
SOURCE_MAXI=src/cpp/maxi_emscr_new.cpp
OUTPUT_MAXI=maxiLib/maxiLib.js

# ----------------------------------------
# extra libs stuff
SOURCE_maxiFFT=src/cpp/libs/maxiFFT.cpp

# destination for maxiFFT from when I didn't know better
# OUTPUT_maxiFFT=maxiLib/libs/maxiLib_maxiFFT.js

# ----------------------------------------
# General flags
# https://kripken.github.io/emscripten-site/docs/tools_reference/emcc.html
# -s DEMANGLE_SUPPORT=1 
CFLAGS=-O3 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=1 --memory-init-file 0 --profiling 

# ----------------------------------------
# Final paths
maxi:
	$(EMSCR) $(CFLAGS) --post-js $(POST_JS) --bind -o $(OUTPUT_MAXI) $(SOURCE_MAXI) $(SOURCE_maxiFFT)