deps: make opensslconf.h include each target arch
[platform/upstream/nodejs.git] / deps / openssl / openssl.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   'variables': {
7     'is_clang': 0,
8     'gcc_version': 0,
9     'openssl_no_asm%': 0
10   },
11   'includes': ['openssl.gypi'],
12   'targets': [
13     {
14       'target_name': 'openssl',
15       'type': '<(library)',
16       'sources': ['<@(openssl_sources)'],
17       'sources/': [
18         ['exclude', 'md2/.*$'],
19         ['exclude', 'store/.*$']
20       ],
21       'conditions': [
22         ['openssl_no_asm!=0', {
23           # Disable asm
24           'defines': [
25             'OPENSSL_NO_ASM',
26           ],
27           'sources': ['<@(openssl_sources_no_asm)'],
28         }, {
29           # "else if" was supported in https://codereview.chromium.org/601353002
30           'conditions': [
31             ['target_arch=="arm"', {
32               'defines': ['<@(openssl_defines_asm)'],
33               'sources': ['<@(openssl_sources_arm_elf_gas)'],
34             }, 'target_arch=="ia32" and OS=="mac"', {
35               'defines': [
36                 '<@(openssl_defines_asm)',
37                 '<@(openssl_defines_ia32_mac)',
38               ],
39               'sources': ['<@(openssl_sources_ia32_mac_gas)'],
40             }, 'target_arch=="ia32" and OS=="win"', {
41               'defines': [
42                 '<@(openssl_defines_asm)',
43                 '<@(openssl_defines_ia32_win)',
44               ],
45               'sources': ['<@(openssl_sources_ia32_win_masm)'],
46             }, 'target_arch=="ia32"', {
47               # Linux or others
48               'defines': [
49                 '<@(openssl_defines_asm)',
50                 '<@(openssl_defines_ia32_elf)',
51               ],
52               'sources': ['<@(openssl_sources_ia32_elf_gas)'],
53             }, 'target_arch=="x64" and OS=="mac"', {
54               'defines': [
55                 '<@(openssl_defines_asm)',
56                 '<@(openssl_defines_x64_mac)',
57               ],
58               'sources': ['<@(openssl_sources_x64_mac_gas)'],
59             }, 'target_arch=="x64" and OS=="win"', {
60               'defines': [
61                 '<@(openssl_defines_asm)',
62                 '<@(openssl_defines_x64_win)',
63               ],
64               'sources': ['<@(openssl_sources_x64_win_masm)'],
65             }, 'target_arch=="x64"', {
66               # Linux or others
67               'defines': [
68                 '<@(openssl_defines_asm)',
69                 '<@(openssl_defines_x64_elf)',
70               ],
71               'sources': ['<@(openssl_sources_x64_elf_gas)'],
72             }, {
73               # Other architectures don't use assembly.
74               'defines': ['OPENSSL_NO_ASM'],
75               'sources': ['<@(openssl_sources_no_asm)'],
76             }],
77           ],
78         }], # end of conditions of openssl_no_asm
79         ['OS=="win"', {
80           'defines' : ['<@(openssl_defines_all_win)'],
81           'includes': ['masm_compile.gypi',],
82         }, {
83           'defines' : ['<@(openssl_defines_all_non_win)']
84         }]
85       ],
86       'include_dirs': ['<@(openssl_include_dirs)'],
87       'direct_dependent_settings': {
88         'include_dirs': [
89           'openssl/include'
90         ],
91       },
92     },
93     {
94       # openssl-cli target
95       'includes': ['openssl-cli.gypi',],
96     }
97   ],
98   'target_defaults': {
99     'include_dirs': ['<@(openssl_default_include_dirs)'],
100     'defines': ['<@(openssl_default_defines_all)'],
101     'conditions': [
102       ['OS=="win"', {
103         'defines': ['<@(openssl_default_defines_win)'],
104         'link_settings': {
105           'libraries': ['<@(openssl_default_libraries_win)'],
106         },
107       }, {
108         'defines': ['<@(openssl_default_defines_not_win)'],
109         'cflags': ['-Wno-missing-field-initializers'],
110         'conditions': [
111           ['OS=="mac"', {
112             'defines': ['<@(openssl_default_defines_mac)'],
113           }, {
114             'defines': ['<@(openssl_default_defines_linux_others)'],
115           }],
116         ]
117       }],
118       ['is_clang==1 or gcc_version>=43', {
119         'cflags': ['-Wno-old-style-declaration'],
120       }],
121       ['OS=="solaris"', {
122         'defines': ['__EXTENSIONS__'],
123       }],
124     ],
125   },
126 }
127
128 # Local Variables:
129 # tab-width:2
130 # indent-tabs-mode:nil
131 # End:
132 # vim: set expandtab tabstop=2 shiftwidth=2: