-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (22 loc) · 1.07 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
$(shell mkdir -p builds)
LDFLAGS=-ldflags "-s -w"
all: linux linux-arm linux-aarch64 linux-ppc64le linux-s390x macos-intel macos windows
linux: # default linux amd64
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o builds/eportal-go
linux-arm: # linux 32-bit armv6 for rpi 0/1/2
GOOS=linux GOARCH=arm go build $(LDFLAGS) -o builds/eportal-go-arm
linux-aarch64: # linux aarch64 for rpi 3/4/5, graviton, rk3328 etc.
GOOS=linux GOARCH=arm64 go build $(LDFLAGS) -o builds/eportal-go-aarch64
linux-ppc64le:
GOOS=linux GOARCH=ppc64le go build $(LDFLAGS) -o builds/eportal-go-ppc64le
linux-s390x:
GOOS=linux GOARCH=s390x go build $(LDFLAGS) -o builds/eportal-go-s390x
macos: # default macos aarch64
GOOS=darwin GOARCH=arm64 go build $(LDFLAGS) -o builds/eportal-go-macos
macos-intel: # legacy macos amd64
GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o builds/eportal-go-macos-intel
windows:
GOOS=windows GOARCH=amd64 go build $(LDFLAGS) -o builds/eportal-go.exe
clean:
rm -f builds/*
.PHONY: all clean linux linux-arm linux-aarch64 linux-ppc64le linux-s390x macos macos-intel windows