nocui/Makefile

35 lines
939 B
Makefile
Raw Permalink Normal View History

2024-12-01 00:50:20 -06:00
VERSION = $(shell git describe --tags)
2024-12-05 19:15:55 -06:00
BUILDTIME = $(shell date +%Y.%m.%d)
2024-12-01 00:50:20 -06:00
2025-02-14 18:11:19 -06:00
all: goimports nocui
2024-12-05 19:15:55 -06:00
@#ldd nocui.so
2025-02-14 18:11:19 -06:00
nocui:
2024-12-05 19:15:55 -06:00
GO111MODULE=off go build -v -buildmode=plugin -o nocui.so \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2024-12-01 00:50:20 -06:00
2024-12-05 19:15:55 -06:00
install: clean
2024-12-06 01:52:07 -06:00
go build -buildmode=plugin -o ~/go/lib/nocui-${VERSION}.so \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
cd ~/go/lib && ln -f -s nocui-${VERSION}.so nocui.so
2024-12-05 19:15:55 -06:00
clean:
2024-12-06 01:52:07 -06:00
rm -f nocui nocui.so
2024-12-05 19:15:55 -06:00
check-git-clean:
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
# Test the README.md & doc.go file
# this runs pkgsite, the binary that does dev.go.dev
# go install golang.org/x/pkgsite/cmd/pkgsite@latest
pkgsite:
pkgsite
goimports:
goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy