ipfs-cluster/cmd/ipfs-cluster-ctl/Makefile
Hector Sanjuan c80a207e41 Fix #1012: Trim paths on Makefile builds
This results in more reproduceable builds.

Additionally, sources command to list all go-files and not just those
one directory below.
2020-03-06 14:49:19 +01:00

20 lines
388 B
Makefile

# go source files
SRC := $(shell find ../.. -type f -name '*.go')
GOPATH := $(shell go env GOPATH)
GOFLAGS := "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
all: ipfs-cluster-ctl
ipfs-cluster-ctl: $(SRC)
go build $(GOFLAGS) -mod=readonly
build: ipfs-cluster-ctl
install:
go install $(GOFLAGS)
clean:
rm -f ipfs-cluster-ctl
.PHONY: clean install build