Skip to content

Commit

Permalink
Cleanup Makefiles (#6352)
Browse files Browse the repository at this point in the history
## Motivation

Follow up for #6351: variables used in the makefile should be defined where they are used if possible. Specifically I moved `EXE` and `ULIMIT` from `Makefile-libs.Inc` to `Makefile`.
  • Loading branch information
fasmat committed Sep 25, 2024
1 parent 47c115b commit 1febe8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Makefile-libs.Inc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 1febe8b

Please sign in to comment.