changelog
[platform/upstream/freerdp.git] / scripts / android-build-jpeg.sh
1 #!/bin/bash
2 SCM_URL=https://github.com/akallabeth/jpeg8d
3 SCM_TAG=master
4
5 source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh
6
7 function usage {
8         echo $0 [arguments]
9         echo "\tThe script checks out the OpenH264 git repository"
10         echo "\tto a local source directory, builds and installs"
11         echo "\tthe library for all architectures defined to"
12         echo "\tthe destination directory."
13         echo ""
14         echo "\t[-s|--source-dir <path>]"
15         echo "\t[-d|--destination-dir <path>]"
16         echo "\t[-a|--arch <architectures>]"
17         echo "\t[-t|--tag <tag or branch>]"
18         echo "\t[--scm-url <url>]"
19         echo "\t[--ndk <android NDK path>]"
20         echo "\t[--sdk <android SDK path>]"
21         exit 1
22 }
23
24 function build {
25         echo "Building architectures $BUILD_ARCH..."
26         BASE=$(pwd)
27         common_run cd $BUILD_SRC
28         common_run $NDK_BUILD V=1 APP_ABI="${BUILD_ARCH}" NDK_TOOLCHAIN_VERSION=4.9 -j clean
29         common_run $NDK_BUILD V=1 APP_ABI="${BUILD_ARCH}" NDK_TOOLCHAIN_VERSION=4.9 -j
30         common_run cd $BASE
31 }
32
33 # Run the main program.
34 common_parse_arguments $@
35 common_check_requirements
36 common_update $SCM_URL $SCM_TAG $BUILD_SRC
37
38 build
39
40 common_copy $BUILD_SRC $BUILD_DST