-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
34 lines (26 loc) · 837 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
31
32
33
34
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOTEST=$(GOCMD) test
GOLIST=$(GOCMD) list
GOFMT=$(GOCMD) fmt
GOVET=$(GOCMD) vet
all: unit build
.PHONY: unit
unit: ## @testing Run the unit tests
$(GOFMT) ./...
$(GOVET) ./smgp/...
$(GOTEST) -race -coverprofile=coverage.txt -covermode=atomic $(shell go list ./smgp/...)
.PHONY: build
build:
$(GOBUILD) -o ./bin/transmitter ./cmd/transmitter
$(GOBUILD) -o ./bin/receiver ./cmd/receiver
$(GOBUILD) -o ./bin/mockserver ./cmd/mockserver
.PHONY: build_linux
build_linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GOBUILD) -o ./bin/transmitter ./cmd/transmitter
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GOBUILD) -o ./bin/receiver ./cmd/receiver
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GOBUILD) -o ./bin/mockserver ./cmd/mockserver
.PHONY: clean
clean:
rm -rf ./bin/ coverage.txt