From abf9ef9c7275138fd6b8860a06dc4784644030ab Mon Sep 17 00:00:00 2001 From: Gerson Pardo Date: Tue, 8 Aug 2023 21:29:27 -0500 Subject: [PATCH] chore: fixed macos dylib id --- Makefile.darwin | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.darwin b/Makefile.darwin index bfe7f46..2886066 100644 --- a/Makefile.darwin +++ b/Makefile.darwin @@ -4,25 +4,27 @@ DARWIN_TARGET?=10.11 DARWIN_SDKROOT?=$(shell xcrun --sdk macosx --show-sdk-path) binding_darwin: binding_darwin_x86_64 binding_darwin_arm64 - lipo $(DARWIN_BINDING_OUTPUT)/x86_64.dylib $(DARWIN_BINDING_OUTPUT)/arm64.dylib -create -output $(DARWIN_BINDING_OUTPUT)/$(BINDING_NAME).dylib - rm $(DARWIN_BINDING_OUTPUT)/x86_64.dylib $(DARWIN_BINDING_OUTPUT)/arm64.dylib $(DARWIN_BINDING_OUTPUT)/*.h + lipo $(DARWIN_BINDING_OUTPUT)/x86_64/$(BINDING_NAME).dylib $(DARWIN_BINDING_OUTPUT)/arm64/$(BINDING_NAME).dylib -create -output $(DARWIN_BINDING_OUTPUT)/$(BINDING_NAME).dylib + rm -rf $(DARWIN_BINDING_OUTPUT)/x86_64/$(BINDING_NAME).dylib $(DARWIN_BINDING_OUTPUT)/arm64/$(BINDING_NAME).dylib $(DARWIN_BINDING_OUTPUT)/arm64 $(DARWIN_BINDING_OUTPUT)/x86_64 binding_darwin_x86_64: - BINDING_FILE=$(DARWIN_OUTPUT)/x86_64.dylib \ + BINDING_FILE=$(DARWIN_OUTPUT)/x86_64/$(BINDING_NAME).dylib \ BUILD_MODE="c-shared" \ CGO_CFLAGS=-mmacosx-version-min=$(DARWIN_TARGET) \ MACOSX_DEPLOYMENT_TARGET=$(DARWIN_TARGET) \ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 \ make binding + install_name_tool -id @rpath/$(BINDING_NAME).dylib $(DARWIN_BINDING_OUTPUT)/x86_64/$(BINDING_NAME).dylib binding_darwin_arm64: - BINDING_FILE=$(DARWIN_OUTPUT)/arm64.dylib \ + BINDING_FILE=$(DARWIN_OUTPUT)/arm64/$(BINDING_NAME).dylib \ BUILD_MODE="c-shared" \ CGO_CFLAGS=-mmacosx-version-min=$(DARWIN_TARGET) \ MACOSX_DEPLOYMENT_TARGET=$(DARWIN_TARGET) \ GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 \ SDKROOT=$(DARWIN_SDKROOT) \ make binding + install_name_tool -id @rpath/$(BINDING_NAME).dylib $(DARWIN_BINDING_OUTPUT)/arm64/$(BINDING_NAME).dylib binding_darwin_archive_x86_64: BINDING_FILE=$(DARWIN_OUTPUT)/x86_64.a \