summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
1 files 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)