49 lines
1.1 KiB
Makefile
49 lines
1.1 KiB
Makefile
VERSION = $(shell git describe --tags)
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
|
|
|
all: clean gocui.so
|
|
@#ldd gocui.so
|
|
|
|
gocui.so: view.pb.go goimports
|
|
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: clean
|
|
go build -buildmode=plugin -o ~/go/lib/gocui-${VERSION}.so \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
cd ~/go/lib && ln -f -s gocui-${VERSION}.so gocui.so
|
|
|
|
# for testing custom golang
|
|
custom:
|
|
# GO111MODULE=off go build -v
|
|
GO111MODULE=off go build -v -work -buildmode=blah
|
|
|
|
clean:
|
|
rm -f gocui gocui.so
|
|
rm -f *.pb.go *.patch
|
|
go-mod-clean --purge
|
|
|
|
# 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
|
|
pkgsite:
|
|
pkgsite
|
|
|
|
objdump:
|
|
objdump -t ../gocui.so |less
|
|
|
|
log:
|
|
reset
|
|
tail -f /tmp/witgui.* /tmp/guilogfile
|
|
|
|
goimports:
|
|
goimports -w *.go
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
|
|
view.pb.go: view.proto
|
|
autogenpb --proto view.proto
|