Reenable mac and try better windows detection

This commit is contained in:
Arnaud 2025-10-15 08:30:01 +02:00
parent afd7d2fc62
commit 2a4864cc4e
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 14 additions and 12 deletions

View File

@ -20,10 +20,10 @@ jobs:
name: linux
lib_ext: so
# - os: macos-latest
# lib_ext: so
# name: macos
# cpu: arm64
- os: macos-latest
lib_ext: so
name: macos
cpu: arm64
- os: windows-latest
cpu: amd64

View File

@ -4,15 +4,17 @@ LIBS_DIR := $(abspath ./libs)
UNAME_S := $(shell uname -s)
# Flags for CGO to find the headers and the shared library
ifeq ($(UNAME_S),Darwin)
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
# ifeq ($(UNAME_S),Darwin)
# 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
CGO_CFLAGS := -I$(LIBS_DIR)
CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
ifeq ($(OS),windows)
ifeq ($(OS),Windows_NT)
BIN_NAME := example.exe
else
BIN_NAME := example