From 12eb3b68ff55c5bf7d04d0d084a57cb87b8467e9 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <paulmc@fmrib.ox.ac.uk>
Date: Wed, 16 Dec 2020 19:29:32 +0000
Subject: [PATCH] MNT: Shared lib dependencies must be specified when compiling
 a shared lib on macOS

---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b1fae70..b39bd2f 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ include ${FSLCONFDIR}/default.mk
 
 PROJNAME = miscmaths
 SOFILES  = libfsl-miscmaths.so
+LIBS     = -lfsl-utils -lfsl-cprob 
 OBJS     = miscmaths.o optimise.o miscprob.o kernel.o histogram.o \
            base2z.o t2z.o f2z.o minimize.o cspline.o sparse_matrix.o \
            sparsefn.o rungekutta.o nonlin.o bfmatrix.o Simplex.o \
@@ -12,4 +13,4 @@ OBJS     = miscmaths.o optimise.o miscprob.o kernel.o histogram.o \
 all: libfsl-miscmaths.so
 
 libfsl-miscmaths.so: ${OBJS}
-	$(CXX) $(CXXFLAGS) -shared -o $@ $^
+	$(CXX) $(CXXFLAGS) -shared -o $@ $^ ${LDFLAGS}
-- 
GitLab