andlabs/Makefile

30 lines
711 B
Makefile

VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: andlabs.so
andlabs.so:
GO111MODULE=off go build -v -buildmode=plugin -o andlabs.so \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install: clean
go build -v -buildmode=plugin -o ~/go/lib/andlabs-${VERSION}.so \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
cd ~/go/lib && ln -f -s andlabs-${VERSION}.so andlabs.so
clean:
rm -f andlabs andlabs.so
goget:
GO111MODULE="off" go get -v -t -u
goimports:
goimports -w *.go
redomod:
rm -f go.*
goimports -w *.go
GO111MODULE= go mod init
GO111MODULE= go mod tidy