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 3 # found in the LICENSE file. 4 5 { 6 'targets': [ 7 { 8 'target_name': 'openssl', 9 'type': '<(component)', 10 'includes': [ 11 # Include the auto-generated gypi file. 12 '../../third_party/openssl/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 }, 25 'sources': [ 26 '<@(openssl_common_sources)', 27 ], 28 'defines': [ 29 '<@(openssl_common_defines)', 30 'PURIFY', 31 'MONOLITH', 32 'OPENSSL_NO_ASM', 33 ], 34 'defines!': [ 35 'TERMIO', 36 ], 37 'conditions': [ 38 ['os_posix==1 and OS!="android"', { 39 'defines': [ 40 # ENGINESDIR must be defined if OPENSSLDIR is. 41 'ENGINESDIR="/dev/null"', 42 # Set to ubuntu default path for convenience. If necessary, override 43 # this at runtime with the SSL_CERT_DIR environment variable. 44 'OPENSSLDIR="/etc/ssl"', 45 ], 46 }], 47 ['target_arch == "arm"', { 48 'sources': [ '<@(openssl_arm_sources)' ], 49 'sources!': [ '<@(openssl_arm_source_excludes)' ], 50 'defines': [ '<@(openssl_arm_defines)' ], 51 'defines!': [ 'OPENSSL_NO_ASM' ], 52 }], 53 ['target_arch == "mipsel"', { 54 'sources': [ '<@(openssl_mips_sources)' ], 55 'sources!': [ '<@(openssl_mips_source_excludes)' ], 56 'defines': [ '<@(openssl_mips_defines)' ], 57 'defines!': [ 'OPENSSL_NO_ASM' ], 58 }], 59 ['target_arch == "ia32"', { 60 'sources': [ '<@(openssl_x86_sources)' ], 61 'sources!': [ '<@(openssl_x86_source_excludes)' ], 62 'defines': [ '<@(openssl_x86_defines)' ], 63 'defines!': [ 'OPENSSL_NO_ASM' ], 64 }], 65 ['target_arch == "x64"', { 66 'sources': [ '<@(openssl_x86_64_sources)' ], 67 'sources!': [ '<@(openssl_x86_64_source_excludes)' ], 68 'conditions': [ 69 ['OS != "android"', { 70 # Because rc4-x86_64.S has a problem, 71 # We use the C rc4 source instead of the ASM source. 72 # This hurts performance, but it's not a problem 73 # because no production code uses openssl on x86-64. 74 'sources/': [ 75 ['exclude', 'openssl/crypto/rc4/asm/rc4-x86_64\\.S' ], 76 ['include', 'openssl/crypto/rc4/rc4_enc\\.c' ], 77 ['include', 'openssl/crypto/rc4/rc4_skey\\.c' ], 78 ], 79 }] 80 ], 81 'defines': [ '<@(openssl_x86_64_defines)' ], 82 'defines!': [ 'OPENSSL_NO_ASM' ], 83 'variables': { 84 # Ensure the 64-bit opensslconf.h header is used. 85 'openssl_include_dirs+': [ 'config/x64' ], 86 }, 87 }], 88 ['component == "shared_library"', { 89 'cflags!': ['-fvisibility=hidden'], 90 }], 91 ['clang==1', { 92 'cflags': [ 93 # OpenSSL has a few |if ((foo == NULL))| checks. 94 '-Wno-parentheses-equality', 95 # OpenSSL uses several function-style macros and then ignores the 96 # returned value. 97 '-Wno-unused-value', 98 ], 99 }, { # Not clang. Disable all warnings. 100 'cflags': [ 101 '-w', 102 ], 103 }] 104 ], 105 'include_dirs': [ 106 '<@(openssl_include_dirs)', 107 ], 108 'direct_dependent_settings': { 109 'include_dirs': [ 110 'openssl/include', 111 ], 112 }, 113 }, 114 ], 115 } 116 117 # Local Variables: 118 # tab-width:2 119 # indent-tabs-mode:nil 120 # End: 121 # vim: set expandtab tabstop=2 shiftwidth=2: 122