File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121all : build test
2222
2323build : clean
24+ MACOSX_DEPLOYMENT_TARGET=$(shell sw_vers -productVersion 2>/dev/null || echo "15.0") \
25+ CGO_CFLAGS=" -mmacosx-version-min=$( shell sw_vers -productVersion 2> /dev/null || echo 15.0) " \
26+ CGO_LDFLAGS=" -mmacosx-version-min=$( shell sw_vers -productVersion 2> /dev/null || echo 15.0) " \
2427 $(GO ) build -ldflags=" -s -w" -o $(BINARY_NAME )$(BINARY_EXT ) main.go
2528 @echo " Installing $( BINARY_NAME) to $( INSTALL_DIR) ..."
2629 @mkdir -p $(INSTALL_DIR )
@@ -31,6 +34,9 @@ build-linux:
3134 GOOS=linux GOARCH=amd64 $(GO ) build -o $(BINARY_NAME ) _linux main.go
3235
3336build-darwin :
37+ MACOSX_DEPLOYMENT_TARGET=$(shell sw_vers -productVersion 2>/dev/null || echo "15.0") \
38+ CGO_CFLAGS=" -mmacosx-version-min=$( shell sw_vers -productVersion 2> /dev/null || echo 15.0) " \
39+ CGO_LDFLAGS=" -mmacosx-version-min=$( shell sw_vers -productVersion 2> /dev/null || echo 15.0) " \
3440 GOOS=darwin GOARCH=amd64 $(GO ) build -o $(BINARY_NAME ) _darwin main.go
3541
3642test :
You can’t perform that action at this time.
0 commit comments