-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
23 lines (21 loc) · 842 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
.PHONY: build clean win linux mac mac2
DIST=go-unpkg-downloader
build: clean win linux mac mac2
clean:
rm -rf dist
mkdir -p dist
win:
GOOS=windows GOARCH=amd64 go build -o ./dist/$(DIST).exe main.go
cd dist && 7z a -sdel $(DIST)-win32-x64.zip $(DIST).exe
linux:
GOOS=linux GOARCH=amd64 go build -o ./dist/$(DIST) main.go
cd dist && 7z a -sdel $(DIST)-linux-x64.tar $(DIST)
cd dist && 7z a -sdel $(DIST)-linux-x64.tar.gz $(DIST)-linux-x64.tar
mac:
GOOS=darwin GOARCH=amd64 go build -o ./dist/$(DIST) main.go
cd dist && 7z a -sdel $(DIST)-darwin-x64.tar $(DIST)
cd dist && 7z a -sdel $(DIST)-darwin-x64.tar.gz $(DIST)-darwin-x64.tar
mac2:
GOOS=darwin GOARCH=arm64 go build -o ./dist/$(DIST) main.go
cd dist && 7z a -sdel $(DIST)-darwin-arm64.tar $(DIST)
cd dist && 7z a -sdel $(DIST)-darwin-arm64.tar.gz $(DIST)-darwin-arm64.tar