From: Fabian Fichter Date: Fri, 2 Jul 2021 08:06:24 +0000 (+0200) Subject: Update js makefile X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=7231c780cc86325636ab01765b33fe3a3cdaf94a;p=fairystockfish.git Update js makefile --- diff --git a/src/Makefile_js b/src/Makefile_js index 0d67211..3cf9f50 100644 --- a/src/Makefile_js +++ b/src/Makefile_js @@ -53,6 +53,24 @@ ifeq ($(es6),yes) CXXFLAGS += -s ENVIRONMENT='web,worker' -s EXPORT_ES6=1 -s MODULARIZE=1 -s USE_ES6_IMPORT_META=0 endif +.PHONY: help objclean clean build deps test serve + +help: + @echo "" + @echo "To compile ffishjs, type: " + @echo "" + @echo "make -f Makefile_js build" + @echo "" + @echo "Supported targets:" + @echo "" + @echo "help > Display this help" + @echo "build > Standard build" + @echo "clean > Clean up" + @echo "deps > Install runtime dependencies using npm" + @echo "test > Run tests" + @echo "serve > Run example server" + @echo "" + objclean: @rm -f $(EXE) *.o ./syzygy/*.o ./nnue/*.o ./nnue/features/*.o @@ -60,3 +78,12 @@ clean: objclean build: $(CXX) $(CXXFLAGS) $(SRCS) -o $(EXE) + +deps: + cd ../tests/js && npm install + +test: deps + cd ../tests/js && npm test + +serve: deps + cd ../tests/js && node index.js