| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'targets': [ | 6 'targets': [ |
| 7 { | 7 { |
| 8 'target_name': 'openssl', | 8 'target_name': 'openssl', |
| 9 'type': '<(component)', | 9 'type': 'static_library', |
| 10 'includes': [ | 10 'dependencies': [ |
| 11 # Include the auto-generated gypi file. | 11 '../boringssl/boringssl.gyp:boringssl', |
| 12 'openssl.gypi' | |
| 13 ], | |
| 14 'variables': { | |
| 15 'openssl_include_dirs': [ | |
| 16 '.', | |
| 17 'openssl', | |
| 18 'openssl/crypto', | |
| 19 'openssl/crypto/asn1', | |
| 20 'openssl/crypto/evp', | |
| 21 'openssl/crypto/modes', | |
| 22 'openssl/include', | |
| 23 ], | |
| 24 'openssl_public_include_dirs': [ | |
| 25 'openssl/include', | |
| 26 ], | |
| 27 }, | |
| 28 'sources': [ | |
| 29 '<@(openssl_common_sources)', | |
| 30 ], | |
| 31 'defines': [ | |
| 32 '<@(openssl_common_defines)', | |
| 33 'PURIFY', | |
| 34 'MONOLITH', | |
| 35 'OPENSSL_NO_ASM', | |
| 36 ], | |
| 37 'defines!': [ | |
| 38 'TERMIO', | |
| 39 ], | |
| 40 'conditions': [ | |
| 41 ['os_posix==1 and OS!="android"', { | |
| 42 'defines': [ | |
| 43 # ENGINESDIR must be defined if OPENSSLDIR is. | |
| 44 'ENGINESDIR="/dev/null"', | |
| 45 # Set to ubuntu default path for convenience. If necessary, override | |
| 46 # this at runtime with the SSL_CERT_DIR environment variable. | |
| 47 'OPENSSLDIR="/etc/ssl"', | |
| 48 ], | |
| 49 }], | |
| 50 ['target_arch == "arm"', { | |
| 51 'sources': [ '<@(openssl_arm_sources)' ], | |
| 52 'sources!': [ '<@(openssl_arm_source_excludes)' ], | |
| 53 'defines': [ '<@(openssl_arm_defines)' ], | |
| 54 'defines!': [ 'OPENSSL_NO_ASM' ], | |
| 55 }], | |
| 56 ['target_arch == "mipsel"', { | |
| 57 'sources': [ '<@(openssl_mips_sources)' ], | |
| 58 'sources!': [ '<@(openssl_mips_source_excludes)' ], | |
| 59 'defines': [ '<@(openssl_mips_defines)' ], | |
| 60 'defines!': [ 'OPENSSL_NO_ASM' ], | |
| 61 }], | |
| 62 ['target_arch == "ia32" and OS !="mac"', { | |
| 63 'sources': [ '<@(openssl_x86_sources)' ], | |
| 64 'sources!': [ '<@(openssl_x86_source_excludes)' ], | |
| 65 'defines': [ '<@(openssl_x86_defines)' ], | |
| 66 'defines!': [ 'OPENSSL_NO_ASM' ], | |
| 67 }], | |
| 68 ['target_arch == "ia32" and OS == "mac"', { | |
| 69 'sources': [ '<@(openssl_mac_ia32_sources)' ], | |
| 70 'sources!': [ '<@(openssl_mac_ia32_source_excludes)' ], | |
| 71 'defines': [ '<@(openssl_mac_ia32_defines)' ], | |
| 72 'defines!': [ 'OPENSSL_NO_ASM' ], | |
| 73 'variables': { | |
| 74 # Ensure the 32-bit opensslconf.h header for OS X is used. | |
| 75 'openssl_include_dirs+': [ 'config/mac/ia32' ], | |
| 76 'openssl_public_include_dirs+': [ 'config/mac/ia32' ], | |
| 77 }, | |
| 78 'xcode_settings': { | |
| 79 # Clang needs this to understand the inline assembly keyword 'asm'. | |
| 80 'GCC_C_LANGUAGE_STANDARD': 'gnu99', | |
| 81 }, | |
| 82 }], | |
| 83 ['target_arch == "x64"', { | |
| 84 'sources': [ '<@(openssl_x86_64_sources)' ], | |
| 85 'sources!': [ '<@(openssl_x86_64_source_excludes)' ], | |
| 86 'defines': [ '<@(openssl_x86_64_defines)' ], | |
| 87 'defines!': [ 'OPENSSL_NO_ASM' ], | |
| 88 'variables': { | |
| 89 # Ensure the 64-bit opensslconf.h header is used. | |
| 90 'openssl_include_dirs+': [ 'config/x64' ], | |
| 91 'openssl_public_include_dirs+': [ 'config/x64' ], | |
| 92 }, | |
| 93 }], | |
| 94 ['component == "shared_library"', { | |
| 95 'xcode_settings': { | |
| 96 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden | |
| 97 }, | |
| 98 'cflags!': ['-fvisibility=hidden'], | |
| 99 }], | |
| 100 ['clang==1', { | |
| 101 'cflags': [ | |
| 102 # OpenSSL has a few |if ((foo == NULL))| checks. | |
| 103 '-Wno-parentheses-equality', | |
| 104 # OpenSSL uses several function-style macros and then ignores the | |
| 105 # returned value. | |
| 106 '-Wno-unused-value', | |
| 107 ], | |
| 108 }, { # Not clang. Disable all warnings. | |
| 109 'cflags': [ | |
| 110 '-w', | |
| 111 ], | |
| 112 }] | |
| 113 ], | |
| 114 'include_dirs': [ | |
| 115 '<@(openssl_include_dirs)', | |
| 116 ], | 12 ], |
| 117 'direct_dependent_settings': { | 13 'direct_dependent_settings': { |
| 118 'include_dirs': [ | 14 'include_dirs': [ |
| 119 '<@(openssl_public_include_dirs)', | 15 '../boringssl/src/include', |
| 120 ], | 16 ], |
| 121 }, | 17 }, |
| 122 }, | 18 }, |
| 123 ], | 19 ], |
| 124 } | 20 } |
| 125 | 21 |
| 126 # Local Variables: | 22 # Local Variables: |
| 127 # tab-width:2 | 23 # tab-width:2 |
| 128 # indent-tabs-mode:nil | 24 # indent-tabs-mode:nil |
| 129 # End: | 25 # End: |
| 130 # vim: set expandtab tabstop=2 shiftwidth=2: | 26 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |