From bdfdf5b2c33e5966d6faaad57fab4749676dd5c8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 6 Dec 2024 01:52:16 -0600 Subject: [PATCH] standard build rules --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8fa7f4e..f095df2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +VERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%Y.%m.%d) + all: goimports plugin #ldd pixelgl.so @@ -6,7 +9,11 @@ plugin: install: rm -f pixelgo.so - go build -v -x -buildmode=plugin -o ~/go/lib/pixelgl.so + go build -v -x -buildmode=plugin -o ~/go/lib/pixelgl-${VERSION}.so + cd ~/go/lib && ln -f -s pixelgl-${VERSION}.so pixelgl.so + +clean: + rm -f pixelgl pixelg..so full-plugin: GO111MODULE=off go build -v -x -buildmode=plugin -o pixelgl.so