[Live-devel] Updated iOS configs

Braden Ackerman backerman at icontrol.com
Wed Apr 22 13:53:08 PDT 2015


It seems the syntax for Apple's (not GNU) libtool has changed.

These configs should work better for those trying to build for iphoneos or iphone-simulator:


----- iphoneos -----


# **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*"
# for this configuration file to work.
#
# Change the following version number, if necessary, before running "genMakefiles iphoneos"
IOS_VERSION = 8.3

DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
TOOL_PATH = $(DEVELOPER_PATH)/usr/bin
SDK_PATH = $(DEVELOPER_PATH)/SDKs
SDK = $(SDK_PATH)/iPhoneOS$(IOS_VERSION).sdk
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)
C =                     c
C_COMPILER =            /usr/bin/xcrun clang
C_FLAGS =               $(COMPILE_OPTS)
CPP =                   cpp
CPLUSPLUS_COMPILER =    /usr/bin/xcrun clang
CPLUSPLUS_FLAGS =       $(COMPILE_OPTS) -Wall
OBJ =                   o
LINK =                  /usr/bin/xcrun clang -o
LINK_OPTS =             -v -L. -arch armv7 --sysroot=$(SDK) -L$(SDK)/usr/lib/system /usr/lib/libc++.dylib
CONSOLE_LINK_OPTS =     $(LINK_OPTS)
LIBRARY_LINK =          /usr/bin/xcrun libtool -static -o
LIBRARY_LINK_OPTS =
LIB_SUFFIX =            a
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
EXE =


----- iphone-simulator -----

# **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*"
# for this configuration file to work.

# Change the following version number, if necessary, before running "genMakefiles iphone-simulator"
IOS_VERSION = 8.3
MIN_IOS_VERSION = 7.0

DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
TOOL_PATH = $(DEVELOPER_PATH)/usr/bin
SDK_PATH = $(DEVELOPER_PATH)/SDKs
SDK = $(SDK_PATH)/iPhoneSimulator$(IOS_VERSION).sdk
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)
C =                     c
C_COMPILER =            /usr/bin/xcrun clang
C_FLAGS =               $(COMPILE_OPTS)
CPP =                   cpp
CPLUSPLUS_COMPILER =    /usr/bin/xcrun clang
CPLUSPLUS_FLAGS =       $(COMPILE_OPTS) -Wall
OBJ =                   o
LINK =                  /usr/bin/xcrun clang -o
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
CONSOLE_LINK_OPTS =     $(LINK_OPTS)
LIBRARY_LINK =          /usr/bin/xcrun libtool -static -o
LIBRARY_LINK_OPTS =
LIB_SUFFIX =            a
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
EXE =








----- bash script to build all archs, if anyone finds this useful -----


##### --> universal library for iOS live555 build script by Braden Ackerman (braden.ackerman at gmail.com) <-- #####


# **NOTE: 'Command Line Tools' (appropriate for iOS SDK version and MacOSX version) must be installed for this script to work.

# When this script completes, you should be left with a folder 'lib' which containts universal libs for the archs in PHONEARCHS + PCARCHS

LIVEFILE=live555-latest.tar.gz

PHONEARCHS=( armv7 armv7s arm64 )

LIBNAMES=( libliveMedia.a libgroupsock.a libUsageEnvironment.a libBasicUsageEnvironment.a )

PCARCHS=( i386 x86_64 )

ROOTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )




####### -- First, we'll download the live555 source and extract it to the current directory

curl http://www.live555.com/liveMedia/public/$LIVEFILE > $LIVEFILE



####### --- Second, make some arm libs

rm -r -f arms

mkdir $ROOTDIR/arms

for i in ${PHONEARCHS[@]}

do

rm -r -f live

tar -zxvf $LIVEFILE

chmod -R u+rwX,a+rX live

echo $i

sed -i.bak 's/armv7/'$i'/g' live/config.iphoneos

cd live

./genMakeFiles iphoneos

make

cd liveMedia

mkdir $ROOTDIR/arms/$i

cp libliveMedia.a $ROOTDIR/arms/$i

cd ..

cd groupsock

mkdir $ROOTDIR/arms/$i

cp libgroupsock.a $ROOTDIR/arms/$i

cd ..

cd UsageEnvironment

mkdir $ROOTDIR/arms/$i

cp libUsageEnvironment.a $ROOTDIR/arms/$i

cd ..

cd BasicUsageEnvironment

mkdir $ROOTDIR/arms/$i

cp libBasicUsageEnvironment.a $ROOTDIR/arms/$i

cd ..

cd ..

done




####### --- Third, copy our headers for use with the static libraries we're using


mkdir $ROOTDIR/include


mkdir $ROOTDIR/include/BasicUsageEnvironment

cd $ROOTDIR/live/BasicUsageEnvironment/include

cp *.hh $ROOTDIR/include/BasicUsageEnvironment


mkdir $ROOTDIR/include/UsageEnvironment

cd $ROOTDIR/live/UsageEnvironment/include

cp *.hh $ROOTDIR/include/UsageEnvironment


mkdir $ROOTDIR/include/groupsock

cd $ROOTDIR/live/groupsock/include

cp *.hh $ROOTDIR/include/groupsock


mkdir $ROOTDIR/include/liveMedia

cd $ROOTDIR/live/liveMedia/include

cp *.hh $ROOTDIR/include/liveMedia


cd $ROOTDIR/



####### --- Fourth, make some PC libs

rm -r -f $ROOTDIR/pc

mkdir $ROOTDIR/pc

for i in ${PCARCHS[@]}

do

rm -r -f live

tar -zxvf $LIVEFILE

chmod -R u+rwX,a+rX live

echo $i

sed -i.bak 's/i386/'$i'/g' live/config.iphone-simulator

cd live

./genMakeFiles iphone-simulator

make

cd liveMedia

mkdir $ROOTDIR/pc/$i

cp libliveMedia.a $ROOTDIR/pc/$i

cd ..

cd groupsock

mkdir $ROOTDIR/pc/$i

cp libgroupsock.a $ROOTDIR/pc/$i

cd ..

cd UsageEnvironment

mkdir $ROOTDIR/pc/$i

cp libUsageEnvironment.a $ROOTDIR/pc/$i

cd ..

cd BasicUsageEnvironment

mkdir $ROOTDIR/pc/$i

cp libBasicUsageEnvironment.a $ROOTDIR/pc/$i

cd ..

cd ..

done


###### Fifth, we'll LIPO together all of our libraries

mkdir $ROOTDIR/lib


for i in ${LIBNAMES[@]}

do

lipo -output $ROOTDIR/lib/$i  -create \

-arch armv7 $ROOTDIR/arms/armv7/$i \

-arch armv7s $ROOTDIR/arms/armv7s/$i \

-arch arm64 $ROOTDIR/arms/arm64/$i \

-arch i386 $ROOTDIR/pc/i386/$i \

-arch x86_64 $ROOTDIR/pc/x86_64/$i

done






##### Sixth, clean up our mess

rm -r -f $ROOTDIR/arms

rm -r -f $ROOTDIR/pc

rm -r -f $ROOTDIR/live

rm -f $ROOTDIR/$LIVEFILE















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150422/26a4c71a/attachment.html>


More information about the live-devel mailing list