lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 2f5295990bf5869f6f761e43921a594fa4cfffe4
parent 5b554aa495b336cb3439ac0e5aec20ae70c23eb8
Author: Sean Enck <sean@ttypty.com>
Date:   Fri, 15 Mar 2024 18:28:54 -0400

allow easier GOOS/GOARCH build settings

Diffstat:
MMakefile | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -3,6 +3,8 @@ TARGET := $(BUILD)lb VERSION ?= $(shell git log -n 1 --format=%h) VARS := LOCKBOX_ENV=none DESTDIR := /usr/local/bin +GOOS := +GOARCH := all: $(TARGET) @@ -12,7 +14,7 @@ $(TARGET): cmd/main.go internal/**/*.go go.* internal/app/doc/* ifeq ($(VERSION),) $(error version not set) endif - go build $(GOFLAGS) -ldflags "-X main.version=$(VERSION)" -o $@ cmd/main.go + GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(GOFLAGS) -ldflags "-X main.version=$(VERSION)" -o $@ cmd/main.go unittests: $(VARS) go test ./...