diff --git a/Makefile b/Makefile index e34b5e83d..e14899faf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,14 @@ export CGO_ENABLED := 1 include Makefile.Inc +# Set the correct extension for the executable based on the OS +# and set the correct ulimit command for the OS +ifeq ($(OS),Windows_NT) + EXE := .exe +else + ULIMIT := ulimit -n 4096; +endif + GOLANGCI_LINT_VERSION := v1.59.0 GOTESTSUM_VERSION := v1.12.0 MOCKGEN_VERSION := v0.4.0 diff --git a/Makefile.Inc b/Makefile.Inc index b80a9fe61..1ea1bcd5d 100644 --- a/Makefile.Inc +++ b/Makefile.Inc @@ -28,7 +28,6 @@ endif ifeq ($(GOOS),windows) platform := windows export PATH := $(PATH):$(PROJ_DIR)build - EXE := .exe CGO_LDFLAGS := $(CGO_LDFLAGS) -Wl,-Bstatic -lpthread -Wl,-Bdynamic else TEMP := /tmp @@ -39,7 +38,6 @@ else platform := macos endif CGO_LDFLAGS := $(CGO_LDFLAGS) -Wl,-rpath,@loader_path - ULIMIT := ulimit -n 9999; else ifeq ($(GOARCH),arm64) platform := linux-arm64