# change '../../em++' to path to em++ in emscripten folder EMSCR=../../em++ # ---------------------------------------- # Maximilian base stuff # POST_JS is all the external js stuff that handles web audio etc POST_JS_webAudio_all=src/js/maxi_webAudio.js # POST_JS_extras=src/js/maxi_extras.js #the .cpp file that is used SOURCE_MAXI=src/cpp/maxi_emscr_new.cpp # destination .js file OUTPUT_MAXI=maxiLib/maxiLib.js # OUTPUT_MAXI_noAudio=maxiLib/maxiLib_noWebAudio.js # ---------------------------------------- # extra libs stuff SOURCE_maxiFFT=src/cpp/libs/maxiFFT.cpp SOURCE_maxiMFCC=src/cpp/libs/maxiMFCC.cpp SOURCE_maxiGrains=src/cpp/libs/maxiGrains.cpp SOURCES_LIBS = $(SOURCE_maxiFFT) $(SOURCE_maxiMFCC) $(SOURCE_maxiGrains) # ---------------------------------------- # 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 full: $(EMSCR) $(CFLAGS) --post-js $(POST_JS_webAudio_all) --bind -o $(OUTPUT_MAXI) $(SOURCE_MAXI) $(SOURCES_LIBS) # without webAudio stuff # basic: # $(EMSCR) $(CFLAGS) --post-js $(POST_JS_extras) --bind -o $(OUTPUT_MAXI_noAudio) $(SOURCE_MAXI) $(SOURCES_LIBS) all: full