27 lines
631 B
Makefile
27 lines
631 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:
|
|
rm -f andlabs.so
|
|
go build -v -buildmode=plugin -o ~/go/lib/andlabs-${VERSION}.so \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
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
|
|
|