在做ios下PJSIP开发,编译好库以后,发现armv7和armv7s不能用mac自带的lipo合并,原来是要用xcode的lipo.
贴脚本:
###
###lipo libs by zt
###
SOURCEv7="armv7"
DESv7s="armv7s"
DEVI386="i386"
DEVROOT_LIPO="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo"
OUTPUT="lipoLib"
rm -rf ${OUTPUT}
mkdir ${OUTPUT}
for file in ${SOURCEv7}/* ;do
hehe=$file
echo ${hehe##*/}
${DEVROOT_LIPO} -arch armv7 $file -arch armv7s ${DESv7s}/${hehe##*/} -arch i386 ${DEVI386}/${hehe##*/} -create -output ${OUTPUT}/${hehe##*/}
done
echo "Building done."