summaryrefslogtreecommitdiffstats
path: root/sms-service/src/sms/Makefile
blob: 137fe4004aa76a4a528ecbb56e80153cb4244da9 (plain)
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
GOPATH := $(shell realpath "$(CURDIR)/../../")
BINARY := sms
PLATFORM := linux

export GOPATH ...
export GO111MODULE=on

all: test build
deploy: test build

build: clean
	CGO_ENABLED=0 GOOS=$(PLATFORM) go build -a \
	-ldflags '-extldflags "-static"' \
	-o $(GOPATH)/target/$(BINARY) -v sms.go

clean:
	go clean
	rm -f $(GOPATH)/target/$(BINARY)

test:
	go test -cover ./...

format:
	go fmt ./...

.PHONY: test