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)
|
VERSION = $(shell git describe --tags)
|
||||||
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
all: plugin
|
all: gocui.so
|
||||||
ldd ../gocui.so
|
@#ldd gocui.so
|
||||||
|
|
||||||
plugin:
|
gocui.so:
|
||||||
GO111MODULE=off go build -v -work -buildmode=plugin -o 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:
|
install:
|
||||||
rm -f gocui.so
|
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
|
# for testing custom golang
|
||||||
custom:
|
custom:
|
||||||
# GO111MODULE=off go build -v
|
# GO111MODULE=off go build -v
|
||||||
GO111MODULE=off go build -v -work -buildmode=blah
|
GO111MODULE=off go build -v -work -buildmode=blah
|
||||||
|
|
||||||
official:
|
clean:
|
||||||
mkdir -p ~/go/lib/go.wit.com/toolkits/gocui/
|
rm -f gocui gocui.so
|
||||||
go build -v -x -buildmode=plugin -o ~/go/lib/go.wit.com/toolkits/gocui/gocui-${VERSION}.so
|
|
||||||
|
|
||||||
# Test the README.md & doc.go file
|
# Test the README.md & doc.go file
|
||||||
# this runs pkgsite, the binary that does dev.go.dev
|
# this runs pkgsite, the binary that does dev.go.dev
|
||||||
# go install golang.org/x/pkgsite/cmd/pkgsite@latest
|
# go install golang.org/x/pkgsite/cmd/pkgsite@latest
|
||||||
|
|
Loading…
Reference in New Issue