2024-12-06 01:52:16 -06:00
|
|
|
VERSION = $(shell git describe --tags)
|
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
|
|
|
|
2024-12-05 18:49:47 -06:00
|
|
|
all: goimports plugin
|
|
|
|
#ldd pixelgl.so
|
2024-02-19 07:16:10 -06:00
|
|
|
|
2024-02-19 08:10:21 -06:00
|
|
|
plugin:
|
2024-12-05 18:49:47 -06:00
|
|
|
GO111MODULE=off go build -v -x -buildmode=plugin -o pixelgl.so
|
2024-02-19 07:16:10 -06:00
|
|
|
|
2024-12-04 03:15:42 -06:00
|
|
|
install:
|
2024-12-05 18:49:47 -06:00
|
|
|
rm -f pixelgo.so
|
2024-12-06 01:52:16 -06:00
|
|
|
go build -v -x -buildmode=plugin -o ~/go/lib/pixelgl-${VERSION}.so
|
|
|
|
cd ~/go/lib && ln -f -s pixelgl-${VERSION}.so pixelgl.so
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f pixelgl pixelg..so
|
2024-12-04 03:15:42 -06:00
|
|
|
|
2024-12-05 12:38:07 -06:00
|
|
|
full-plugin:
|
|
|
|
GO111MODULE=off go build -v -x -buildmode=plugin -o pixelgl.so
|
|
|
|
|
|
|
|
full-install:
|
|
|
|
GO111MODULE=off go build -v -x -buildmode=plugin -o pixelgl.so
|
|
|
|
|
2024-02-19 08:10:21 -06:00
|
|
|
standalone:
|
2024-12-05 18:49:47 -06:00
|
|
|
GO111MODULE=off go build -v -x
|
|
|
|
./pixelgl
|
2024-02-19 07:16:10 -06:00
|
|
|
|
2024-02-19 08:10:21 -06:00
|
|
|
check-git-clean:
|
|
|
|
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
|
2024-02-19 07:16:10 -06:00
|
|
|
|
2024-02-19 08:10:21 -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
|
|
|
|
|
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|