-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
25 lines (18 loc) · 852 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
app_name = wallhaven-spider
amd64-darwin :
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o $(app_name)-amd64-darwin
tar -czvf $(app_name)-amd64-darwin.tar.gz $(app_name)-amd64-darwin
amd64-linux :
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o $(app_name)-amd64-linux
tar -czvf $(app_name)-amd64-linux.tar.gz $(app_name)-amd64-linux
amd64-windows :
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o $(app_name)-amd64-windows.exe
tar -czvf $(app_name)-amd64-windows.tar.gz $(app_name)-amd64-windows.exe
arm-linux :
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "-s -w" -o $(app_name)-arm-linux
tar -czvf $(app_name)-arm-linux.tar.gz $(app_name)-arm-linux
all : amd64-darwin amd64-linux amd64-windows arm-linux
clean :
rm -f $(app_name)-*
dep :
go get -u && go mod tidy