From 1f6da03a52a83694fd96bc5680ef18e04eb754fd Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 7 Oct 2021 19:00:08 -0400 Subject: [PATCH] Use INSTALL_NAME_TOOL and OTOOL environment variables in plugin makefile on Mac. --- compile.mk | 2 ++ plugin.mk | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compile.mk b/compile.mk index 457d7a68..73c38aa1 100644 --- a/compile.mk +++ b/compile.mk @@ -6,6 +6,8 @@ include $(RACK_DIR)/arch.mk OBJCOPY ?= objcopy STRIP ?= strip +INSTALL_NAME_TOOL ?= install_name_tool +OTOOL ?= otool # Generate dependency files alongside the object files FLAGS += -MMD -MP diff --git a/plugin.mk b/plugin.mk index cf6b3461..bbacbb1b 100644 --- a/plugin.mk +++ b/plugin.mk @@ -67,9 +67,9 @@ dist: all cp $(TARGET) dist/$(SLUG)/ ifdef ARCH_MAC $(STRIP) -S dist/$(SLUG)/$(TARGET) - install_name_tool -change libRack.dylib @rpath/libRack.dylib dist/$(SLUG)/$(TARGET) - install_name_tool -add_rpath . dist/$(SLUG)/$(TARGET) - otool -L dist/$(SLUG)/$(TARGET) + $(INSTALL_NAME_TOOL) -change libRack.dylib @rpath/libRack.dylib dist/$(SLUG)/$(TARGET) + $(INSTALL_NAME_TOOL) -add_rpath . dist/$(SLUG)/$(TARGET) + $(OTOOL) -L dist/$(SLUG)/$(TARGET) else $(STRIP) -s dist/$(SLUG)/$(TARGET) endif