1 2NAME := golocal 3OUT := ../dl 4 5clean: 6 rm -f $(OUT)/* 7 8windows: 9 CGO_ENABLED=1 \ 10 GOOS=windows \ 11 GOARCH=amd64 \ 12 CC=x86_64-w64-mingw32-gcc \ 13 go build -o $(OUT)/$(NAME)-windows.exe -ldflags -H=windowsgui . 14 15 16linux: 17 GOOS=linux \ 18 GOARCH=amd64 \ 19 go build -o $(OUT)/$(NAME)-linux . 20 21macos: 22 CGO_ENABLED=1 \ 23 GOOS=darwin \ 24 GOARCH=amd64 \ 25 CC=o64-clang \ 26 go build -o $(OUT)/$(NAME)-macos . 27 28all: clean linux windows macos 29