Makefile 1.06 KB
Newer Older
1
# change '../../em++' to path to em++ in emscriten folder
2 3 4 5
EMSCR=../../em++ 

# ----------------------------------------
# Maximilian base stuff
6 7 8 9 10

# 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
11
SOURCE_MAXI=src/cpp/maxi_emscr_new.cpp
12 13

# destination .js file
14 15 16 17
OUTPUT_MAXI=maxiLib/maxiLib.js

# ----------------------------------------
# extra libs stuff
18

19
SOURCE_maxiFFT=src/cpp/libs/maxiFFT.cpp
20 21
SOURCE_maxiMFCC=src/cpp/libs/maxiMFCC.cpp
SOURCE_maxiGrains=src/cpp/libs/maxiGrains.cpp
22

23
SOURCES_LIBS = $(SOURCE_maxiFFT) $(SOURCE_maxiMFCC) $(SOURCE_maxiGrains)
24

25 26 27

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

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

37
all: maxi