-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
35 lines (24 loc) · 1.12 KB
/
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
VERSION := $(shell git describe --tags)
LD_FLAGS := -ldflags="-X 'main.Version=$(VERSION)'"
SRC := ./cmd/lady
BIN := build/fpvc-lady
clean:
@rm -rf build
@mkdir -p build
build-darwin-amd64:
GOOS=darwin GOARCH=amd64 go build $(LD_FLAGS) -o build/fpvc-lady-darwin-amd64-$(VERSION) $(SRC)
build-windows-386:
GOOS=windows GOARCH=386 go build $(LD_FLAGS) -o build/fpvc-lady-windows-386-$(VERSION).exe $(SRC)
build-windows-amd64:
GOOS=windows GOARCH=amd64 go build $(LD_FLAGS) -o build/fpvc-lady-windows-amd64-$(VERSION).exe $(SRC)
build-linux-386:
GOOS=linux GOARCH=386 go build $(LD_FLAGS) -o build/fpvc-lady-linux-386-$(VERSION) $(SRC)
build-linux-amd64:
GOOS=linux GOARCH=amd64 go build $(LD_FLAGS) -o build/fpvc-lady-linux-amd64-$(VERSION) $(SRC)
build-linux-arm:
GOOS=linux GOARCH=arm go build $(LD_FLAGS) -o build/fpvc-lady-linux-arm-$(VERSION) $(SRC)
build-linux-arm64:
GOOS=linux GOARCH=arm64 go build $(LD_FLAGS) -o build/fpvc-lady-linux-arm64-$(VERSION) $(SRC)
build: clean build-darwin-amd64 build-windows-386 build-windows-amd64 build-linux-386 build-linux-amd64 build-linux-arm build-linux-arm64
run:
go run $(SRC)