File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 11TARGET_EXEC := server
22ENV := CGO_ENABLED=0
33
4+ AT := ""
5+
6+ ifeq ($(OS ) ,Windows_NT)
7+ ENV := SET ${ENV}
8+ AT := &
9+ endif
10+
411.PHONY : all changelog clean install build
512
613all : clean install build-linux build-linux-arm64 build-osx build-win
@@ -15,13 +22,13 @@ install: clean
1522 go install -ldflags=" -s -w" -trimpath ./cmd/iocgo
1623
1724build-linux :
18- ${ENV} GOARCH=amd64 GOOS=linux go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/linux/${TARGET_EXEC} -trimpath main.go
25+ ${ENV} GOARCH=amd64 GOOS=linux ${AT} go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/linux/${TARGET_EXEC} -trimpath main.go
1926
2027build-linux-arm64 :
21- ${ENV} GOARCH=arm64 GOOS=linux go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/linux/${TARGET_EXEC} -arm64 -trimpath main.go
28+ ${ENV} GOARCH=arm64 GOOS=linux ${AT} go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/linux/${TARGET_EXEC} -arm64 -trimpath main.go
2229
2330build-osx :
24- ${ENV} GOARCH=amd64 GOOS=darwin go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/osx/${TARGET_EXEC} -trimpath main.go
31+ ${ENV} GOARCH=amd64 GOOS=darwin ${AT} go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/osx/${TARGET_EXEC} -trimpath main.go
2532
2633build-win :
27- ${ENV} GOARCH=amd64 GOOS=windows go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/windows/${TARGET_EXEC} .exe -trimpath main.go
34+ ${ENV} GOARCH=amd64 GOOS=windows ${AT} go build -toolexec iocgo $(argv ) -ldflags=" -s -w" -o bin/windows/${TARGET_EXEC} .exe -trimpath main.go
You can’t perform that action at this time.
0 commit comments