-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (18 loc) · 684 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (18 loc) · 684 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
28
GOBUILD = CGO_ENABLED=0 go build -trimpath -ldflags '-w -s' -o cacao
default: cacao
all: linux-amd64 linux-arm64 linux-armv7 freebsd-amd64 windows-amd64
frontend:
cd frontend && npm run build || (npm install && npm run build)
cacao: frontend
$(GOBUILD)
linux-amd64: frontend
GOOS=linux GOARCH=amd64 $(GOBUILD)-$@
linux-arm64: frontend
GOOS=linux GOARCH=arm64 $(GOBUILD)-$@
linux-armv7: frontend
GOOS=linux GOARCH=arm GOARM=7 $(GOBUILD)-$@
freebsd-amd64: frontend
GOOS=freebsd GOARCH=amd64 $(GOBUILD)-$@
windows-amd64: frontend
GOOS=windows GOARCH=amd64 $(GOBUILD)-$@
.PHONY: default all frontend cacao linux-amd64 linux-arm64 linux-armv7 freebsd-amd64 windows-amd64