fix build
This commit is contained in:
parent
af99bd179c
commit
0a38ebfd47
36
Makefile
36
Makefile
|
@ -1,21 +1,34 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
all:
|
all: build
|
||||||
-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}"
|
|
||||||
./helloworld
|
./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 \
|
||||||
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
GO111MODULE=off go install -v -x \
|
GO111MODULE=off go install \
|
||||||
-ldflags "-X main.VERSION=${VERSION}"
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
./helloworld
|
|
||||||
|
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:
|
gocui:
|
||||||
GO111MODULE=off go build -v -x
|
./helloworld --gui gocui
|
||||||
./helloworld --gui gocui >/tmp/helloworld.stdout 2>&1
|
|
||||||
|
|
||||||
goimports:
|
goimports:
|
||||||
goimports -w *.go
|
goimports -w *.go
|
||||||
|
@ -25,4 +38,3 @@ redomod:
|
||||||
goimports -w *.go
|
goimports -w *.go
|
||||||
GO111MODULE= go mod init
|
GO111MODULE= go mod init
|
||||||
GO111MODULE= go mod tidy
|
GO111MODULE= go mod tidy
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue