forked from Marginal/QLVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildffmpeg
executable file
·32 lines (30 loc) · 1008 Bytes
/
buildffmpeg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
OUTDIR="${TARGET_BUILD_DIR}/${TARGET_NAME}"
if [ "${ACTION}" == "clean" ]; then
echo Remove "${OUTDIR}"
if [ -n "${OUTDIR}" ]; then
rm -rf "${OUTDIR}"
fi
else
# For yasm
PATH=$PATH:/usr/local/bin
if [ ! -x "${SRCROOT}/ffmpeg/configure" ]; then
echo Clone to ${SRCROOT}/ffmpeg
cd "${SRCROOT}"
git submodule update --init
fi
echo Build in ${OUTDIR}
mkdir -p "${OUTDIR}"
cd "${OUTDIR}"
if [ -f config.h ]; then
echo Skipping configure
else
if [ "${CONFIGURATION}" == "Debug" ]; then
FLAGS="--disable-optimizations"
else
FLAGS=
fi
${SRCROOT}/ffmpeg/configure --cc=clang --cpu=core2 --disable-stripping --enable-gpl --enable-hardcoded-tables --disable-doc --disable-pthreads --disable-indevs --disable-outdevs --disable-network --disable-avdevice --disable-muxers --disable-encoders --disable-bsfs --disable-filters --disable-protocols --enable-muxer=image2 --enable-encoder=png --enable-protocol=file ${FLAGS}
fi
make -j`sysctl -n hw.physicalcpu` ${ACTION}
fi