summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-07 13:30:17 -0600
committerJeff Carr <[email protected]>2024-11-07 13:30:17 -0600
commit161f3934ceab7943445389daf199ad3901c091e8 (patch)
treeffa77b7304ed745589506f6cb1d4d6baf0f331c4 /Makefile
parentbc01313a04ddb0cfe5eae72a0e04995765a53c84 (diff)
update to also embed toolkit plugins in the binaryv0.21.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 15 insertions, 12 deletions
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