Files
weave-scope/experimental/Makefile
Alfonso Acosta e7c38a9de2 Simplify build
* Get rid of GO15VENDOREXPERIMENT since it's enabled by default in Go >=1.6,
  just use go 1.6 if you want to build outside the container.
* Stop using unset/env -u, just avoid adding env variables where needed.
* Pass build flags consistently to codecgen.
* Let the experimental/ directory be.
2016-03-12 17:42:40 +00:00

24 lines
559 B
Makefile

.PHONY: all test clean
DIRS=$(shell find . -maxdepth 2 -name *.go | xargs -n1 dirname | sort -u)
TARGETS=$(join $(patsubst %,%/,$(DIRS)),$(patsubst ./%,%,$(DIRS)))
BUILD_IN_CONTAINER=true
RM=--rm
all: $(TARGETS)
ifeq ($(BUILD_IN_CONTAINER),true)
$(TARGETS):
$(SUDO) docker run -ti $(RM) -v $(shell pwd)/../:/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
weaveworks/scope-backend-build -C experimental $@
else
$(TARGETS):
go build -ldflags "-extldflags \"-static\"" -tags netgo -o $@ ./$(@D)
endif
test:
go test ./...
clean:
go clean ./...