summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ab8cb2b..c85cc0d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+.PHONY: build
+
VERSION = $(shell git describe --tags)
GUIVERSION = $(shell git describe --tags)
# BUILDTIME = $(shell date +%Y.%m.%d)
@@ -5,6 +7,8 @@ BUILDTIME = $(shell date +%s)
all: install
+build-all-oses: go-build build-darwin build-windows
+
go-build: goimports
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
@@ -17,6 +21,18 @@ install: goimports
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+build-darwin:
+ GOOS=darwin GOARCH=amd64 GO111MODULE=off go build -v -o wit-darwin.x86 \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+build-darwin-arm64:
+ GOOS=darwin GOARCH=arm64 GO111MODULE=off go build -v -o wit-darwin.arm \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+build-windows:
+ GOOS=windows GOARCH=amd64 GO111MODULE=off go build -v -o wit.exe \
+ -ldflags "-X main.VERSION=v0.7.46 -X main.BUILDTIME=2025.02.22_0643 -X gui.GUIVERSION=v0.7.46"
+
vet:
GO111MODULE=off go vet