From 0383207f72055e8028a1790bc6c03954eff5334f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 16 Nov 2024 00:07:30 -0600 Subject: fix build --- Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cfc2e1b..fadf5c0 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,24 @@ .PHONY: debian +VERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%Y.%m.%d) -all: build debian - # GO111MODULE=off go build -o build main.go +all: build + @echo fixme -build: nocui gocui andlabs +build: + GO111MODULE=off go build \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +verbose: + GO111MODULE=off go build -v -x \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +install: + GO111MODULE=off go install \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +build: goimports: goimports -w *.go -- cgit v1.2.3