mlmym/Makefile

19 lines
376 B
Makefile
Raw Normal View History

2023-07-23 22:19:53 +00:00
.PHONY: dev reload serve VERSION
2023-06-30 19:41:35 +00:00
2023-07-23 22:19:53 +00:00
all: mlmym
2023-06-30 19:41:35 +00:00
2023-07-23 22:19:53 +00:00
mlmym:
go build -v -o mlmym
dev:
$(MAKE) -j2 --no-print-directory reload serve
2023-06-30 19:41:35 +00:00
reload:
2023-07-23 22:19:53 +00:00
websocketd --loglevel=fatal --port=8009 watchexec -e html,css,js -d 500 'echo "$$WATCHEXEC_WRITTEN_PATH"'
2023-06-30 19:41:35 +00:00
2023-07-23 22:19:53 +00:00
VERSION:
git describe --tag > $@
2023-06-30 19:41:35 +00:00
2023-07-23 22:19:53 +00:00
serve: VERSION
DEBUG=true watchexec --no-vcs-ignore -e go -r "go run . --addr 0.0.0.0:8008 -w"