summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-21 10:52:40 -0500
committerJeff Carr <[email protected]>2025-08-21 10:52:40 -0500
commitad39cfacbdc142c130ebef0b662ec007677e2acd (patch)
treefd94e039e068bfe967296f4e70abc889815634d5 /Makefile
day1v0.0.1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fd99b44
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+VERSION = $(shell git describe --tags)
+BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
+
+default: verbose
+
+vet:
+ @GO111MODULE=off go vet
+ @echo this go binary package builds okay
+
+verbose: goimports vet plugin
+ GO111MODULE=off go install -v -x \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+build: goimports vet plugin
+ GO111MODULE=off go build -v -x \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+install: goimports vet plugin
+ GO111MODULE=off go install \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+install-raw: goimports vet plugin
+ go install \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+plugin:
+ rm -f resources/*.so
+ # -cp ../../toolkits/gocui/gocui.so resources/
+
+andlabs: clean install
+ gemini --gui gocui --gui-verbose --gui-file ../../toolkits/andlabs/andlabs.so
+
+gocui: install
+ gemini --gui gocui --gui-verbose --gui-file ../../toolkits/gocui/gocui.so >/tmp/gemini.log 2>&1
+
+goimports:
+ reset
+ goimports -w *.go
+ @# // to globally reset paths:
+ @# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
+
+clean:
+ -rm -f gemini go.*
+ go-mod-clean purge
+
+identify-protobuf:
+ autogenpb --identify ~/.gemini/gemini.pb