feat: support build of different architecture
parent
aa6b3b09bc
commit
d35d933b8e
19
build.sh
19
build.sh
|
@ -1,3 +1,18 @@
|
|||
export ARCH=$(uname -m)
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--arch)
|
||||
export ARCH=$2
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 --arch [arch]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
export workDir=$(pwd)/work
|
||||
export outDir=$(pwd)/out
|
||||
export PREFIX=$workDir/prefix
|
||||
|
@ -5,8 +20,10 @@ export PREFIX=$workDir/prefix
|
|||
export PKG_CONFIG_DIR=$PREFIX/lib/pkgconfig
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_DIR
|
||||
|
||||
rm -rf $PREFIX
|
||||
mkdir -p $PREFIX
|
||||
|
||||
mkdir -p $workDir
|
||||
mkdir -p $prefix
|
||||
mkdir -p $outDir
|
||||
|
||||
bash scripts/build-openh264.sh
|
||||
|
|
|
@ -9,7 +9,7 @@ make distclean
|
|||
./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
||||
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
|
||||
--enable-libopenh264 \
|
||||
--prefix=$PREFIX
|
||||
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH --cc="clang -arch $ARCH"
|
||||
|
||||
make -j
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ cd $projectDir
|
|||
|
||||
git checkout tags/v$OPENH264_VERSION -b v$OPENH264_VERSION
|
||||
|
||||
args="PREFIX=$PREFIX"
|
||||
args="PREFIX=$PREFIX ARCH=$ARCH"
|
||||
|
||||
make clean
|
||||
|
||||
make -j $args
|
||||
|
||||
|
|
Loading…
Reference in New Issue