Home | History | Annotate | Download | only in nss
      1 # Copyright (c) 2009 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   'conditions': [
      7     [ 'OS == "linux"', {
      8       'conditions': [
      9         ['sysroot!=""', {
     10           'variables': {
     11             'pkg-config': './pkg-config-wrapper "<(sysroot)"',
     12           },
     13         }, {
     14           'variables': {
     15             'pkg-config': 'pkg-config'
     16           },
     17         }],
     18       ],
     19     }],
     20   ],
     21 
     22   'targets': [
     23     {
     24       'target_name': 'ssl',
     25       'product_name': 'ssl',
     26       'type': '<(library)',
     27       'sources': [
     28         'ssl/authcert.c',
     29         'ssl/cmpcert.c',
     30         'ssl/derive.c',
     31         'ssl/nsskea.c',
     32         'ssl/os2_err.c',
     33         'ssl/os2_err.h',
     34         'ssl/preenc.h',
     35         'ssl/prelib.c',
     36         'ssl/ssl.h',
     37         'ssl/ssl3con.c',
     38         'ssl/ssl3ecc.c',
     39         'ssl/ssl3ext.c',
     40         'ssl/ssl3gthr.c',
     41         'ssl/ssl3prot.h',
     42         'ssl/sslauth.c',
     43         'ssl/sslcon.c',
     44         'ssl/ssldef.c',
     45         'ssl/sslenum.c',
     46         'ssl/sslerr.c',
     47         'ssl/sslerr.h',
     48         'ssl/sslgathr.c',
     49         'ssl/sslimpl.h',
     50         'ssl/sslinfo.c',
     51         'ssl/sslmutex.c',
     52         'ssl/sslmutex.h',
     53         'ssl/sslnonce.c',
     54         'ssl/sslproto.h',
     55         'ssl/sslreveal.c',
     56         'ssl/sslsecur.c',
     57         'ssl/sslsnce.c',
     58         'ssl/sslsock.c',
     59         'ssl/sslt.h',
     60         'ssl/ssltrace.c',
     61         'ssl/sslver.c',
     62         'ssl/unix_err.c',
     63         'ssl/unix_err.h',
     64         'ssl/win32err.c',
     65         'ssl/win32err.h',
     66         'ssl/bodge/loader.c',
     67         'ssl/bodge/loader.h',
     68         'ssl/bodge/secure_memcmp.c',
     69       ],
     70       'defines': [
     71         'NSS_ENABLE_ECC',
     72         'NSS_ENABLE_ZLIB',
     73         'USE_UTIL_DIRECTLY',
     74       ],
     75       'defines!': [
     76         # Regrettably, NSS can't be compiled with NO_NSPR_10_SUPPORT yet.
     77         'NO_NSPR_10_SUPPORT',
     78       ],
     79       'conditions': [
     80         [ 'OS == "linux"', {
     81           'sources!': [
     82             'ssl/os2_err.c',
     83             'ssl/os2_err.h',
     84             'ssl/win32err.c',
     85             'ssl/win32err.h',
     86           ],
     87           'defines': [
     88             # These macros are needed only for compiling the files in
     89             # ssl/bodge.
     90             'SHLIB_PREFIX="lib"',
     91             'SHLIB_SUFFIX="so"',
     92             'SHLIB_VERSION="3"',
     93             'SOFTOKEN_SHLIB_VERSION="3"',
     94           ],
     95           'include_dirs': [
     96             'ssl/bodge',
     97           ],
     98           'cflags': [
     99             '<!@(<(pkg-config) --cflags nss)',
    100           ],
    101           'ldflags': [
    102             '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
    103           ],
    104           'libraries': [
    105             '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
    106           ],
    107         }],
    108         [ 'OS == "win"', {
    109           'sources/': [
    110             ['exclude', 'ssl/bodge/'],
    111           ],
    112           'sources!': [
    113             'ssl/os2_err.c',
    114             'ssl/os2_err.h',
    115             'ssl/unix_err.c',
    116             'ssl/unix_err.h',
    117           ],
    118           'dependencies': [
    119             '../../../third_party/zlib/zlib.gyp:zlib',
    120             '../../../third_party/nss/nss.gyp:nss',
    121           ],
    122           'direct_dependent_settings': {
    123             'include_dirs': [
    124               'ssl',
    125             ],
    126           },
    127         }],
    128       ],
    129     },
    130   ],
    131 }
    132 
    133 # Local Variables:
    134 # tab-width:2
    135 # indent-tabs-mode:nil
    136 # End:
    137 # vim: set expandtab tabstop=2 shiftwidth=2:
    138