Return backed up TemplateURL on default search change
[chromium-blink-merge.git] / chrome / nacl.gypi
blob6a9a418955eac6362838731e78637d47a6aa4313
1 # Copyright (c) 2011 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.
6   'include': [
7     '../native_client/build/untrusted.gypi',
8   ],
9   'target_defaults': {
10     'variables': {
11       'nacl_target': 0,
12     },
13     'target_conditions': [
14       # This part is shared between the targets defined below. Only files and
15       # settings relevant for building the Win64 target should be added here.
16       ['nacl_target==1', {
17         'include_dirs': [
18           '<(INTERMEDIATE_DIR)',
19         ],
20         'defines': [
21           '<@(nacl_defines)',
22         ],
23         'sources': [
24           # .cc, .h, and .mm files under nacl that are used on all
25           # platforms, including both 32-bit and 64-bit Windows.
26           # Test files are also not included.
27           'nacl/nacl_main.cc',
28           'nacl/nacl_main_platform_delegate.h',
29           'nacl/nacl_main_platform_delegate_linux.cc',
30           'nacl/nacl_main_platform_delegate_mac.mm',
31           'nacl/nacl_main_platform_delegate_win.cc',
32           'nacl/nacl_listener.cc',
33           'nacl/nacl_listener.h',
34         ],
35         # TODO(gregoryd): consider switching NaCl to use Chrome OS defines
36         'conditions': [
37           ['OS=="win"', {
38             'defines': [
39               '__STDC_LIMIT_MACROS=1',
40             ],
41             'include_dirs': [
42               '<(DEPTH)/third_party/wtl/include',
43             ],
44           },],
45           ['OS=="linux"', {
46             'defines': [
47               '__STDC_LIMIT_MACROS=1',
48             ],
49             'sources': [
50               'app/nacl_fork_delegate_linux.cc',
51               'app/nacl_fork_delegate_linux.h',
52             ],
53           },],
54         ],
55       }],
56     ],
57   },
58   'conditions': [
59     ['disable_nacl!=1', {
60       'targets': [
61         {
62           'target_name': 'nacl',
63           'type': 'static_library',
64           'variables': {
65             'nacl_target': 1,
66           },
67           'dependencies': [
68             '../base/base.gyp:base',
69             '../ipc/ipc.gyp:ipc',
70             '../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
71             '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
72             '../native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib',
73           ],
74           'conditions': [
75             ['disable_nacl_untrusted==0', {
76               'dependencies': [
77                 '../ppapi/native_client/native_client.gyp:nacl_irt',
78               ],
79             }],
80           ],
81           'direct_dependent_settings': {
82             'defines': [
83               '<@(nacl_defines)',
84             ],
85           },
86         },
87       ],
88       'conditions': [
89         ['OS=="win"', {
90           'targets': [
91             {
92               'target_name': 'nacl_win64',
93               'type': 'static_library',
94               'variables': {
95                 'nacl_target': 1,
96               },
97               'dependencies': [
98                 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel64',
99                 '../native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib64',
100               ],
101               'sources': [
102                 'common/nacl_cmd_line.cc',
103                 'common/nacl_messages.cc',
104                 'nacl/nacl_broker_listener.cc',
105                 'nacl/nacl_broker_listener.h',
106               ],
107               'include_dirs': [
108                 '..',
109               ],
110               'defines': [
111                 '<@(nacl_win64_defines)',
112                 'COMPILE_CONTENT_STATICALLY',
113               ],
114               'configurations': {
115                 'Common_Base': {
116                   'msvs_target_platform': 'x64',
117                 },
118               },
119               'direct_dependent_settings': {
120                 'defines': [
121                   '<@(nacl_defines)',
122                 ],
123               },
124             },
125           ],
126         }],
127         ['OS=="linux" and coverage==0', {
128           'targets': [
129             {
130               'target_name': 'nacl_helper',
131               'type': 'executable',
132               'include_dirs': [
133                 '..',
134               ],
135               'dependencies': [
136                 'nacl',
137               ],
138               'sources': [
139                 'nacl/nacl_helper_linux.cc',
140                 '../chrome/common/nacl_messages.cc',
141                 '../content/common/child_process_sandbox_support_impl_shm_linux.cc',
142                 '../content/common/unix_domain_socket_posix.cc',
143               ],
144               'conditions': [
145                 ['toolkit_uses_gtk == 1', {
146                   'dependencies': [
147                     '../build/linux/system.gyp:gtk',
148                   ],
149                 }],
150                 ['use_glib == 1', {
151                   'dependencies': [
152                     '../build/linux/system.gyp:glib',
153                   ],
154                 }],
155                 ['os_posix == 1 and OS != "mac"', {
156                   'conditions': [
157                     ['linux_use_tcmalloc==1', {
158                       'dependencies': [
159                         '../base/allocator/allocator.gyp:allocator',
160                       ],
161                     }],
162                   ],
163                 }],
164               ],
165               'cflags': ['-fPIE'],
166               'link_settings': {
167                 'ldflags': ['-pie'],
168               },
169             },
170           ],
171         }],
172       ],
173     }, {  # else (disable_nacl==1)
174       'targets': [
175         {
176           'target_name': 'nacl',
177           'type': 'none',
178           'sources': [],
179         },
180       ],
181       'conditions': [
182         ['OS=="win"', {
183           'targets': [
184             {
185               'target_name': 'nacl_win64',
186               'type': 'none',
187               'sources': [],
188             },
189           ],
190         }],
191       ],
192     }],
193   ],