OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright 2015 The WebRTC project authors. All Rights Reserved. | 3 # Copyright 2015 The WebRTC 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 # Generates static FAT libraries for ios in out_ios_libs. | 11 # Generates static FAT libraries for ios in out_ios_libs. |
12 | 12 |
13 # Exit on errors. | 13 # Exit on errors. |
14 set -e | 14 set -e |
15 | 15 |
16 # Globals. | 16 # Globals. |
17 SCRIPT_DIR=$(cd $(dirname $0) && pwd) | 17 SCRIPT_DIR=$(cd $(dirname $0) && pwd) |
18 WEBRTC_BASE_DIR=${SCRIPT_DIR}/../../.. | 18 WEBRTC_BASE_DIR=${SCRIPT_DIR}/../../.. |
19 GYP_WEBRTC_SCRIPT=${WEBRTC_BASE_DIR}/webrtc/build/gyp_webrtc | 19 GYP_WEBRTC_SCRIPT=${WEBRTC_BASE_DIR}/webrtc/build/gyp_webrtc.py |
20 EXPORT_HEADERS_SCRIPT=${SCRIPT_DIR}/export_headers.py | 20 EXPORT_HEADERS_SCRIPT=${SCRIPT_DIR}/export_headers.py |
21 MERGE_SCRIPT=${SCRIPT_DIR}/merge_ios_libs.py | 21 MERGE_SCRIPT=${SCRIPT_DIR}/merge_ios_libs.py |
22 | 22 |
23 function check_preconditions { | 23 function check_preconditions { |
24 # Check for Darwin. | 24 # Check for Darwin. |
25 if [[ ! $(uname) = "Darwin" ]]; then | 25 if [[ ! $(uname) = "Darwin" ]]; then |
26 echo "OS/X required." >&2 | 26 echo "OS/X required." >&2 |
27 exit 1 | 27 exit 1 |
28 fi | 28 fi |
29 | 29 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 else | 63 else |
64 flavor="${flavor}-iphonesimulator" | 64 flavor="${flavor}-iphonesimulator" |
65 fi | 65 fi |
66 export GYP_DEFINES="OS=ios target_arch=${target_arch} use_objc_h264=1 \ | 66 export GYP_DEFINES="OS=ios target_arch=${target_arch} use_objc_h264=1 \ |
67 clang_xcode=1 ios_override_visibility=1" | 67 clang_xcode=1 ios_override_visibility=1" |
68 export GYP_GENERATORS="ninja" | 68 export GYP_GENERATORS="ninja" |
69 export GYP_GENERATOR_FLAGS="output_dir=${ninja_output_dir}" | 69 export GYP_GENERATOR_FLAGS="output_dir=${ninja_output_dir}" |
70 | 70 |
71 # GYP generation requires relative path for some reason. | 71 # GYP generation requires relative path for some reason. |
72 pushd ${WEBRTC_BASE_DIR} | 72 pushd ${WEBRTC_BASE_DIR} |
73 webrtc/build/gyp_webrtc webrtc/build/ios/merge_ios_libs.gyp | 73 ${GYP_WEBRTC_SCRIPT} webrtc/build/ios/merge_ios_libs.gyp |
74 popd | 74 popd |
75 if [[ ${USE_LEGACY_API} -eq 1 ]]; then | 75 if [[ ${USE_LEGACY_API} -eq 1 ]]; then |
76 ninja -C ${ninja_output_dir}/${flavor} libjingle_peerconnection_objc_no_op | 76 ninja -C ${ninja_output_dir}/${flavor} libjingle_peerconnection_objc_no_op |
77 else | 77 else |
78 ninja -C ${ninja_output_dir}/${flavor} webrtc_api_objc_no_op | 78 ninja -C ${ninja_output_dir}/${flavor} webrtc_api_objc_no_op |
79 fi | 79 fi |
80 mkdir -p ${library_output_dir} | 80 mkdir -p ${library_output_dir} |
81 | 81 |
82 for f in ${ninja_output_dir}/${flavor}/*.a | 82 for f in ${ninja_output_dir}/${flavor}/*.a |
83 do | 83 do |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 do | 138 do |
139 echo "Building WebRTC arch: ${arch}" | 139 echo "Building WebRTC arch: ${arch}" |
140 build_webrtc ${OUTPUT_DIR} "Profile" $arch | 140 build_webrtc ${OUTPUT_DIR} "Profile" $arch |
141 done | 141 done |
142 | 142 |
143 # Export header files. | 143 # Export header files. |
144 ${EXPORT_HEADERS_SCRIPT} ${OUTPUT_DIR} ${USE_LEGACY_API} | 144 ${EXPORT_HEADERS_SCRIPT} ${OUTPUT_DIR} ${USE_LEGACY_API} |
145 | 145 |
146 # Merge the libraries together. | 146 # Merge the libraries together. |
147 ${MERGE_SCRIPT} ${OUTPUT_DIR} | 147 ${MERGE_SCRIPT} ${OUTPUT_DIR} |
OLD | NEW |