2018-02-07 19:02:18 +01:00
|
|
|
GO ?= go
|
|
|
|
|
2018-09-07 15:16:20 +02:00
|
|
|
install-dev-deps:
|
|
|
|
@$(GO) get -u github.com/golang/dep/...
|
|
|
|
@$(GO) get golang.org/x/tools/cmd/cover
|
|
|
|
@$(GO) get github.com/mattn/goveralls
|
|
|
|
|
2018-02-07 19:02:18 +01:00
|
|
|
build:
|
2018-05-11 11:21:34 +02:00
|
|
|
@echo "Building dist/ooni"
|
2018-03-22 15:58:10 +01:00
|
|
|
@$(GO) build -i -o dist/ooni cmd/ooni/main.go
|
2018-02-07 19:02:18 +01:00
|
|
|
.PHONY: build
|
2018-02-12 17:29:03 +01:00
|
|
|
|
2018-05-11 11:21:34 +02:00
|
|
|
build-windows:
|
|
|
|
@echo "Building dist/ooni.exe"
|
|
|
|
CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 CGO_ENABLED=1 go build -o dist/ooni.exe -x cmd/ooni/main.go
|
|
|
|
|
2018-09-26 15:16:26 +02:00
|
|
|
build-all: build build-windows
|
|
|
|
.PHONY: build-all
|
|
|
|
|
2018-09-11 12:39:47 +02:00
|
|
|
download-mk-libs:
|
2018-05-31 08:00:42 +02:00
|
|
|
@echo "updating mk-libs"
|
2018-09-11 12:39:47 +02:00
|
|
|
@cd vendor/github.com/measurement-kit/go-measurement-kit && ./download-libs.sh
|
|
|
|
download-mk-libs-macos:
|
|
|
|
@echo "updating mk-libs"
|
|
|
|
@cd vendor/github.com/measurement-kit/go-measurement-kit && ./download-libs.sh macos
|
|
|
|
.PHONY: update-mk-libs-macos
|
2018-03-23 12:41:06 +01:00
|
|
|
|
2018-02-12 17:29:03 +01:00
|
|
|
bindata:
|
2018-03-08 20:34:30 +01:00
|
|
|
@$(GO) run vendor/github.com/shuLhan/go-bindata/go-bindata/*.go \
|
2018-02-12 17:29:03 +01:00
|
|
|
-nometadata \
|
|
|
|
-o internal/bindata/bindata.go -pkg bindata \
|
2018-02-12 17:30:27 +01:00
|
|
|
data/...;
|
2018-09-06 16:13:04 +02:00
|
|
|
|
|
|
|
test-internal:
|
|
|
|
@$(GO) test -v ./internal/...
|
|
|
|
|
2018-02-12 17:29:03 +01:00
|
|
|
.PHONY: bindata
|