wynnbuilder-forked-for-changes/js/c++/Makefile
hppeng b157f79fc0 Trying things out with emscripten
super inefficient for dev for now; set multiple files to compile separately
into frankenstein js files as I migrate code
2023-04-10 13:08:22 -07:00

17 lines
337 B
Makefile

CXX=emcc
CXXFLAGS=-sENVIRONMENT=web -sSINGLE_FILE -sMODULARIZE -sWASM_ASYNC_COMPILATION=0 -lembind --closure 1
all: utils.js powders.js
%.js: %.cpp
$(CXX) $(CXXFLAGS) -sEXPORT_NAME=create_$* -o $@.out $<
cat $@.out $@.in > ../$@
powders.js: powders.cpp
utils.js: utils.cpp
.PHONY: clean
clean:
rm -f utils.js.out powders.js.out