summaryrefslogtreecommitdiff
path: root/Makefile
blob: f095df28723aa4c5e964d4a7fe21d048457087dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)

all: goimports plugin
	#ldd pixelgl.so

plugin:
	GO111MODULE=off go build -v -x -buildmode=plugin -o pixelgl.so

install:
	rm -f pixelgo.so
	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

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

standalone:
	GO111MODULE=off go build -v -x
	./pixelgl

check-git-clean:
	@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)

# 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