[vlc-commits] commit: contrib: Support for iOS. (Pierre d'Herbemont )

git at videolan.org git at videolan.org
Sun Oct 31 18:47:40 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sun Oct 31 17:42:25 2010 +0100| [3d685b6a6b7db4e011ac555205aac4bf69990155] | committer: Pierre d'Herbemont 

contrib: Support for iOS.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d685b6a6b7db4e011ac555205aac4bf69990155
---

 extras/contrib/bootstrap                 |   23 +++++++++++++++++++++++
 extras/contrib/src/Distributions/ios.mak |    3 +++
 extras/contrib/src/contrib-src.mak       |   22 +++++++++++++++++++++-
 3 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap
index 71a60a6..f5ff5b9 100755
--- a/extras/contrib/bootstrap
+++ b/extras/contrib/bootstrap
@@ -164,6 +164,9 @@ case $TARGET in
     arm*eabi)
           ARCH="armel"
      ;;
+    arm*)
+          ARCH="arm"
+     ;;
 esac
 add_makefile_cfg "ARCH = $ARCH"
 
@@ -330,6 +333,10 @@ case $TARGET in
     ;;
 esac
 
+#
+# Fix up the Distro
+#
+
 if test -z "${DISTRO}" -a "$TARGET" = "$BUILD"; then
     if test -d "/usr/lib/pkgconfig"; then
         if test -z "$PKG_CONFIG_PATH"; then
@@ -356,6 +363,22 @@ test -z "${DISTRO}" && DISTRO=unix
 
 cat src/Distributions/"${DISTRO}".mak >> "${distro_mak}"
 
+#
+# Distro specific settings
+#
+
+case "$DISTRO" in
+  ios)
+    add_makefile_cfg 'HAVE_IOS = 1'
+    if test -z "$IOS_SDK_ROOT"; then
+        error "The bootstrap script requires the IOS_SDK_ROOT environment "
+        error "variable to be set when building for iOS"
+        exit 1
+    fi
+    add_makefile_cfg "IOS_SDK_ROOT = ${IOS_SDK_ROOT}"
+    ;;
+esac
+
 # Save passed flags
 EXTRA_CFLAGS+=" $CFLAGS"
 EXTRA_LDFLAGS+=" $LDFLAGS"
diff --git a/extras/contrib/src/Distributions/ios.mak b/extras/contrib/src/Distributions/ios.mak
new file mode 100644
index 0000000..c275465
--- /dev/null
+++ b/extras/contrib/src/Distributions/ios.mak
@@ -0,0 +1,3 @@
+# iOS rules
+all: .ffmpeg .live .dvbpsi .faad
+
diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak
index 9fb98c9..55e331d 100644
--- a/extras/contrib/src/contrib-src.mak
+++ b/extras/contrib/src/contrib-src.mak
@@ -101,7 +101,11 @@ ifneq ($(BUILD),$(HOST))
     #
     ifndef HAVE_CYGWIN
         # We are REALLY cross compiling
-        FFMPEGCONF+=--cross-prefix=$(HOST)- --enable-cross-compile
+        ifdef HAVE_IOS
+            FFMPEGCONF+=--enable-cross-compile
+        else
+            FFMPEGCONF+=--cross-prefix=$(HOST)- --enable-cross-compile
+        endif
         X264CONF=--host=$(HOST)
         PTHREADSCONF=CROSS="$(HOST)-"
     else
@@ -137,9 +141,11 @@ FFMPEGCONF+= --enable-small --disable-mpegaudio-hp
 FFMPEG_CFLAGS += -DHAVE_LRINTF --std=c99
 else
 ifndef HAVE_WINCE
+ifndef HAVE_IOS
 FFMPEGCONF+= --enable-libmp3lame --enable-libgsm
 endif
 endif
+endif
 
 ifdef HAVE_DARWIN_OS_ON_INTEL
 FFMPEGCONF += --enable-memalign-hack
@@ -1087,10 +1093,20 @@ else
 ifdef HAVE_WIN32
 FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --enable-libmp3lame --enable-w32threads --enable-dxva2 --disable-bsfs --enable-libvpx
 else
+ifdef HAVE_IOS
+FFMPEGCONF += --target-os=darwin --sysroot=${IOS_SDK_ROOT}
+ifeq ($(ARCH),arm)
+FFMPEGCONF += --disable-runtime-cpudetect --enable-neon --cpu=cortex-a8
+else
+FFMPEGCONF += --disable-mmx
+endif
+
+else
 FFMPEGCONF += --enable-pthreads
 endif
 FFMPEG_CFLAGS += --std=gnu99
 endif
+endif
 
 ifdef HAVE_WINCE
 .ffmpeg: ffmpeg .zlib
@@ -1098,6 +1114,9 @@ else
 ifdef HAVE_UCLIBC
 .ffmpeg: ffmpeg
 else
+ifdef HAVE_IOS
+.ffmpeg: ffmpeg
+else
 ifeq ($(ARCH),armel)
 .ffmpeg: ffmpeg .lame .gsm .zlib
 else
@@ -1109,6 +1128,7 @@ endif
 endif
 endif
 endif
+endif
 	(cd $<; $(HOSTCC) ./configure --prefix=$(PREFIX) --extra-cflags="$(FFMPEG_CFLAGS) -DHAVE_STDINT_H" --extra-ldflags="$(LDFLAGS)" $(FFMPEGCONF) --disable-shared --enable-static && make && make install-libs install-headers)
 	touch $@
 



More information about the vlc-commits mailing list