# armv7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -c mattn.c
ar mattn-armv7.a mattn.o
ranlib mattn-armv7.a
# i386
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -c mattn.c
ar mattn-i386.a mattn.o
ranlib mattn-i386.a
# lipo
lipo -create -arch armv7 mattn-armv7.a -arch i386 mattn-i386.a -output mattn.a
こんな感じでできる。簡単。
古い手順は iOS static library cross-compile script. にまとまってるけど、最近の Xcode だと微妙に違うのでメモ。
Permalink | コメント(0) | トラックバック(0) | 18:46
via はてなブックマーク - 人気エントリー http://d.hatena.ne.jp/kazuhooku/20130129/1359452808
0 件のコメント:
コメントを投稿