--- libjson/makefile.orig	2014-05-17 12:22:39.000000000 -0400
+++ libjson/makefile	2014-05-17 12:39:52.000000000 -0400
@@ -131,18 +131,14 @@
 OS=$(shell uname)
 
 # Defaults
-ifeq ($(OS), Darwin)
-	cxxflags_default = -fast -ffast-math -fexpensive-optimizations -DNDEBUG
-else
-	cxxflags_default = -O3 -ffast-math -fexpensive-optimizations -DNDEBUG
-endif
+cxxflags_default = -O3 -ffast-math -fexpensive-optimizations -DNDEBUG
 cxxflags_small   = -Os -ffast-math -DJSON_LESS_MEMORY -DNDEBUG
 cxxflags_debug   = -g -DJSON_SAFE -DJSON_DEBUG
 cxxflags_shared  = -f$(PIC)
 libname          = libjson
 libname_hdr      := $(libname)
 libname_debug    = $(libname)_dbg
-suffix_shared    = so
+suffix_shared    = dylib
 suffix_static    = a
 major_version    = 7
 minor_version    = 6.1
@@ -186,9 +182,9 @@
 
 # SHARED specific settings
 ifeq ($(SHARED), 1)
-	libname_shared               = $(libname).$(suffix_shared)
+	libname_shared               = $(libname)
 	libname_shared_major_version = $(libname_shared).$(major_version)
-	lib_target                   = $(libname_shared_major_version).$(minor_version)
+	lib_target                   = $(libname_shared_major_version).$(minor_version).$(suffix_shared)
 	objdir                      := $(objdir)_shared
 	CXXFLAGS                    := $(CXXFLAGS) $(cxxflags_shared)
 else
@@ -220,7 +216,7 @@
 	@echo "Link "
 	cd $(objdir) ; \
 	if test "$(OS)" = "Darwin" ; then \
-		$(CXX) -shared -Wl,-dylib_install_name -Wl,$(libname_shared_major_version) -o $@ $(objects) ; \
+		$(CXX) -dynamiclib -compatibility_version $(major_version).$(minor_version) -current_version $(major_version).$(minor_version) -Wl,-dylib_install_name -Wl,@FINKPREFIX@lib/$(libname_shared_major_version) -o $@ $(objects) ; \
 	else \
 		$(CXX) -shared -Wl,-soname,$(libname_shared_major_version) -o $@ $(objects) ; \
 	fi ; \
@@ -266,7 +262,7 @@
 	cp -r ./$(srcdir)/JSONDefs $(include_path)/$(libname_hdr)/$(srcdir)
 	chmod -R a+r $(include_path)/$(libname_hdr)
 	find  $(include_path)/$(libname_hdr) -type d -exec chmod a+x {} \;
-	cp -rv $(srcdir)/Dependencies/ $(include_path)/$(libname_hdr)/$(srcdir)
+	# cp -rv $(srcdir)/Dependencies/ $(include_path)/$(libname_hdr)/$(srcdir)
 	@echo "Install header files: Done."
 
 clean: banner
