File: android-build-openh264.sh

package info (click to toggle)
freerdp2 2.0.0~git20190204.1.2693389a+dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 22,772 kB
  • sloc: ansic: 307,908; xml: 1,676; sh: 770; perl: 231; makefile: 158; python: 65
file content (64 lines) | stat: -rwxr-xr-x 1,388 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
SCM_URL=https://github.com/cisco/openh264
SCM_TAG=master

source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh

function build {
	echo "Building architecture $1..."
	BASE=$(pwd)
	common_run cd $BUILD_SRC
	PATH=$ANDROID_NDK:$PATH
	MAKE="make PATH=$PATH ENABLEPIC=Yes OS=android NDKROOT=$ANDROID_NDK TARGET=android-$2 NDKLEVEL=$2 ARCH=$1 -j libraries"
	
	common_run export QUIET_AR="$CCACHE "
	common_run export QUIET_ASM="$CCACHE "
	common_run export QUIET_CC="$CCACHE "
	common_run export QUIET_CCAR="$CCACHE "
	common_run export QUIET_CXX="$CCACHE "

	common_run $MAKE
	# Install creates a non optimal directory layout, fix that
	common_run $MAKE PREFIX=$BUILD_SRC/libs/$1 install
	common_run cd $BASE
}

# Run the main program.
common_parse_arguments $@
common_check_requirements
common_update $SCM_URL $SCM_TAG $BUILD_SRC


for ARCH in $BUILD_ARCH
do
	case $ARCH in
	"armeabi")
		OARCH="arm"
	;;
	"armeabi-v7a")
		OARCH="arm"
	;;
	"arm64-v8a")
		OARCH="arm64"
	;;
	*)
		OARCH=$ARCH
	;;
	esac

	echo "$ARCH=$OARCH"

	build $OARCH $NDK_TARGET

	if [ ! -d $BUILD_DST/$ARCH/include ];
	then
		common_run mkdir -p $BUILD_DST/$ARCH/include
	fi

	common_run cp -L -r $BUILD_SRC/libs/$OARCH/include/ $BUILD_DST/$ARCH/
	if [ ! -d $BUILD_DST/$ARCH ];
	then
		common_run mkdir -p $BUILD_DST/$ARCH
	fi
	common_run cp -L $BUILD_SRC/libs/$OARCH/lib/*.so  $BUILD_DST/$ARCH/
done