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 ## |
11 ## | 11 ## |
12 ## This script generates 'VPX.framework'. An iOS app can encode and decode VPx | 12 ## This script generates 'VPX.framework'. An iOS app can encode and decode VPx |
13 ## video by including 'VPX.framework'. | 13 ## video by including 'VPX.framework'. |
14 ## | 14 ## |
15 ## Run iosbuild.sh to create 'VPX.framework' in the current directory. | 15 ## Run iosbuild.sh to create 'VPX.framework' in the current directory. |
16 ## | 16 ## |
17 set -e | 17 set -e |
18 devnull='> /dev/null 2>&1' | 18 devnull='> /dev/null 2>&1' |
19 | 19 |
20 BUILD_ROOT="_iosbuild" | 20 BUILD_ROOT="_iosbuild" |
21 DIST_DIR="_dist" | 21 DIST_DIR="_dist" |
22 FRAMEWORK_DIR="VPX.framework" | 22 FRAMEWORK_DIR="VPX.framework" |
23 HEADER_DIR="${FRAMEWORK_DIR}/Headers/vpx" | 23 HEADER_DIR="${FRAMEWORK_DIR}/Headers/vpx" |
24 MAKE_JOBS=1 | 24 MAKE_JOBS=1 |
25 LIBVPX_SOURCE_DIR=$(dirname "$0" | sed -e s,/build/make,,) | 25 LIBVPX_SOURCE_DIR=$(dirname "$0" | sed -e s,/build/make,,) |
26 LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo) | 26 LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo) |
27 ORIG_PWD="$(pwd)" | 27 ORIG_PWD="$(pwd)" |
28 TARGETS="arm64-darwin-gcc | 28 TARGETS="arm64-darwin-gcc |
29 armv6-darwin-gcc | |
30 armv7-darwin-gcc | 29 armv7-darwin-gcc |
31 armv7s-darwin-gcc | 30 armv7s-darwin-gcc |
32 x86-iphonesimulator-gcc | 31 x86-iphonesimulator-gcc |
33 x86_64-iphonesimulator-gcc" | 32 x86_64-iphonesimulator-gcc" |
34 | 33 |
35 # Configures for the target specified by $1, and invokes make with the dist | 34 # Configures for the target specified by $1, and invokes make with the dist |
36 # target using $DIST_DIR as the distribution output directory. | 35 # target using $DIST_DIR as the distribution output directory. |
37 build_target() { | 36 build_target() { |
38 local target="$1" | 37 local target="$1" |
39 local old_pwd="$(pwd)" | 38 local old_pwd="$(pwd)" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 MAKE_JOBS=${MAKE_JOBS} | 244 MAKE_JOBS=${MAKE_JOBS} |
246 PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT} | 245 PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT} |
247 LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR} | 246 LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR} |
248 LIPO=${LIPO} | 247 LIPO=${LIPO} |
249 ORIG_PWD=${ORIG_PWD} | 248 ORIG_PWD=${ORIG_PWD} |
250 TARGETS="${TARGETS}" | 249 TARGETS="${TARGETS}" |
251 EOF | 250 EOF |
252 fi | 251 fi |
253 | 252 |
254 build_framework "${TARGETS}" | 253 build_framework "${TARGETS}" |
OLD | NEW |