aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-16 08:24:54 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-16 08:24:54 +0200
commit4f98392c9a062e9d4dd8363a2ede9a919ad14006 (patch)
tree6adc4058f1bdc8108c645ef1cbf952f824e1f6be /Makefile
parent69e942371823638fbe24a94202189729f2f17ebc (diff)
downloadkrino-4f98392c9a062e9d4dd8363a2ede9a919ad14006.tar.gz
krino-4f98392c9a062e9d4dd8363a2ede9a919ad14006.zip
gui module: the plan tab's model, with tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 19 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0791c4e..b18e486 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ LDFLAGS = -s -w -X main.version=$(VERSION)
CHECK_VERSION = case '$(VERSION)' in ''|*[!A-Za-z0-9._+-]*) echo "refusing: VERSION must contain only letters, digits, and the characters . - _ +" >&2; exit 1 ;; esac
CROSS_PLATFORMS = linux/amd64 linux/arm64 freebsd/amd64 openbsd/amd64
-.PHONY: all help build install uninstall test vet fmt lint ci bench fuzz race vulncheck cross dist release deps install-hooks clean
+.PHONY: all help build install uninstall test vet fmt lint ci bench fuzz race vulncheck cross dist release deps install-hooks clean gui gui-ci install-gui
all: build
@@ -177,5 +177,22 @@ deps: ## install the optional content extractors; may ask for privileges
install-hooks: ## install the pre-commit hook that runs the leak check
install -m 755 scripts/hooks/pre-commit "$$(git rev-parse --git-path hooks)/pre-commit"
+# The GUI is its own module in gui/, with its own dependencies (gotk4), so
+# krino's dependency gate above is unaffected. It needs cgo, a C compiler,
+# GTK 4 and gobject-introspection development files.
+gui: ## build ./gui/krino-gui (needs GTK 4 development files)
+ @$(CHECK_VERSION)
+ cd gui && CGO_ENABLED=1 go build -trimpath -ldflags "$(LDFLAGS)" -o krino-gui ./cmd/krino-gui
+
+gui-ci: ## the GUI module's gate: gofmt, vet, tests
+ @test -z "$$(cd gui && gofmt -l .)" || { echo "gofmt needed in gui:"; (cd gui && gofmt -l .); exit 1; }
+ cd gui && CGO_ENABLED=1 go vet ./...
+ cd gui && CGO_ENABLED=1 go test ./...
+
+install-gui: gui ## install krino-gui beside krino
+ mkdir -p $(BINDIR)
+ rm -f $(BINDIR)/krino-gui
+ install -m 755 gui/krino-gui $(BINDIR)/krino-gui
+
clean: ## remove build output
- rm -f $(BIN)
+ rm -f $(BIN) gui/krino-gui