correct build rules. attempt ldflags VERSION
This commit is contained in:
parent
439c6e3b01
commit
85f3a08238
19
Makefile
19
Makefile
|
@ -1,24 +1,25 @@
|
|||
VERSION = $(shell git describe --tags)
|
||||
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||
|
||||
all: plugin
|
||||
ldd ../gocui.so
|
||||
all: gocui.so
|
||||
@#ldd gocui.so
|
||||
|
||||
plugin:
|
||||
GO111MODULE=off go build -v -work -buildmode=plugin -o gocui.so
|
||||
gocui.so:
|
||||
GO111MODULE=off go build -v -work -buildmode=plugin -o gocui.so \
|
||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||
|
||||
install:
|
||||
rm -f gocui.so
|
||||
go build -buildmode=plugin -o ~/go/lib/gocui-${VERSION}.so
|
||||
go build -buildmode=plugin -o ~/go/lib/gocui-${VERSION}.so \
|
||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||
|
||||
# for testing custom golang
|
||||
custom:
|
||||
# GO111MODULE=off go build -v
|
||||
GO111MODULE=off go build -v -work -buildmode=blah
|
||||
|
||||
official:
|
||||
mkdir -p ~/go/lib/go.wit.com/toolkits/gocui/
|
||||
go build -v -x -buildmode=plugin -o ~/go/lib/go.wit.com/toolkits/gocui/gocui-${VERSION}.so
|
||||
|
||||
clean:
|
||||
rm -f gocui gocui.so
|
||||
# Test the README.md & doc.go file
|
||||
# this runs pkgsite, the binary that does dev.go.dev
|
||||
# go install golang.org/x/pkgsite/cmd/pkgsite@latest
|
||||
|
|
Loading…
Reference in New Issue