blob: 7ed5ff100974181bdf9ade255f23b03bb984c20e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  | 
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
	./helloworld
build:
	GO111MODULE=off go build \
		-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
verbose:
	GO111MODULE=off go build -v -x -work \
		-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install:
	GO111MODULE=off go install \
		-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
clean:
	-rm -f gadgetwindow
	-rm resources/*.so
	touch resources/blank.so
# embed the toolkit plugins in the binary
embed:
	-rm resources/*.so
	touch resources/blank.so
	-cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
gocui:
	./helloworld --gui gocui
goimports:
	goimports -w *.go
redomod:
	rm -f go.*
	goimports -w *.go
	GO111MODULE= go mod init
	GO111MODULE= go mod tidy
	go mod edit -go=1.20
  |