--- Makefile.orig	2005-04-25 13:58:19.000000000 -0700
+++ Makefile	2005-09-06 13:30:06.000000000 -0700
@@ -28,12 +28,12 @@
 DIRMADE = $(ARCH)-made
 
 LIB = $(ARCH)/libfbopenssl.a
-SLIB = $(ARCH)/libfbopenssl.so
+SLIB = $(ARCH)/libfbopenssl.dylib
 
 # If OpenSSL has been installed, append /lib to OPENSSLDIR in the following
 # statement (i.e., use $(OPENSSLDIR)/lib).
 
-SSLLIB = -Wl,-R$(OPENSSLDIR)/lib -L$(OPENSSLDIR)/lib -lcrypto
+SSLLIB = -L$(OPENSSLDIR)/lib -lcrypto
 
 OBJS = $(ARCH)/asn1help.o \
        $(ARCH)/filehelp.o \
@@ -48,7 +48,7 @@
 	ar -r $(LIB) $(OBJS)
 
 $(SLIB): $(OBJS)
-	$(CC) -shared -o $(SLIB) $(OBJS) $(SSLLIB)
+	$(CC) -dynamiclib -install_name $(PREFIX)/lib/libfbopenssl.dylib -o $(SLIB) $(OBJS) $(SSLLIB)
 
 $(ARCH)/asn1help.o: src/asn1/asn1help.c
 	$(CC) -c $(CFLAGS) src/asn1/asn1help.c -I$(OPENSSLDIR)/include -o $@
