blob: 9e28dc298608be8a6051542596c8de006c92c93d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
.PHONY: all build-binaries clean
all: build-binaries
BUILD_DIR=bin
VERSION=$(shell git describe --tag --always --dirty)
BUILD_DATE ?= $(shell TZ=UTC0 date +%Y-%m-%dT%H:%M:%SZ)
PKG:=github.com/fcuny/world
BINARIES = bin/x509-info bin/flake-info
ALL_BINARIES = $(foreach binary, $(BINARIES), ./$(binary))
bin/%:
go build -o $@ \
-ldflags "-X $(PKG)/internal/version.Version=${VERSION} -X $(PKG)/internal/version.BuildDate=${BUILD_DATE}" \
-trimpath ./cmd/$(subst -,,$*)
build-binaries: $(ALL_BINARIES)
clean:
rm -rf bin/
|