andlabs/Makefile

30 lines
712 B
Makefile
Raw Normal View History

2024-12-01 00:49:52 -06:00
VERSION = $(shell git describe --tags)
2024-12-05 19:08:29 -06:00
BUILDTIME = $(shell date +%Y.%m.%d)
2024-12-01 00:49:52 -06:00
2024-12-05 19:08:29 -06:00
all: andlabs.so
2024-12-05 19:08:29 -06:00
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}"
2024-12-06 01:50:45 -06:00
install: clean
2024-12-05 19:08:29 -06:00
go build -v -buildmode=plugin -o ~/go/lib/andlabs-${VERSION}.so \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2024-12-06 01:50:45 -06:00
cd ~/go/lib && ln -f -s andlabs-${VERSION}.so andlabs.so
clean:
2025-01-09 21:16:04 -06:00
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