30 lines
594 B
Makefile
30 lines
594 B
Makefile
.PHONY: all
|
|
|
|
#OPT_VERBOSE=-v
|
|
OPT_VERBOSE=
|
|
|
|
# Basic go commands
|
|
GOCMD=go
|
|
GOBUILD=$(GOCMD) build
|
|
GOCLEAN=$(GOCMD) clean
|
|
GOTEST=$(GOCMD) test
|
|
GOINSTALL=$(GOCMD) install $(OPT_VERBOSE)
|
|
GOGET=$(GOCMD) get $(OPT_VERBOSE)
|
|
|
|
SRCS := $(wildcard *.go)
|
|
# This is a substitution reference. http://www.gnu.org/software/make/manual/make.html#Substitution-Refs
|
|
BINS := $(SRCS:%.go=bin/%)
|
|
|
|
all: $(BINS)
|
|
|
|
$(BINS) : bin/% : %.go | bin
|
|
@echo "constructing : $@"
|
|
@$(GOBUILD) -o "$@" "$^"
|
|
|
|
clean:
|
|
$(GOCLEAN)
|
|
rm -f ${GOPATH}/bin/$(PROGRAM_NAME)
|
|
|
|
get:
|
|
$(GOGET) github.com/docker/docker-credential-helpers/client
|