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