From 06e8a70d23905904a5c2756daad2956407022e75 Mon Sep 17 00:00:00 2001 From: Matteo Cafasso Date: Wed, 6 Sep 2023 00:18:02 +0300 Subject: [PATCH] Makefile: finalize OSX fixes Signed-off-by: Matteo Cafasso --- .github/workflows/action.yml | 1 + Makefile | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 4dfc54e..0b8a358 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -81,6 +81,7 @@ jobs: - name: Repair wheels run: | for whl in dist/*.whl; do + echo $whl delocate-wheel -v "$whl" done - name: Store build artifacts diff --git a/Makefile b/Makefile index bc71027..52aa6b4 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ MAKEFILE_NAME ?= makefile SHARED_INCLUDE_DIR ?= /usr/local/include SHARED_LIBRARY_DIR ?= /usr/local/lib TARGET_ARCH ?= $(shell uname -m) -OS_LDLIBS_PATH ?= /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib +LINUX_LDLIBS ?= -lm -lrt +OSX_LDLIBS ?= -lm -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib # platform detection PLATFORM = $(shell uname -s) @@ -23,14 +24,14 @@ ifeq ($(PLATFORM),Darwin) # macOS clips: clips_source $(MAKE) -f $(MAKEFILE_NAME) -C clips_source \ CFLAGS="-std=c99 -O3 -fno-strict-aliasing -fPIC" \ - LDLIBS="-lm -L$(OS_LDLIBS_PATH)" - ld clips_source/*.o -dylib -lm -L$(OS_LDLIBS_PATH) -arch $(TARGET_ARCH) \ + LDLIBS=$(OSX_LDLIBS) + ld clips_source/*.o -dylib $(OSX_LDLIBS) -arch $(TARGET_ARCH) \ -o clips_source/libclips.so else clips: clips_source $(MAKE) -f $(MAKEFILE_NAME) -C clips_source \ CFLAGS="-std=c99 -O3 -fno-strict-aliasing -fPIC" \ - LDLIBS="-lm -lrt" + LDLIBS=$(LINUX_LDLIBS) ld -G clips_source/*.o -o clips_source/libclips.so endif