From 4a36e0300b6933c94a7f0e556949f993f4ba6b41 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 5 Dec 2024 19:15:55 -0600 Subject: clean build rules --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 22bd64d..cfb0524 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,19 @@ VERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%Y.%m.%d) -all: plugin - ldd ../nocui.so +all:nocui.so + @#ldd nocui.so -plugin: - GO111MODULE=off go build -buildmode=plugin -o nocui.so +nocui.so: + GO111MODULE=off go build -v -buildmode=plugin -o nocui.so \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" -install: - rm -f nocui.so +install: clean go build -buildmode=plugin -o ~/go/lib/nocui-${VERSION}.so +clean: + rm -f nocui.so + check-git-clean: @git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1) -- cgit v1.2.3