<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>It seems the syntax for Apple's (not GNU) libtool has changed.<br>
</p>
<p>These configs should work better for those trying to build for iphoneos or iphone-simulator:<br>
</p>
<p><br>
</p>
<p>----- iphoneos -----<br>
</p>
<p><br>
</p>
<div># **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*"</div>
<div># for this configuration file to work.</div>
<div>#</div>
<div># Change the following version number, if necessary, before running "genMakefiles iphoneos"</div>
<div>IOS_VERSION =<span class="Apple-tab-span" style="white-space:pre"> </span>8.3</div>
<div><br>
</div>
<div>DEVELOPER_PATH =<span class="Apple-tab-span" style="white-space:pre"> </span>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer</div>
<div>TOOL_PATH =<span class="Apple-tab-span" style="white-space:pre"> </span>$(DEVELOPER_PATH)/usr/bin</div>
<div>SDK_PATH =<span class="Apple-tab-span" style="white-space:pre"> </span>$(DEVELOPER_PATH)/SDKs</div>
<div>SDK =<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"></span>$(SDK_PATH)/iPhoneOS$(IOS_VERSION).sdk</div>
<div>COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=$(SDK)</div>
<div>C = c</div>
<div>C_COMPILER = /usr/bin/xcrun clang</div>
<div>C_FLAGS = $(COMPILE_OPTS)</div>
<div>CPP = cpp</div>
<div>CPLUSPLUS_COMPILER = /usr/bin/xcrun clang</div>
<div>CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall</div>
<div>OBJ = o</div>
<div>LINK = /usr/bin/xcrun clang -o </div>
<div>LINK_OPTS = -v -L. -arch armv7 --sysroot=$(SDK) -L$(SDK)/usr/lib/system /usr/lib/libc++.dylib</div>
<div>CONSOLE_LINK_OPTS = $(LINK_OPTS)</div>
<div>LIBRARY_LINK = /usr/bin/xcrun libtool -static -o <br>
</div>
<div>LIBRARY_LINK_OPTS =</div>
<div>LIB_SUFFIX = a</div>
<div>LIBS_FOR_CONSOLE_APPLICATION =</div>
<div>LIBS_FOR_GUI_APPLICATION =</div>
<div>EXE =<span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><br>
</div>
<div><br>
</div>
<div>----- iphone-simulator -----</div>
<div><br>
</div>
<div>
<div># **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*"</div>
<div># for this configuration file to work.</div>
<div><br>
</div>
<div># Change the following version number, if necessary, before running "genMakefiles iphone-simulator"</div>
<div>IOS_VERSION =<span class="Apple-tab-span" style="white-space:pre"> </span>8.3</div>
<div>MIN_IOS_VERSION =<span class="Apple-tab-span" style="white-space:pre"> </span>
7.0</div>
<div><br>
</div>
<div>DEVELOPER_PATH =<span class="Apple-tab-span" style="white-space:pre"> </span>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer</div>
<div>TOOL_PATH =<span class="Apple-tab-span" style="white-space:pre"> </span>$(DEVELOPER_PATH)/usr/bin</div>
<div>SDK_PATH =<span class="Apple-tab-span" style="white-space:pre"> </span>$(DEVELOPER_PATH)/SDKs</div>
<div>SDK =<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"></span>$(SDK_PATH)/iPhoneSimulator$(IOS_VERSION).sdk</div>
<div>COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -miphoneos-version-min=$(MIN_IOS_VERSION) -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch i386 --sysroot=$(SDK) -isysroot $(SDK)</div>
<div>C = c</div>
<div>C_COMPILER = /usr/bin/xcrun clang</div>
<div>C_FLAGS = $(COMPILE_OPTS)</div>
<div>CPP = cpp</div>
<div>CPLUSPLUS_COMPILER = /usr/bin/xcrun clang</div>
<div>CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall</div>
<div>OBJ = o</div>
<div>LINK = /usr/bin/xcrun clang -o</div>
<div>LINK_OPTS = -L. -arch i386 -miphoneos-version-min=$(MIN_IOS_VERSION) --sysroot=$(SDK) -isysroot -L$(SDK)/usr/lib/system -I$(SDK)/usr/lib /usr/lib/libc++.dylib</div>
<div>CONSOLE_LINK_OPTS = $(LINK_OPTS)</div>
<div>LIBRARY_LINK = /usr/bin/xcrun libtool -static -o <br>
</div>
<div>LIBRARY_LINK_OPTS =</div>
<div>LIB_SUFFIX = a</div>
<div>LIBS_FOR_CONSOLE_APPLICATION =</div>
<div>LIBS_FOR_GUI_APPLICATION =</div>
<div>EXE =<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>----- bash script to build all archs, if anyone finds this useful -----<br>
</div>
<div><br>
</div>
<div>
<p class="p1"><span class="s1">##### --> universal library for iOS live555 build script by Braden Ackerman (braden.ackerman@gmail.com) <-- #####</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1"># **NOTE: 'Command Line Tools' (appropriate for iOS SDK version and MacOSX version) must be installed for this script to work.</span></p>
<p class="p1"><span class="s1"># When this script completes, you should be left with a folder 'lib' which containts universal libs for the archs in PHONEARCHS + PCARCHS</span></p>
<p class="p3"><span class="s1">LIVEFILE=live555-latest.tar.gz</span></p>
<p class="p3"><span class="s1">PHONEARCHS=( armv7 armv7s arm64 )</span></p>
<p class="p3"><span class="s1">LIBNAMES=( libliveMedia.a libgroupsock.a libUsageEnvironment.a libBasicUsageEnvironment.a )</span></p>
<p class="p3"><span class="s1">PCARCHS=( i386 x86_</span><span class="s2">64</span><span class="s1"> )</span></p>
<p class="p3"><span class="s1">ROOTDIR=$( cd </span><span class="s3">"$( dirname "</span><span class="s1">${BASH_SOURCE[</span><span class="s2">0</span><span class="s1">]}</span><span class="s3">" )"</span><span class="s1"> && pwd )</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">####### -- First, we'll download the live555 source and extract it to the current directory</span></p>
<p class="p3"><span class="s1">curl http://www.live555.com/liveMedia/public/$LIVEFILE > $LIVEFILE</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">####### --- Second, make some arm libs</span></p>
<p class="p3"><span class="s1">rm -r -f arms</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/arms</span></p>
<p class="p3"><span class="s4">for</span><span class="s1"> i </span><span class="s4">in</span><span class="s1"> ${PHONEARCHS[@]}</span></p>
<p class="p4"><span class="s1">do</span></p>
<p class="p3"><span class="s1">rm -r -f live</span></p>
<p class="p3"><span class="s1">tar -zxvf $LIVEFILE</span></p>
<p class="p3"><span class="s1">chmod -R u+rwX,a+rX live</span></p>
<p class="p3"><span class="s1">echo $i</span></p>
<p class="p3"><span class="s1">sed -i.bak </span><span class="s3">'s/armv7/'</span><span class="s1">$i</span><span class="s3">'/g'</span><span class="s1"> live/config.iphoneos</span></p>
<p class="p3"><span class="s1">cd live</span></p>
<p class="p3"><span class="s1">./genMakeFiles iphoneos</span></p>
<p class="p3"><span class="s1">make</span></p>
<p class="p3"><span class="s1">cd liveMedia</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cp libliveMedia.a $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd groupsock</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cp libgroupsock.a $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd UsageEnvironment</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cp libUsageEnvironment.a $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd BasicUsageEnvironment</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cp libBasicUsageEnvironment.a $ROOTDIR/arms/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p4"><span class="s1">done</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">####### --- Third, copy our headers for use with the static libraries we’re using </span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/include</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/include/BasicUsageEnvironment</span></p>
<p class="p3"><span class="s1">cd $ROOTDIR/live/BasicUsageEnvironment/include</span></p>
<p class="p3"><span class="s1">cp *.hh $ROOTDIR/include/BasicUsageEnvironment</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/include/UsageEnvironment</span></p>
<p class="p3"><span class="s1">cd $ROOTDIR/live/UsageEnvironment/include</span></p>
<p class="p3"><span class="s1">cp *.hh $ROOTDIR/include/UsageEnvironment</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/include/groupsock</span></p>
<p class="p3"><span class="s1">cd $ROOTDIR/live/groupsock/include</span></p>
<p class="p3"><span class="s1">cp *.hh $ROOTDIR/include/groupsock</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/include/liveMedia</span></p>
<p class="p3"><span class="s1">cd $ROOTDIR/live/liveMedia/include</span></p>
<p class="p3"><span class="s1">cp *.hh $ROOTDIR/include/liveMedia</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s1">cd $ROOTDIR/</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">####### --- Fourth, make some PC libs</span></p>
<p class="p3"><span class="s1">rm -r -f $ROOTDIR/pc</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/pc</span></p>
<p class="p3"><span class="s4">for</span><span class="s1"> i </span><span class="s4">in</span><span class="s1"> ${PCARCHS[@]}</span></p>
<p class="p4"><span class="s1">do</span></p>
<p class="p3"><span class="s1">rm -r -f live</span></p>
<p class="p3"><span class="s1">tar -zxvf $LIVEFILE</span></p>
<p class="p3"><span class="s1">chmod -R u+rwX,a+rX live</span></p>
<p class="p3"><span class="s1">echo $i</span></p>
<p class="p3"><span class="s1">sed -i.bak </span><span class="s3">'s/i386/'</span><span class="s1">$i</span><span class="s3">'/g'</span><span class="s1"> live/config.iphone-simulator</span></p>
<p class="p3"><span class="s1">cd live</span></p>
<p class="p3"><span class="s1">./genMakeFiles iphone-simulator</span></p>
<p class="p3"><span class="s1">make</span></p>
<p class="p3"><span class="s1">cd liveMedia</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cp libliveMedia.a $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd groupsock</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cp libgroupsock.a $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd UsageEnvironment</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cp libUsageEnvironment.a $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd BasicUsageEnvironment</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cp libBasicUsageEnvironment.a $ROOTDIR/pc/$i</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p3"><span class="s1">cd ..</span></p>
<p class="p4"><span class="s1">done</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">###### Fifth, we'll LIPO together all of our libraries</span></p>
<p class="p3"><span class="s1">mkdir $ROOTDIR/lib</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p3"><span class="s4">for</span><span class="s1"> i </span><span class="s4">in</span><span class="s1"> ${LIBNAMES[@]}</span></p>
<p class="p4"><span class="s1">do</span></p>
<p class="p3"><span class="s1">lipo -output $ROOTDIR/lib/$i -create \</span></p>
<p class="p3"><span class="s1">-arch armv7 $ROOTDIR/arms/armv7/$i \</span></p>
<p class="p3"><span class="s1">-arch armv7s $ROOTDIR/arms/armv7s/$i \</span></p>
<p class="p3"><span class="s1">-arch arm64 $ROOTDIR/arms/arm64/$i \</span></p>
<p class="p3"><span class="s1">-arch i386 $ROOTDIR/pc/i386/$i \</span></p>
<p class="p3"><span class="s1">-arch x86_</span><span class="s2">64</span><span class="s1"> $ROOTDIR/pc/x86_</span><span class="s2">64</span><span class="s1">/$i</span></p>
<p class="p4"><span class="s1">done</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">##### Sixth, clean up our mess</span></p>
<p class="p3"><span class="s1">rm -r -f $ROOTDIR/arms</span></p>
<p class="p3"><span class="s1">rm -r -f $ROOTDIR/pc</span></p>
<p class="p3"><span class="s1">rm -r -f $ROOTDIR/live</span></p>
<p class="p3"><span class="s1">rm -f $ROOTDIR/$LIVEFILE</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p2"><span class="s1"></span><br>
</p>
<br>
</div>
<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<p><br>
</p>
</div>
</body>
</html>