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

# ----------------------------------------
# Maximilian base stuff
6
7

# POST_JS is all the external js stuff that handles web audio etc
8
9
POST_JS_webAudio_all=src/js/maxi_webAudio_Complete.js
# POST_JS_extras=src/js/maxi_extras.js
10
11

#the .cpp file that is used
12
SOURCE_MAXI=src/cpp/maxi_emscr_new.cpp
13
14

# destination .js file
15
OUTPUT_MAXI=maxiLib/maxiLib.js
16
# OUTPUT_MAXI_noAudio=maxiLib/maxiLib_noWebAudio.js
17
18
19

# ----------------------------------------
# extra libs stuff
20

21
SOURCE_maxiFFT=src/cpp/libs/maxiFFT.cpp
22
23
SOURCE_maxiMFCC=src/cpp/libs/maxiMFCC.cpp
SOURCE_maxiGrains=src/cpp/libs/maxiGrains.cpp
24

25
SOURCES_LIBS = $(SOURCE_maxiFFT) $(SOURCE_maxiMFCC) $(SOURCE_maxiGrains)
26

27
28
29

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

# ----------------------------------------
# Final paths
36
37
full:
	$(EMSCR) $(CFLAGS) --post-js $(POST_JS_webAudio_all) --bind -o $(OUTPUT_MAXI) $(SOURCE_MAXI) $(SOURCES_LIBS)
38

39
40
41
# without webAudio stuff
# basic:
# 	$(EMSCR) $(CFLAGS) --post-js $(POST_JS_extras) --bind -o $(OUTPUT_MAXI_noAudio) $(SOURCE_MAXI) $(SOURCES_LIBS)
42
43

all: full