Add -sINCOMING_MODULE_JS_API because in newer Emscripten -sSTRICT
empties it. Remove -sMODULARIZE because -sEXPORT_ES6 implies it. Add
-O2 since the compiled code will probably be run more than once. Pass
standard compiler flags to emcc. Build bedstead.js in all-web, and
remove it in clean.
all: $(DISTFILES)
.PHONY: all-web
-all-web: all sample.png extended.png icon-16.png icon-32.png icon-64.png
+all-web: all sample.png extended.png icon-16.png icon-32.png icon-64.png \
+ bedstead.js
.PHONY: experimental
experimental: bedstead-chiseltip.otf bedstead-plotter-thin.otf \
bedstead-complement.pdf: bedstead-complement.ps bedstead.otf Fontmap
ps2pdf -P $< $@
+EMCCFLAGS = -O2 -sEXPORT_ES6 -sEXIT_RUNTIME -sSTRICT \
+ -sINCOMING_MODULE_JS_API='["arguments","print"]'
+EMCCFLAGS += $(CWARNFLAGS)
%.js: %.c
- emcc -sMODULARIZE -sEXPORT_ES6 -sEXIT_RUNTIME=1 -sSTRICT -o $@ $<
+ emcc $(EMCCFLAGS) -o $@ $<
.PHONY: clean
clean:
- rm -f bedstead *.ttx *.otf *.bdf *.bdf.ps *.png *.pdf \
+ rm -f bedstead *.ttx *.otf *.bdf *.bdf.ps *.png *.pdf *.js *.wasm \
bedstead-complement.ps
.PHONY: install-user