-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
30 lines (27 loc) · 960 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This Makefile is meant to be used by people that do not usually work
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.
.PHONY: all clean test
GOBIN = build/bin
OS = $(shell uname)
ifeq ($(OS), Linux)
endif
ifeq ($(OS), Darwin)
endif
all:
mkdir -p $(GOBIN)
go build -v -o $(GOBIN)/torrent cmd/torrent/*.go
go build -v -o $(GOBIN)/torrent-create cmd/torrent-create/*.go
go build -v -o $(GOBIN)/torrent-magnet cmd/torrent-magnet/*.go
go build -v -o $(GOBIN)/seeding cmd/seeding/*.go
go build -v -o $(GOBIN)/server cmd/server/*.go
go build -v -o $(GOBIN)/pack-blocklist cmd/pack-blocklist/*.go
clean:
go clean -cache
rm -rf $(GOBIN)/*
rm -rf workspace/test-torrent
rm -rf mnt
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "*/generated/*" | xargs gofmt -w -s
test: format
go test ./... -v -race -cpu=1,2,4 -coverprofile=coverage.txt -covermode=atomic