--- makefile.orig	2024-10-03 22:59:48.000000000 -0500
+++ makefile	2024-10-23 17:41:58.000000000 -0500
@@ -94,7 +94,7 @@
 
 DEBUG_FLAGS		= -ggdb3 -fno-omit-frame-pointer -Og
 
-CFLAGS			= -c -D__UNIX__ -DNDEBUG -I.
+CFLAGS			+= -c -D__UNIX__ -DNDEBUG -I.
 CFLAGS_DEBUG	= -c -D__UNIX__ -I. -g -Og
 CFLAGS_DEBUGGCC	= -c -D__UNIX__ -I. $(DEBUG_FLAGS)
 
@@ -592,6 +592,8 @@
 	if [ -f "$(DYLIBNAME)" ] ; then \
 		cp "$(DYLIBNAME)" "$(DESTDIR)$(PATH_LIB)" ; \
 		chmod 755 "$(DESTDIR)$(PATH_LIB)/$(DYLIBNAME)" ; \
+		ln -s "$(DYLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).$(MAJ).dylib" ; \
+		ln -s "$(DYLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).dylib" ; \
 	fi
 	cp cryptlib.h "$(DESTDIR)$(PATH_INCLUDE)"
 	chmod 644 "$(DESTDIR)$(PATH_INCLUDE)/cryptlib.h"
@@ -1829,8 +1831,9 @@
 				fi
 
 $(DYLIBNAME):	$(OBJS) $(EXTRAOBJS) $(TESTOBJS)
-				@$(LD) -dynamiclib -compatibility_version $(MAJ).$(MIN) \
+				$(LD) $(LDFLAGS) -dynamiclib -compatibility_version $(MAJ).$(MIN) \
 					-current_version $(MAJ).$(MIN).$(PLV) \
+					-install_name $(PATH_LIB)/$(DYLIBNAME) \
 					`./tools/getlibs.sh $(LD) $(OSNAME)` \
 					-o $(DYLIBNAME) $(OBJS) $(EXTRAOBJS)
 
