29 lines
605 B
Makefile
29 lines
605 B
Makefile
VERSION = $(shell git describe --tags)
|
|
|
|
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}"
|
|
./helloworld
|
|
|
|
install:
|
|
GO111MODULE=off go install -v -x \
|
|
-ldflags "-X main.VERSION=${VERSION}"
|
|
./helloworld
|
|
|
|
gocui:
|
|
GO111MODULE=off go build -v -x
|
|
./helloworld --gui gocui >/tmp/helloworld.stdout 2>&1
|
|
|
|
goimports:
|
|
goimports -w *.go
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
goimports -w *.go
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
|