Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
paring | 8d23b76738 | |
paring | 8e08ae7e76 |
|
@ -1,3 +1,3 @@
|
|||
export OPENH264_OS=$(uname | tr A-Z a-z | tr -d \\-0-9. | sed -E 's/^(net|open|free)bsd/bsd/')
|
||||
|
||||
CC=gcc CXX=g++ AR=ar bash build.sh
|
||||
CC=gcc CXX=g++ AR=ar bash build.sh $@
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
export OPENH264_ARCH=arm64
|
||||
export OPENH264_OS=darwin
|
||||
export FFMPEG_ARCH=arm64
|
||||
|
||||
bash build.sh --arch arm64
|
|
@ -0,0 +1,5 @@
|
|||
set -x
|
||||
|
||||
export TOOLCHAIN=x86_64-w64-mingw32
|
||||
|
||||
OPENH264_OS=mingw_nt OPENH264_ARCH=x86_64 CC=$TOOLCHAIN-gcc CXX=$TOOLCHAIN-g++ AR=$TOOLCHAIN-ar bash build.sh
|
4
build.sh
4
build.sh
|
@ -2,6 +2,10 @@ export ARCH=$(uname -m)
|
|||
# do not use all cpus because my computer dies
|
||||
export JOBS=$(awk -v count=$(nproc) 'BEGIN { print ( int( count - 1 ) ) }')
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
export JOBS=$(awk -v count=$(sysctl -n hw.ncpu) 'BEGIN { print ( int ( count - 1 ) ) }')
|
||||
fi
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--arch)
|
||||
|
|
|
@ -12,19 +12,15 @@ cp -r $amfPath/amf/public/include $PREFIX/include/AMF
|
|||
|
||||
make distclean
|
||||
|
||||
flags="--cc=$CC --cxx=$CXX"
|
||||
|
||||
if [[ -z $FFMPEG_MSVC ]]; then
|
||||
if [[ $FFMPEG_MSVC == 1 ]]; then
|
||||
flags="--toolchain=msvc"
|
||||
fi
|
||||
|
||||
./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
||||
LDFLAGS="-arch $ARCH" ./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
||||
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
|
||||
--enable-libopenh264 \
|
||||
--enable-libopenh264 --cc="${CC:-clang -arch $ARCH}" --cxx="${CXX:-g++ -arch $ARCH}" \
|
||||
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
|
||||
--pkg-config-flags="--static" --target-os=$FFMPEG_OS \
|
||||
--extra-ldflags="-libpath:$PREFIX/lib" \
|
||||
--extra-cflags="-I$PREFIX/include/mfx" \
|
||||
${flags} ${FFBUILD_FLAGS}
|
||||
|
||||
make -j$JOBS
|
||||
|
|
|
@ -16,7 +16,7 @@ git clone https://github.com/cisco/openh264 $projectDir -b v$OPENH264_VERSION --
|
|||
|
||||
cd $projectDir
|
||||
|
||||
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=$CC CXX=$CXX AR=$AR"
|
||||
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=\"${CC:-clang}\" CXX=\"${CXX:-g++}\" AR=\"${AR:-ar}\""
|
||||
|
||||
make clean
|
||||
|
||||
|
|
Loading…
Reference in New Issue