From 17b42553b267eaf789be97206b8ab16ca20b12cc Mon Sep 17 00:00:00 2001 From: Harvey Fong Date: Sun, 4 Jan 2026 03:04:48 +0000 Subject: [PATCH] fixed DPP version detection and fallback --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ede3989..29e4059 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,12 @@ PLATFORM = $(shell uname) BUILD_TYPE ?= release# Default to release build if not specified # Version configuration (can be overridden) -DPP_VERSION ?= $(shell find ../DPP/build/library -name "libdpp.so.*.*.*" -type f | head -1 | sed 's/.*libdpp\.so\.//') -DPP_VERSION := $(or $(DPP_VERSION),10.1.4)# Fallback version if auto-detection fails +ifeq ($(PLATFORM), Darwin) + DPP_VERSION ?= $(shell find ../DPP/build/library -name "libdpp.*.dylib" -type f | head -1 | sed 's/.*libdpp\.//;s/\.dylib//') +else + DPP_VERSION ?= $(shell find ../DPP/build/library -name "libdpp.so.*.*.*" -type f | head -1 | sed 's/.*libdpp\.so\.//') +endif +DPP_VERSION := $(or $(DPP_VERSION),10.1.5)# Fallback version if auto-detection fails # Common paths DPP_PATH = ../DPP @@ -106,6 +110,8 @@ ifeq ($(PLATFORM), Darwin) @install_name_tool -change ../libssl/libssl.4.dylib @executable_path/libssl.dylib $(OUTPUT_FILE); \ install_name_tool -change ../libssl/libcrypto.4.dylib @executable_path/libcrypto.dylib $(OUTPUT_FILE); \ cp ../libssl/libssl.dylib ../libssl/libcrypto.dylib $(BIN_DIR)/ + @# Fix library paths in copied OpenSSL libraries + @install_name_tool -change /usr/local/lib/libcrypto.4.dylib @executable_path/libcrypto.dylib $(BIN_DIR)/libssl.dylib else @# Linux: Handle versioned libraries (follow standard convention) @if [ -f $(DPP_BUILD_DIR)/$(DPP_VERSIONED_FILE) ]; then \ @@ -162,3 +168,4 @@ cleanall: rmdir bin 2>/dev/null || true +