-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
36 lines (29 loc) · 701 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
35
36
PLATFORM=local
# Build all files.
build:
@echo "==> Building ./dist/sdm"
env GOOS=linux GOARCH=amd64 go build -o dist/digitalstrom-mqtt-amd64 ./main.go
.PHONY: build
build-arm:
@echo "==> Building ./dist/sdm"
env GOOS=linux GOARCH=arm GOARM=5 go build -o dist/digitalstrom-mqtt-arm ./main.go
.PHONY: build
# Install from source.
install:
@echo "==> Installing digitalstrom-mqtt ${GOPATH}/bin/digitalstrom-mqtt"
go install ./...
.PHONY: install
# Run all tests.
test:
go test -timeout 2m ./... && echo "\n==>\033[32m Ok\033[m\n"
.PHONY: test
.PHONY: docker
docker:
@docker build . --target bin \
--output bin/ \
--platform ${PLATFORM}
# Clean.
clean:
@rm -fr \
dist \
.PHONY: clean