@ -72,7 +72,7 @@ SHARED = $(SHARED1)
e l s e
e l s e
# Update db.h if you change these.
# Update db.h if you change these.
SHARED_MAJOR = 1
SHARED_MAJOR = 1
SHARED_MINOR = 16
SHARED_MINOR = 17
SHARED1 = libleveldb.$( PLATFORM_SHARED_EXT)
SHARED1 = libleveldb.$( PLATFORM_SHARED_EXT)
SHARED2 = $( SHARED1) .$( SHARED_MAJOR)
SHARED2 = $( SHARED1) .$( SHARED_MAJOR)
SHARED3 = $( SHARED1) .$( SHARED_MAJOR) .$( SHARED_MINOR)
SHARED3 = $( SHARED1) .$( SHARED_MAJOR) .$( SHARED_MINOR)
@ -190,19 +190,20 @@ PLATFORMSROOT=/Applications/Xcode.app/Contents/Developer/Platforms
SIMULATORROOT = $( PLATFORMSROOT) /iPhoneSimulator.platform/Developer
SIMULATORROOT = $( PLATFORMSROOT) /iPhoneSimulator.platform/Developer
DEVICEROOT = $( PLATFORMSROOT) /iPhoneOS.platform/Developer
DEVICEROOT = $( PLATFORMSROOT) /iPhoneOS.platform/Developer
IOSVERSION = $( shell defaults read $( PLATFORMSROOT) /iPhoneOS.platform/version CFBundleShortVersionString)
IOSVERSION = $( shell defaults read $( PLATFORMSROOT) /iPhoneOS.platform/version CFBundleShortVersionString)
IOSARCH = -arch armv6 -arch armv7 -arch armv7s -arch arm64
.cc.o :
.cc.o :
mkdir -p ios-x86/$( dir $@ )
mkdir -p ios-x86/$( dir $@ )
$( CXX) $( CXXFLAGS) -isysroot $( SIMULATORROOT) /SDKs/iPhoneSimulator$( IOSVERSION) .sdk -arch i686 -c $< -o ios-x86/$@
$( CXX) $( CXXFLAGS) -isysroot $( SIMULATORROOT) /SDKs/iPhoneSimulator$( IOSVERSION) .sdk -arch i686 -arch x86_64 - c $< -o ios-x86/$@
mkdir -p ios-arm/$( dir $@ )
mkdir -p ios-arm/$( dir $@ )
xcrun -sdk iphoneos $( CXX) $( CXXFLAGS) -isysroot $( DEVICEROOT) /SDKs/iPhoneOS$( IOSVERSION) .sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@
xcrun -sdk iphoneos $( CXX) $( CXXFLAGS) -isysroot $( DEVICEROOT) /SDKs/iPhoneOS$( IOSVERSION) .sdk $( IOSARCH) -c $< -o ios-arm/$@
lipo ios-x86/$@ ios-arm/$@ -create -output $@
lipo ios-x86/$@ ios-arm/$@ -create -output $@
.c.o :
.c.o :
mkdir -p ios-x86/$( dir $@ )
mkdir -p ios-x86/$( dir $@ )
$( CC) $( CFLAGS) -isysroot $( SIMULATORROOT) /SDKs/iPhoneSimulator$( IOSVERSION) .sdk -arch i686 -c $< -o ios-x86/$@
$( CC) $( CFLAGS) -isysroot $( SIMULATORROOT) /SDKs/iPhoneSimulator$( IOSVERSION) .sdk -arch i686 -arch x86_64 - c $< -o ios-x86/$@
mkdir -p ios-arm/$( dir $@ )
mkdir -p ios-arm/$( dir $@ )
xcrun -sdk iphoneos $( CC) $( CFLAGS) -isysroot $( DEVICEROOT) /SDKs/iPhoneOS$( IOSVERSION) .sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@
xcrun -sdk iphoneos $( CC) $( CFLAGS) -isysroot $( DEVICEROOT) /SDKs/iPhoneOS$( IOSVERSION) .sdk $( IOSARCH) -c $< -o ios-arm/$@
lipo ios-x86/$@ ios-arm/$@ -create -output $@
lipo ios-x86/$@ ios-arm/$@ -create -output $@
e l s e
e l s e