adofai-ffmpeg-builder/scripts/build-ffmpeg.sh

29 lines
851 B
Bash
Raw Normal View History

2023-05-02 19:35:56 +09:00
export ffmpegPath=$workDir/ffmpeg
export amfPath=$workDir/amf
# export CFLAGS=-L$PREFIX/lib
2023-05-02 19:35:56 +09:00
2023-05-03 18:43:41 +09:00
git clone https://github.com/FFmpeg/FFmpeg -b release/6.0 $ffmpegPath --depth 1
2023-05-02 19:35:56 +09:00
git clone https://github.com/GPUOpen-LibrariesAndSDKs/AMF -b v1.4.29 $amfPath --depth 1
2023-05-02 19:35:56 +09:00
cd $ffmpegPath
cp -r $amfPath/amf/public/include $PREFIX/include/AMF
2023-05-02 19:35:56 +09:00
make distclean
2023-05-04 17:48:53 +09:00
if [[ $FFMPEG_MSVC == 1 ]]; then
2023-05-03 18:06:33 +09:00
flags="--toolchain=msvc"
fi
2023-05-04 19:32:30 +09:00
LDFLAGS="-arch $ARCH" ./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
2023-05-02 19:35:56 +09:00
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
2023-05-04 19:32:30 +09:00
--enable-libopenh264 --cc="${CC:-clang -arch $ARCH}" --cxx="${CXX:-g++ -arch $ARCH}" \
2023-05-03 15:18:43 +09:00
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
2023-05-03 18:06:33 +09:00
--pkg-config-flags="--static" --target-os=$FFMPEG_OS \
${flags} ${FFBUILD_FLAGS}
2023-05-02 19:35:56 +09:00
2023-05-03 15:18:43 +09:00
make -j$JOBS
2023-05-02 19:35:56 +09:00
2023-05-03 15:18:43 +09:00
cp ffmpeg* $outDir