Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / net / third_party / nss / ssl.gyp
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   'conditions': [
7     [ 'os_posix == 1 and OS != "mac" and OS != "ios"', {
8       'conditions': [
9         ['sysroot!=""', {
10           'variables': {
11             'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"',
12           },
13         }, {
14           'variables': {
15             'pkg-config': 'pkg-config'
16           },
17         }],
18       ],
19     }],
20   ],
21
22   'targets': [
23     {
24       'target_name': 'libssl',
25       'type': '<(component)',
26       'product_name': 'crssl',  # Don't conflict with OpenSSL's libssl
27       'sources': [
28         'ssl/authcert.c',
29         'ssl/cmpcert.c',
30         'ssl/derive.c',
31         'ssl/dtlscon.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/SSLerrs.h',
49         'ssl/sslerrstrs.c',
50         'ssl/sslgathr.c',
51         'ssl/sslimpl.h',
52         'ssl/sslinfo.c',
53         'ssl/sslinit.c',
54         'ssl/sslmutex.c',
55         'ssl/sslmutex.h',
56         'ssl/sslnonce.c',
57         'ssl/sslplatf.c',
58         'ssl/sslproto.h',
59         'ssl/sslreveal.c',
60         'ssl/sslsecur.c',
61         'ssl/sslsnce.c',
62         'ssl/sslsock.c',
63         'ssl/sslt.h',
64         'ssl/ssltrace.c',
65         'ssl/sslver.c',
66         'ssl/unix_err.c',
67         'ssl/unix_err.h',
68         'ssl/win32err.c',
69         'ssl/win32err.h',
70         'ssl/bodge/secitem_array.c',
71       ],
72       'sources!': [
73         'ssl/os2_err.c',
74         'ssl/os2_err.h',
75       ],
76       'defines': [
77         'NO_PKCS11_BYPASS',
78         'NSS_ENABLE_ECC',
79         'USE_UTIL_DIRECTLY',
80       ],
81       'msvs_disabled_warnings': [4018, 4244, 4267],
82       'conditions': [
83         ['component == "shared_library"', {
84           'conditions': [
85             ['OS == "mac" or OS == "ios"', {
86               'xcode_settings': {
87                 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
88               },
89             }],
90             ['OS == "win"', {
91               'sources': [
92                 'ssl/exports_win.def',
93               ],
94             }],
95             ['os_posix == 1 and OS != "mac" and OS != "ios"', {
96               'cflags!': ['-fvisibility=hidden'],
97             }],
98           ],
99         }],
100         [ 'clang == 1', {
101           'cflags': [
102             # There is a broken header guard in /usr/include/nss/secmod.h:
103             # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
104             '-Wno-header-guard',
105           ],
106         }],
107         [ 'OS == "linux"', {
108           'link_settings': {
109             'libraries': [
110               '-ldl',
111             ],
112           },
113         }],
114         [ 'OS == "mac" or OS == "ios"', {
115           'defines': [
116             'XP_UNIX',
117             'DARWIN',
118             'XP_MACOSX',
119           ],
120         }],
121         [ 'OS == "mac"', {
122           'link_settings': {
123             'libraries': [
124               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
125             ],
126           },
127         }],
128         [ 'OS == "win"', {
129             'sources!': [
130               'ssl/unix_err.c',
131               'ssl/unix_err.h',
132             ],
133           },
134           {  # else: OS != "win"
135             'sources!': [
136               'ssl/win32err.c',
137               'ssl/win32err.h',
138             ],
139           },
140         ],
141         [ 'os_posix == 1 and OS != "mac" and OS != "ios"', {
142           'include_dirs': [
143             'ssl/bodge',
144           ],
145           'cflags': [
146             '<!@(<(pkg-config) --cflags nss)',
147           ],
148           'ldflags': [
149             '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
150           ],
151           'libraries': [
152             '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
153           ],
154         }],
155         [ 'OS == "mac" or OS == "ios" or OS == "win"', {
156           'sources/': [
157             ['exclude', 'ssl/bodge/'],
158           ],
159           'conditions': [
160             ['OS != "ios"', {
161               'defines': [
162                 'NSS_PLATFORM_CLIENT_AUTH',
163               ],
164               'direct_dependent_settings': {
165                 'defines': [
166                   'NSS_PLATFORM_CLIENT_AUTH',
167                 ],
168               },
169             }],
170           ],
171           'dependencies': [
172             '../../../third_party/nss/nss.gyp:nspr',
173             '../../../third_party/nss/nss.gyp:nss',
174           ],
175           'export_dependent_settings': [
176             '../../../third_party/nss/nss.gyp:nspr',
177             '../../../third_party/nss/nss.gyp:nss',
178           ],
179           'direct_dependent_settings': {
180             'include_dirs': [
181               'ssl',
182             ],
183           },
184         }],
185       ],
186       'configurations': {
187         'Debug_Base': {
188           'defines': [
189             'DEBUG',
190           ],
191         },
192       },
193     },
194   ],
195 }