improve makefile

This commit is contained in:
2026-07-15 23:25:54 +00:00
parent 33db3c15b8
commit 159b08a7ca
+10 -5
View File
@@ -1,20 +1,25 @@
.PHONY: build test clean wfa-js .PHONY: build test clean wfa-js
build: clean wfa-js build: clean build-wfa-js
@echo "======================== Building Binary =======================" @echo "======================== Building Binary ======================="
mkdir -p dist mkdir -p dist
# resolve symbolic links in web by copying it into dist/web/ # resolve symbolic links in web by copying it into dist/web/
cp -rL web/ dist/web/ cp -rL web/ dist/web/
CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ . CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ .
wfa-js: build-wfa-js:
$(MAKE) -C WFA-JS $(MAKE) -C WFA-JS
cp -f WFA-JS/dist/* web/modules cp -f WFA-JS/dist/* web/modules
test: clean test: clean test-wfa-js
go run .
clean: test-wfa-js:
$(MAKE) test -C WFA-JS
clean: clean-wfa-js
@echo "======================== Cleaning Project ======================" @echo "======================== Cleaning Project ======================"
go clean go clean
rm -rf dist/* rm -rf dist/*
clean-wfa-js:
$(MAKE) clean -C WFA-JS