CC=emcc

CFLAGS=-I. -I./glm -I./eigenlib -s TOTAL_MEMORY=536870912  -std=c++11 -s PRECISE_F32=1 -s DEMANGLE_SUPPORT=1 --bind  -s LINKABLE=1 -Os

OBJ = emscripten.cpp image.cpp lineareq_eigen.cpp mesh.cpp mesh_io.cpp solver.cpp

%.bc: %.cpp
	$(CC) -c -o $@ $< $(CFLAGS)

SmoothCpp.js: $(OBJ)
	$(CC) -o ../$@ $^ $(CFLAGS)

clean:
	rm -f *.bc

