Try to fix macos

This commit is contained in:
Arnaud 2025-10-15 08:15:06 +02:00
parent d2bf07db24
commit c1de77fe8e
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F

View File

@ -1,9 +1,16 @@
# Destination folder for the downloaded libraries # Destination folder for the downloaded libraries
LIBS_DIR := $(abspath ./libs) LIBS_DIR := $(abspath ./libs)
UNAME_S := $(shell uname -s)
# Flags for CGO to find the headers and the shared library # Flags for CGO to find the headers and the shared library
CGO_CFLAGS := -I$(LIBS_DIR) ifeq ($(UNAME_S),Darwin)
CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR) CGO_CFLAGS := -I$(LIBS_DIR)
CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,@executable_path/./libs
else
CGO_CFLAGS := -I$(LIBS_DIR)
CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
endif
# Configuration for fetching the right binary # Configuration for fetching the right binary
OS ?= "linux" OS ?= "linux"