Commit 3d685b6a authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

contrib: Support for iOS.

parent e46f4108
......@@ -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"
......
# iOS rules
all: .ffmpeg .live .dvbpsi .faad
......@@ -101,7 +101,11 @@ ifneq ($(BUILD),$(HOST))
#
ifndef HAVE_CYGWIN
# We are REALLY cross compiling
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
......@@ -1086,11 +1092,21 @@ FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --e
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
......@@ -1108,6 +1127,7 @@ else
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 $@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment