-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (21 loc) · 798 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
.PHONY: build build-mac-arm64 build-mac-amd64 build-linux-amd64 build-win-amd64
MAIN_SRC = ./src/
OUTPUT_SRC = ./bin/letovo
# build for current OS
build:
go build -o $(OUTPUT_SRC) $(MAIN_SRC)
# build for windows AMD64
build-win-amd64:
env GOOS=windows GOARCH=amd64 CGO_ENABLED="1" CC="x86_64-w64-mingw32-gcc" go build -o $(OUTPUT_SRC).exe $(MAIN_SRC)
# build for macOS ARM64
build-mac-arm64:
env GOOS=darwin GOARCH=arm64 go build -o $(OUTPUT_SRC) $(MAIN_SRC)
# build for macOS AMD64
build-mac-amd64:
env GOOS=darwin GOARCH=amd64 go build -o $(OUTPUT_SRC) $(MAIN_SRC)
# build for linux AMD64
build-linux-amd64:
env GOOS=linux GOARCH=amd64 go build -o $(OUTPUT_SRC) $(MAIN_SRC)
# build for linux ARM64
build-linux-arm64:
env GOOS=linux GOARCH=arm64 go build -o $(OUTPUT_SRC) $(MAIN_SRC)