diff --git a/Makefile b/Makefile index 43178052626..6c2acbcb1e6 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,14 @@ LDFLAGS = -ldflags "$(C_LDFLAGS)" include Makefile-libs.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 + UNIT_TESTS ?= $(shell go list ./... | grep -v systest/tests | grep -v genvm/cmd) export CGO_ENABLED := 1 diff --git a/Makefile-libs.Inc b/Makefile-libs.Inc index aa3c7139a8f..b1fd2ecf45f 100644 --- a/Makefile-libs.Inc +++ b/Makefile-libs.Inc @@ -27,7 +27,6 @@ ifeq ($(GOOS),windows) platform := windows export PATH := $(PATH):$(BIN_DIR) CGO_LDFLAGS := $(CGO_LDFLAGS) -Wl,-Bstatic -lpthread -Wl,-Bdynamic - EXE := .exe else TEMP := /tmp ifeq ($(GOOS),darwin) @@ -37,7 +36,6 @@ else platform := macos endif CGO_LDFLAGS := $(CGO_LDFLAGS) -Wl,-rpath,@loader_path - ULIMIT := ulimit -n 9999; else ifeq ($(GOARCH),arm64) platform := linux-arm64