OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 ## | 2 ## |
3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved. |
4 ## | 4 ## |
5 ## Use of this source code is governed by a BSD-style license | 5 ## Use of this source code is governed by a BSD-style license |
6 ## that can be found in the LICENSE file in the root of the source | 6 ## that can be found in the LICENSE file in the root of the source |
7 ## tree. An additional intellectual property rights grant can be found | 7 ## tree. An additional intellectual property rights grant can be found |
8 ## in the file PATENTS. All contributing project authors may | 8 ## in the file PATENTS. All contributing project authors may |
9 ## be found in the AUTHORS file in the root of the source tree. | 9 ## be found in the AUTHORS file in the root of the source tree. |
10 ## | 10 ## |
(...skipping 25 matching lines...) Expand all Loading... |
36 # target using $DIST_DIR as the distribution output directory. | 36 # target using $DIST_DIR as the distribution output directory. |
37 build_target() { | 37 build_target() { |
38 local target="$1" | 38 local target="$1" |
39 local old_pwd="$(pwd)" | 39 local old_pwd="$(pwd)" |
40 | 40 |
41 vlog "***Building target: ${target}***" | 41 vlog "***Building target: ${target}***" |
42 | 42 |
43 mkdir "${target}" | 43 mkdir "${target}" |
44 cd "${target}" | 44 cd "${target}" |
45 eval "../../${LIBVPX_SOURCE_DIR}/configure" --target="${target}" \ | 45 eval "../../${LIBVPX_SOURCE_DIR}/configure" --target="${target}" \ |
46 --disable-docs ${devnull} | 46 --disable-docs ${EXTRA_CONFIGURE_ARGS} ${devnull} |
47 export DIST_DIR | 47 export DIST_DIR |
48 eval make -j ${MAKE_JOBS} dist ${devnull} | 48 eval make -j ${MAKE_JOBS} dist ${devnull} |
49 cd "${old_pwd}" | 49 cd "${old_pwd}" |
50 | 50 |
51 vlog "***Done building target: ${target}***" | 51 vlog "***Done building target: ${target}***" |
52 } | 52 } |
53 | 53 |
54 # Returns the preprocessor symbol for the target specified by $1. | 54 # Returns the preprocessor symbol for the target specified by $1. |
55 target_to_preproc_symbol() { | 55 target_to_preproc_symbol() { |
56 target="$1" | 56 target="$1" |
57 case "${target}" in | 57 case "${target}" in |
58 arm64-*) | 58 arm64-*) |
59 echo "__aarch64__" | 59 echo "__aarch64__" |
60 ;; | 60 ;; |
61 armv6-*) | 61 armv6-*) |
62 echo "__ARM_ARCH_6__" | 62 echo "__ARM_ARCH_6__" |
63 ;; | 63 ;; |
64 armv7-*) | 64 armv7-*) |
65 echo "__ARM_ARCH_7__" | 65 echo "__ARM_ARCH_7A__" |
66 ;; | 66 ;; |
67 armv7s-*) | 67 armv7s-*) |
68 echo "__ARM_ARCH_7S__" | 68 echo "__ARM_ARCH_7S__" |
69 ;; | 69 ;; |
70 x86-*) | 70 x86-*) |
71 echo "__i386__" | 71 echo "__i386__" |
72 ;; | 72 ;; |
73 x86_64-*) | 73 x86_64-*) |
74 echo "__x86_64__" | 74 echo "__x86_64__" |
75 ;; | 75 ;; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 if [ "${VERBOSE}" = "yes" ]; then | 199 if [ "${VERBOSE}" = "yes" ]; then |
200 echo "$@" | 200 echo "$@" |
201 fi | 201 fi |
202 } | 202 } |
203 | 203 |
204 trap cleanup EXIT | 204 trap cleanup EXIT |
205 | 205 |
206 # Parse the command line. | 206 # Parse the command line. |
207 while [ -n "$1" ]; do | 207 while [ -n "$1" ]; do |
208 case "$1" in | 208 case "$1" in |
| 209 --extra-configure-args) |
| 210 EXTRA_CONFIGURE_ARGS="$2" |
| 211 shift |
| 212 ;; |
209 --help) | 213 --help) |
210 iosbuild_usage | 214 iosbuild_usage |
211 exit | 215 exit |
212 ;; | 216 ;; |
213 --jobs) | 217 --jobs) |
214 MAKE_JOBS="$2" | 218 MAKE_JOBS="$2" |
215 shift | 219 shift |
216 ;; | 220 ;; |
217 --preserve-build-output) | 221 --preserve-build-output) |
218 PRESERVE_BUILD_OUTPUT=yes | 222 PRESERVE_BUILD_OUTPUT=yes |
219 ;; | 223 ;; |
220 --show-build-output) | 224 --show-build-output) |
221 devnull= | 225 devnull= |
222 ;; | 226 ;; |
223 --verbose) | 227 --verbose) |
224 VERBOSE=yes | 228 VERBOSE=yes |
225 ;; | 229 ;; |
226 *) | 230 *) |
227 iosbuild_usage | 231 iosbuild_usage |
228 exit 1 | 232 exit 1 |
229 ;; | 233 ;; |
230 esac | 234 esac |
231 shift | 235 shift |
232 done | 236 done |
233 | 237 |
234 if [ "${VERBOSE}" = "yes" ]; then | 238 if [ "${VERBOSE}" = "yes" ]; then |
235 cat << EOF | 239 cat << EOF |
236 BUILD_ROOT=${BUILD_ROOT} | 240 BUILD_ROOT=${BUILD_ROOT} |
237 DIST_DIR=${DIST_DIR} | 241 DIST_DIR=${DIST_DIR} |
| 242 EXTRA_CONFIGURE_ARGS=${EXTRA_CONFIGURE_ARGS} |
238 FRAMEWORK_DIR=${FRAMEWORK_DIR} | 243 FRAMEWORK_DIR=${FRAMEWORK_DIR} |
239 HEADER_DIR=${HEADER_DIR} | 244 HEADER_DIR=${HEADER_DIR} |
240 MAKE_JOBS=${MAKE_JOBS} | 245 MAKE_JOBS=${MAKE_JOBS} |
241 PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT} | 246 PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT} |
242 LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR} | 247 LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR} |
243 LIPO=${LIPO} | 248 LIPO=${LIPO} |
244 ORIG_PWD=${ORIG_PWD} | 249 ORIG_PWD=${ORIG_PWD} |
245 TARGETS="${TARGETS}" | 250 TARGETS="${TARGETS}" |
246 EOF | 251 EOF |
247 fi | 252 fi |
248 | 253 |
249 build_framework "${TARGETS}" | 254 build_framework "${TARGETS}" |
OLD | NEW |