| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 |
| 3 # Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 2 # | 4 # |
| 3 # libjingle | 5 # Use of this source code is governed by a BSD-style license |
| 4 # Copyright 2015 Google Inc. | 6 # that can be found in the LICENSE file in the root of the source |
| 5 # | 7 # tree. An additional intellectual property rights grant can be found |
| 6 # Redistribution and use in source and binary forms, with or without | 8 # in the file PATENTS. All contributing project authors may |
| 7 # modification, are permitted provided that the following conditions are met: | 9 # be found in the AUTHORS file in the root of the source tree. |
| 8 # | |
| 9 # 1. Redistributions of source code must retain the above copyright notice, | |
| 10 # this list of conditions and the following disclaimer. | |
| 11 # 2. Redistributions in binary form must reproduce the above copyright notice, | |
| 12 # this list of conditions and the following disclaimer in the documentation | |
| 13 # and/or other materials provided with the distribution. | |
| 14 # 3. The name of the author may not be used to endorse or promote products | |
| 15 # derived from this software without specific prior written permission. | |
| 16 # | |
| 17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
| 18 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
| 19 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 20 # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
| 22 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
| 23 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
| 24 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
| 25 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
| 26 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 27 | 10 |
| 28 # Generates static FAT libraries for ios in out_ios_libs. | 11 # Generates static FAT libraries for ios in out_ios_libs. |
| 29 | 12 |
| 30 # Flag to build the new or legacy version of the API. | 13 # Flag to build the new or legacy version of the API. |
| 31 USE_LEGACY_API=1 | 14 USE_LEGACY_API=0 |
| 32 | 15 |
| 33 # Check for Darwin. | 16 # Check for Darwin. |
| 34 if [[ ! $(uname) = "Darwin" ]]; then | 17 if [[ ! $(uname) = "Darwin" ]]; then |
| 35 echo "OS/X required." >&2 | 18 echo "OS/X required." >&2 |
| 36 fi | 19 fi |
| 37 | 20 |
| 38 # Check for libtool. | 21 # Check for libtool. |
| 39 if [[ -z $(which libtool) ]]; then | 22 if [[ -z $(which libtool) ]]; then |
| 40 echo "Missing libtool binary." >&2 | 23 echo "Missing libtool binary." >&2 |
| 41 fi | 24 fi |
| 42 | 25 |
| 43 # Check for GYP generator. | 26 # Check for GYP generator. |
| 44 SCRIPT_DIR=$(dirname $0) | 27 SCRIPT_DIR=$(dirname $0) |
| 45 WEBRTC_BASE_DIR=${SCRIPT_DIR}/../.. | 28 WEBRTC_BASE_DIR=${SCRIPT_DIR}/../../.. |
| 46 GYP_WEBRTC_SCRIPT=${WEBRTC_BASE_DIR}/webrtc/build/gyp_webrtc | 29 GYP_WEBRTC_SCRIPT=${WEBRTC_BASE_DIR}/webrtc/build/gyp_webrtc |
| 47 if [[ ! -x ${GYP_WEBRTC_SCRIPT} ]]; then | 30 if [[ ! -x ${GYP_WEBRTC_SCRIPT} ]]; then |
| 48 echo "Failed to find gyp generator." >&2 | 31 echo "Failed to find gyp generator." >&2 |
| 49 exit 1 | 32 exit 1 |
| 50 fi | 33 fi |
| 51 # Check for export headers script. | 34 # Check for export headers script. |
| 52 EXPORT_HEADERS_SCRIPT=${SCRIPT_DIR}/export_headers | 35 EXPORT_HEADERS_SCRIPT=${SCRIPT_DIR}/export_headers |
| 53 if [[ ! -x ${EXPORT_HEADERS_SCRIPT} ]]; then | 36 if [[ ! -x ${EXPORT_HEADERS_SCRIPT} ]]; then |
| 54 echo "Failed to find export headers script." >&2 | 37 echo "Failed to find export headers script." >&2 |
| 55 exit 1 | 38 exit 1 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 build_webrtc "out_ios_x86_64" "Release" "x64" | 77 build_webrtc "out_ios_x86_64" "Release" "x64" |
| 95 | 78 |
| 96 popd | 79 popd |
| 97 | 80 |
| 98 # Export header files. | 81 # Export header files. |
| 99 ${EXPORT_HEADERS_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} \ | 82 ${EXPORT_HEADERS_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} \ |
| 100 ${USE_LEGACY_API} | 83 ${USE_LEGACY_API} |
| 101 | 84 |
| 102 # Merge the libraries together. | 85 # Merge the libraries together. |
| 103 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} | 86 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} |
| OLD | NEW |