--- Makefile.pre.in.orig	2006-10-08 10:41:25.000000000 -0700
+++ Makefile.pre.in	2007-04-20 18:06:11.000000000 -0700
@@ -56,7 +56,7 @@
 OPT=		@OPT@
 BASECFLAGS=	@BASECFLAGS@
 CFLAGS=		$(BASECFLAGS) $(OPT)
-CPPFLAGS=	-I. -I$(srcdir)/Include
+CPPFLAGS=	@CPPFLAGS@ -I. -I$(srcdir)/Include
 LDFLAGS=	@LDFLAGS@
 LDLAST=		@LDLAST@
 SGI_ABI=	@SGI_ABI@
@@ -364,6 +364,10 @@
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
 	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
 
+libpython$(VERSION).dylib: $(LIBRARY_OBJS)
+	$(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version $(VERSION) -compatibility_version $(VERSION) -o $@ -flat_namespace -undefined suppress $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+
+
 # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
 # minimal framework (not including the Lib directory and such) in the current
 # directory.
@@ -655,7 +659,12 @@
 				(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
 			fi \
 		fi; \
-	else	true; \
+	else \
+		if test -f libpython$(VERSION).dylib; then \
+			$(INSTALL_SHARED) libpython$(VERSION).dylib $(DESTDIR)$(LIBDIR)/libpython$(VERSION).dylib; \
+		else \
+			true; \
+		fi \
 	fi
 
 # Install the manual page
 
