summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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