-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
31 lines (25 loc) · 878 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
BIN := bin
BIN_NAME := sektron
GOLANG_BIN := go
CGO_ENABLED := 1
GOLANG_OS := linux
GOLANG_ARCH := amd64
GOLANG_BUILD_OPTS += GOOS=$(GOLANG_OS)
GOLANG_BUILD_OPTS += GOARCH=$(GOLANG_ARCH)
GOLANG_BUILD_OPTS += CGO_ENABLED=$(CGO_ENABLED)
GOLANG_LINT := $(BIN)/golangci-lint
ASEQDUMP_BIN := aseqdump -p 14:0 | ts '[%H:%M:%.S]'
ASEQDUMP_NO_CLOCK_OPTS := | grep -v Clock
$(BIN):
mkdir -p $(BIN)
$(GOLANG_LINT): $(BIN)
GOBIN=$$(pwd)/$(BIN) go install github.com/golangci/golangci-lint/cmd/[email protected]
build: $(BIN)
$(GOLANG_BUILD_OPTS) $(GOLANG_BIN) build -o $(BIN)/$(BIN_NAME)
chmod +x $(BIN)/$(BIN_NAME)
checks: $(GOLANG_LINT)
$(GOLANG_LINT) run ./...
monitor-midi:
$(ASEQDUMP_BIN) $(ASEQDUMP_NO_CLOCK_OPTS)
monitor-midi-clock:
$(ASEQDUMP_BIN)