aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ba8688c..f5018eb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,24 @@
-LECTIO := lectio
-LECTIO_UI := lectio-ui
+LECTIO := lectio
+LECTIO_UI := lectio-ui
+LECTIO_WEB := lectio-web
PREFIX ?= $(HOME)/.local
BINDIR := $(PREFIX)/bin
.PHONY: help build install uninstall test vet fmt clean cross
help: ## show this help
@grep -hE '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed -E 's/:.*## /\t/' | sort
-build: ## build ./lectio and ./lectio-ui
+build: ## build ./lectio, ./lectio-ui and ./lectio-web
go build -o $(LECTIO) ./cmd/lectio
go build -o $(LECTIO_UI) ./cmd/lectio-ui
-install: ## build and install both to $(BINDIR)
+ go build -o $(LECTIO_WEB) ./cmd/lectio-web
+install: ## build and install all three to $(BINDIR)
@mkdir -p $(BINDIR)
go build -o $(BINDIR)/$(LECTIO) ./cmd/lectio
go build -o $(BINDIR)/$(LECTIO_UI) ./cmd/lectio-ui
- @echo "installed $(BINDIR)/$(LECTIO) and $(BINDIR)/$(LECTIO_UI)"
+ go build -o $(BINDIR)/$(LECTIO_WEB) ./cmd/lectio-web
+ @echo "installed $(BINDIR)/$(LECTIO), $(BINDIR)/$(LECTIO_UI) and $(BINDIR)/$(LECTIO_WEB)"
uninstall: ## remove installed binaries
- rm -f $(BINDIR)/$(LECTIO) $(BINDIR)/$(LECTIO_UI)
+ rm -f $(BINDIR)/$(LECTIO) $(BINDIR)/$(LECTIO_UI) $(BINDIR)/$(LECTIO_WEB)
test: ## run tests
go test ./...
vet: ## go vet
@@ -23,7 +26,7 @@ vet: ## go vet
fmt: ## gofmt the tree
gofmt -w .
clean: ## remove build artifacts
- rm -f $(LECTIO) $(LECTIO_UI); rm -rf dist
+ rm -f $(LECTIO) $(LECTIO_UI) $(LECTIO_WEB); rm -rf dist
cross: ## cross-compile into dist/
@mkdir -p dist
@for t in linux/amd64 linux/arm64 darwin/arm64 darwin/amd64 windows/amd64; do \
@@ -31,4 +34,5 @@ cross: ## cross-compile into dist/
echo " $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch go build -o dist/$(LECTIO)-$$os-$$arch$$ext ./cmd/lectio; \
GOOS=$$os GOARCH=$$arch go build -o dist/$(LECTIO_UI)-$$os-$$arch$$ext ./cmd/lectio-ui; \
+ GOOS=$$os GOARCH=$$arch go build -o dist/$(LECTIO_WEB)-$$os-$$arch$$ext ./cmd/lectio-web; \
done