2024-11-14 21:48:44 -06:00
|
|
|
VERSION = $(shell git describe --tags)
|
2024-12-05 19:15:34 -06:00
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
2024-11-14 21:48:44 -06:00
|
|
|
|
2024-12-05 19:15:34 -06:00
|
|
|
all: gocui.so
|
|
|
|
@#ldd gocui.so
|
2024-01-18 00:08:37 -06:00
|
|
|
|
2024-12-05 19:15:34 -06:00
|
|
|
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}"
|
2024-11-14 21:48:44 -06:00
|
|
|
|
2024-12-06 01:51:45 -06:00
|
|
|
install: clean
|
2024-12-05 19:15:34 -06:00
|
|
|
go build -buildmode=plugin -o ~/go/lib/gocui-${VERSION}.so \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
2024-12-06 01:51:45 -06:00
|
|
|
cd ~/go/lib && ln -f -s gocui-${VERSION}.so gocui.so
|
2024-12-01 00:50:07 -06:00
|
|
|
|
2024-11-14 21:48:44 -06:00
|
|
|
# for testing custom golang
|
|
|
|
custom:
|
|
|
|
# GO111MODULE=off go build -v
|
|
|
|
GO111MODULE=off go build -v -work -buildmode=blah
|
2024-01-18 00:08:37 -06:00
|
|
|
|
2024-12-05 19:15:34 -06:00
|
|
|
clean:
|
|
|
|
rm -f gocui gocui.so
|
2024-12-06 01:51:45 -06:00
|
|
|
|
2024-02-05 04:19:32 -06:00
|
|
|
# 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
|
2024-02-01 16:28:05 -06:00
|
|
|
|
2024-01-18 00:08:37 -06:00
|
|
|
objdump:
|
|
|
|
objdump -t ../gocui.so |less
|
|
|
|
|
|
|
|
log:
|
|
|
|
reset
|
|
|
|
tail -f /tmp/witgui.* /tmp/guilogfile
|
|
|
|
|
2024-01-28 02:20:31 -06:00
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
2024-01-18 00:08:37 -06:00
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|