Fat libraries in XCode 5 Fat libraries in XCode 5 xcode xcode

Fat libraries in XCode 5


I'm using the makefile below for my library and it works flawless even with XCode 5 and the iOS7 SDK.

XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuildPROJECT_ROOT=.PROJECT=$(PROJECT_ROOT)/GIFLibFrontEnd.xcodeprojTARGET=GIFLibFrontEndall: libUniversal.alibi386.a:    $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build    -mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $@libArmv7.a:    $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv7 -configuration Release clean build    -mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@libArmv7s.a:    $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv7s -configuration Release clean build    -mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@libArm64.a:    $(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch arm64 -configuration Release clean build    -mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@libUniversal.a: libi386.a libArmv7.a libArmv7s.a libArm64.a    lipo -create -output lib$(TARGET)Universal.a $^clean:    -rm -f *.a *.dll    -rm -rf build


Here's a link to a Makefile with the tabs, and I made a little change to separate out the target name from the library name. Thanks very much for this! This solved my problem!