From 161f3934ceab7943445389daf199ad3901c091e8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Nov 2024 13:30:17 -0600 Subject: update to also embed toolkit plugins in the binary Signed-off-by: Jeff Carr --- Makefile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5527cb2..d7fe64f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,19 @@ +VERSION = $(shell git describe --tags) + all: build - reset + ./gadgetwindow + +build: + -rm -f gadgetwindow + -rm resources/*.so + touch resources/blank.so + -cp -a ~/go/src/go.wit.com/toolkits/*.so resources/ # embed the toolkit plugins in the binary + GO111MODULE=off go build -v -x \ + -ldflags "-X main.VERSION=${VERSION}" + +install: + GO111MODULE=off go install -v -x \ + -ldflags "-X main.VERSION=${VERSION}" ./gadgetwindow nocui: build @@ -18,17 +32,6 @@ debugger: build reset ./gadgetwindow --debugger -build: -ifeq ($(GO111MODULE),) - @echo - @echo In GO, to build here you must export GO111MODULE=off - @echo - @false -else - -rm -f gadgetwindow - go build -v -x -endif - goimports: goimports -w *.go -- cgit v1.2.3