Files
dial/Makefile
T
bsncubed 8af44dfcd2 Initial commit: dial — interactive SSH host picker
A fast, read-only ~/.ssh/config picker that exec's the system ssh client.
Includes: static high-contrast picker with recency/frequency/name sort and
tag grouping, `dial keygen` (native ed25519/RSA + optional config entry), and
an optional offline YubiKey launch gate with one-time recovery codes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 23:18:23 +10:00

37 lines
1.0 KiB
Makefile

VERSION ?= 0.1.0
LDFLAGS := -s -w -X main.version=$(VERSION)
GO ?= go
# Release targets: macOS Apple Silicon + Intel, Linux amd64 + arm64, Windows.
PLATFORMS := darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 windows/amd64
.PHONY: build install test vet run dist clean
build: ## Build a native binary into ./bin/dial
$(GO) build -trimpath -ldflags "$(LDFLAGS)" -o bin/dial ./cmd/dial
install: ## Install dial into $GOBIN / $GOPATH/bin
$(GO) install -trimpath -ldflags "$(LDFLAGS)" ./cmd/dial
test: ## Run tests
$(GO) test ./...
vet: ## Run go vet
$(GO) vet ./...
run: build ## Build and run
./bin/dial
dist: ## Cross-compile all release binaries into ./dist
@mkdir -p dist
@for p in $(PLATFORMS); do \
os=$${p%/*}; arch=$${p#*/}; ext=""; \
[ "$$os" = "windows" ] && ext=".exe"; \
echo "building dial-$$os-$$arch$$ext"; \
GOOS=$$os GOARCH=$$arch $(GO) build -trimpath -ldflags "$(LDFLAGS)" \
-o dist/dial-$$os-$$arch$$ext ./cmd/dial || exit 1; \
done
clean: ## Remove build artifacts
rm -rf bin dist