forge/Makefile

58 lines
1.5 KiB
Makefile
Raw Normal View History

2024-11-16 00:07:00 -06:00
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
# make build # go build using your git cloned repos (GO111MODULE=off)
# make install # go install using your git cloned repos (GO111MODULE=off)
# make gocui # try the ncurses gui plugin
# make andlabs # try the andlabs gui plugin (uses GTK)
default: install
forge dirty --verbose
2024-12-02 06:59:56 -06:00
vet:
@GO111MODULE=off go vet
@echo this go binary package builds okay
2024-02-16 17:55:53 -06:00
2024-11-16 00:07:00 -06:00
verbose:
GO111MODULE=off go build -v -x \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2025-01-28 11:35:47 -06:00
build: goimports vet plugin
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install: goimports vet plugin
2024-11-16 00:07:00 -06:00
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2025-01-28 11:35:47 -06:00
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
2025-01-28 11:35:47 -06:00
cp ../../toolkits/gocui/gocui.so resources/
2025-01-28 21:50:07 -06:00
andlabs: install
2025-01-28 11:35:47 -06:00
forge --gui andlabs
gocui: install
2025-01-29 07:32:30 -06:00
forge --gui gocui --gui-verbose >/tmp/forge.log 2>&1
goimports:
2025-01-19 02:37:04 -06:00
reset
goimports -w *.go
2024-11-16 00:07:00 -06:00
@# // to globally reset paths:
@# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
clean:
-rm -f forge go.*
# -rm -f ~/go/src/repos.pb
go-mod-clean --purge
2024-12-14 14:09:15 -06:00
identify-protobuf:
autogenpb --identify ~/go/src/repos.pb
2025-01-19 00:35:58 -06:00
devel:
forge clean devel --force --verbose