2023-05-02 21:03:21 +09:00
|
|
|
export ARCH=$(uname -m)
|
2023-05-03 18:06:33 +09:00
|
|
|
# do not use all cpus because my computer dies
|
|
|
|
export JOBS=$(awk -v count=$(nproc) 'BEGIN { print ( int( count - 1 ) ) }')
|
2023-05-02 21:03:21 +09:00
|
|
|
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
|
|
case $1 in
|
|
|
|
--arch)
|
|
|
|
export ARCH=$2
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 --arch [arch]"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2023-05-02 19:35:56 +09:00
|
|
|
export workDir=$(pwd)/work
|
|
|
|
export outDir=$(pwd)/out
|
|
|
|
export PREFIX=$workDir/prefix
|
|
|
|
|
|
|
|
export PKG_CONFIG_DIR=$PREFIX/lib/pkgconfig
|
|
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_DIR
|
|
|
|
|
2023-05-04 16:35:56 +09:00
|
|
|
rm -rf $PREFIX
|
|
|
|
mkdir -p $PREFIX
|
2023-05-02 21:03:21 +09:00
|
|
|
|
2023-05-02 19:35:56 +09:00
|
|
|
mkdir -p $workDir
|
|
|
|
mkdir -p $outDir
|
|
|
|
|
2023-05-22 19:50:18 +09:00
|
|
|
bash scripts/build-iconv.sh
|
|
|
|
|
2023-05-04 16:32:39 +09:00
|
|
|
case $FFBUILD_PLATFORM in
|
|
|
|
win)
|
|
|
|
bash scripts/build-ffnvcodec.sh
|
2023-05-23 14:49:58 +09:00
|
|
|
bash scripts/build-libmfx.sh
|
2023-05-04 16:32:39 +09:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2023-05-02 19:35:56 +09:00
|
|
|
bash scripts/build-openh264.sh
|
|
|
|
bash scripts/build-ffmpeg.sh
|