-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (18 loc) · 924 Bytes
/
Makefile
File metadata and controls
27 lines (18 loc) · 924 Bytes
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
VERSION=$(shell git describe --tags --always)
LD_FLAGS=-s -w -X main.version=$(VERSION)
OUTPUT_DIR=build
.PHONY: all test windows_x64 linux_x64 linux_static_x64 linux_static_arm64
default: all
test:
go test --cover -v ./pkg/xspf/ ./internal/router/
windows_x64:
GOOS=windows GOARCH=amd64 go build -v -o $(OUTPUT_DIR)/xplay_$(VERSION)_$@.exe -ldflags="$(LD_FLAGS)" -trimpath ./cmd/xplay
linux_x64:
GOOS=linux GOARCH=amd64 go build -v -o $(OUTPUT_DIR)/xplay_$(VERSION)_$@ -ldflags="$(LD_FLAGS)" -trimpath ./cmd/xplay
linux_static_x64:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o $(OUTPUT_DIR)/xplay_$(VERSION)_$@ -ldflags="$(LD_FLAGS)" -trimpath ./cmd/xplay
linux_static_arm64:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -o $(OUTPUT_DIR)/xplay_$(VERSION)_$@ -ldflags="$(LD_FLAGS)" -trimpath ./cmd/xplay
all: windows_x64 linux_x64 linux_static_x64 linux_static_arm64
clean:
rm -f $(OUTPUT_DIR)/*