33 lines
869 B
Bash
33 lines
869 B
Bash
set -x
|
|
|
|
export OPENH264_VERSION=2.3.1
|
|
|
|
CFLAGS+="-static -static-libgcc -static-libstdc++"
|
|
LDFLAGS+="-static-libgcc -static-libstdc++ -static"
|
|
|
|
# TODO: detect platform
|
|
# export CISCO_BINARY_PLATFORM=mac
|
|
# export CISCO_BINARY_ARCH=x64
|
|
# export CISCO_BINARY_SUFFIX=dylib.bz2
|
|
# export CISCO_BINARY_NAME=libopenh264
|
|
|
|
# export OPENH264_CISCO_BINARY_URL=http://ciscobinary.openh264.org/$CISCO_BINARY_NAME-$OPENH264_VERSION-$CISCO_BINARY_PLATFORM-${CISCO_BINARY_ARCH}.${CISCO_BINARY_SUFFIX}
|
|
|
|
export projectDir=$workDir/openh264
|
|
|
|
git clone https://github.com/cisco/openh264 $projectDir -b v$OPENH264_VERSION --depth 1
|
|
|
|
cd $projectDir
|
|
|
|
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=$CC CXX=$CXX AR=$AR"
|
|
|
|
make clean
|
|
|
|
make -j$JOBS $args
|
|
|
|
make install-static $args
|
|
|
|
# rm -rf $PREFIX/lib/libopenh264*
|
|
|
|
# wget -O $PREFIX/lib/libopenh264.dylib $OPENH264_CISCO_BINARY_URL
|