Updates version of android sdk and api installed and creates ARM and x86 AVD's.
[chromium-blink-merge.git] / sandbox / sandbox_win.gypi
blob86506c16c009430ae06c05a19f77799893c98003
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.
6   'target_defaults': {
7     'variables': {
8       'sandbox_windows_target': 0,
9     },
10     'target_conditions': [
11       ['sandbox_windows_target==1', {
12         # Files that are shared between the 32-bit and the 64-bit versions
13         # of the Windows sandbox library.
14         'sources': [
15             'src/acl.cc',
16             'src/acl.h',
17             'src/broker_services.cc',
18             'src/broker_services.h',
19             'src/crosscall_client.h',
20             'src/crosscall_params.h',
21             'src/crosscall_server.cc',
22             'src/crosscall_server.h',
23             'src/dep.cc',
24             'src/dep.h',
25             'src/eat_resolver.cc',
26             'src/eat_resolver.h',
27             'src/filesystem_dispatcher.cc',
28             'src/filesystem_dispatcher.h',
29             'src/filesystem_interception.cc',
30             'src/filesystem_interception.h',
31             'src/filesystem_policy.cc',
32             'src/filesystem_policy.h',
33             'src/handle_closer.cc',
34             'src/handle_closer.h',
35             'src/handle_closer_agent.cc',
36             'src/handle_closer_agent.h',
37             'src/handle_dispatcher.cc',
38             'src/handle_dispatcher.h',
39             'src/handle_interception.cc',
40             'src/handle_interception.h',
41             'src/handle_policy.cc',
42             'src/handle_policy.h',
43             'src/handle_table.cc',
44             'src/handle_table.h',
45             'src/interception.cc',
46             'src/interception.h',
47             'src/interception_agent.cc',
48             'src/interception_agent.h',
49             'src/interception_internal.h',
50             'src/interceptors.h',
51             'src/internal_types.h',
52             'src/ipc_tags.h',
53             'src/job.cc',
54             'src/job.h',
55             'src/named_pipe_dispatcher.cc',
56             'src/named_pipe_dispatcher.h',
57             'src/named_pipe_interception.cc',
58             'src/named_pipe_interception.h',
59             'src/named_pipe_policy.cc',
60             'src/named_pipe_policy.h',
61             'src/nt_internals.h',
62             'src/policy_broker.cc',
63             'src/policy_broker.h',
64             'src/policy_engine_opcodes.cc',
65             'src/policy_engine_opcodes.h',
66             'src/policy_engine_params.h',
67             'src/policy_engine_processor.cc',
68             'src/policy_engine_processor.h',
69             'src/policy_low_level.cc',
70             'src/policy_low_level.h',
71             'src/policy_params.h',
72             'src/policy_target.cc',
73             'src/policy_target.h',
74             'src/process_thread_dispatcher.cc',
75             'src/process_thread_dispatcher.h',
76             'src/process_thread_interception.cc',
77             'src/process_thread_interception.h',
78             'src/process_thread_policy.cc',
79             'src/process_thread_policy.h',
80             'src/registry_dispatcher.cc',
81             'src/registry_dispatcher.h',
82             'src/registry_interception.cc',
83             'src/registry_interception.h',
84             'src/registry_policy.cc',
85             'src/registry_policy.h',
86             'src/resolver.cc',
87             'src/resolver.h',
88             'src/restricted_token_utils.cc',
89             'src/restricted_token_utils.h',
90             'src/restricted_token.cc',
91             'src/restricted_token.h',
92             'src/sandbox_factory.h',
93             'src/sandbox_nt_types.h',
94             'src/sandbox_nt_util.cc',
95             'src/sandbox_nt_util.h',
96             'src/sandbox_policy_base.cc',
97             'src/sandbox_policy_base.h',
98             'src/sandbox_policy.h',
99             'src/sandbox_types.h',
100             'src/sandbox_utils.cc',
101             'src/sandbox_utils.h',
102             'src/sandbox.cc',
103             'src/sandbox.h',
104             'src/security_level.h',
105             'src/service_resolver.cc',
106             'src/service_resolver.h',
107             'src/shared_handles.cc',
108             'src/shared_handles.h',
109             'src/sharedmem_ipc_client.cc',
110             'src/sharedmem_ipc_client.h',
111             'src/sharedmem_ipc_server.cc',
112             'src/sharedmem_ipc_server.h',
113             'src/sid.cc',
114             'src/sid.h',
115             'src/sync_dispatcher.cc',
116             'src/sync_dispatcher.h',
117             'src/sync_interception.cc',
118             'src/sync_interception.h',
119             'src/sync_policy.cc',
120             'src/sync_policy.h',
121             'src/target_interceptions.cc',
122             'src/target_interceptions.h',
123             'src/target_process.cc',
124             'src/target_process.h',
125             'src/target_services.cc',
126             'src/target_services.h',
127             'src/win_utils.cc',
128             'src/win_utils.h',
129             'src/win2k_threadpool.cc',
130             'src/win2k_threadpool.h',
131             'src/window.cc',
132             'src/window.h',
133         ],
134       }],
135     ],
136   },
137   'targets': [
138     {
139       'target_name': 'sandbox',
140       'type': 'static_library',
141       'variables': {
142         'sandbox_windows_target': 1,
143       },
144       'dependencies': [
145         '../testing/gtest.gyp:gtest',
146         '../base/base.gyp:base',
147         '../base/base.gyp:base_static',
148       ],
149       'export_dependent_settings': [
150         '../base/base.gyp:base',
151       ],
152       'sources': [
153         # Files that are used by the 32-bit version of Windows sandbox only.
154         'src/resolver_32.cc',
155         'src/service_resolver_32.cc',
156         'src/sidestep_resolver.cc',
157         'src/sidestep_resolver.h',
158         'src/sidestep\ia32_modrm_map.cpp',
159         'src/sidestep\ia32_opcode_map.cpp',
160         'src/sidestep\mini_disassembler_types.h',
161         'src/sidestep\mini_disassembler.cpp',
162         'src/sidestep\mini_disassembler.h',
163         'src/sidestep\preamble_patcher_with_stub.cpp',
164         'src/sidestep\preamble_patcher.h',
165         'src/Wow64.cc',
166         'src/Wow64.h',
167       ],
168       'include_dirs': [
169         '..',
170       ],
171       'copies': [
172         {
173           'destination': '<(PRODUCT_DIR)',
174           'files': [
175             'wow_helper/wow_helper.exe',
176             'wow_helper/wow_helper.pdb',
177           ],
178         },
179       ],
180       'direct_dependent_settings': {
181         'include_dirs': [
182           'src',
183           '..',
184         ],
185       },
186     },
187     {
188       'target_name': 'sandbox_win64',
189       'type': 'static_library',
190       'variables': {
191         'sandbox_windows_target': 1,
192       },
193       'dependencies': [
194         '../testing/gtest.gyp:gtest',
195         '../base/base.gyp:base_nacl_win64',
196         '../base/base.gyp:base_static_win64',
197       ],
198       'configurations': {
199         'Common_Base': {
200           'msvs_target_platform': 'x64',
201         },
202       },
203       'sources': [
204         # Files that are used by the 64-bit version of Windows sandbox only.
205         'src/interceptors_64.cc',
206         'src/interceptors_64.h',
207         'src/resolver_64.cc',
208         'src/service_resolver_64.cc',
209         'src/Wow64_64.cc',
210       ],
211       'include_dirs': [
212         '..',
213       ],
214       'direct_dependent_settings': {
215         'include_dirs': [
216           'src',
217           '..',
218         ],
219       },
220       'defines': [
221         '<@(nacl_win64_defines)',
222       ]
223     },
224     {
225       'target_name': 'sbox_integration_tests',
226       'type': 'executable',
227       'dependencies': [
228         'sandbox',
229         '../testing/gtest.gyp:gtest',
230       ],
231       'sources': [
232         'tests/common/controller.cc',
233         'tests/common/controller.h',
234         'tests/common/test_utils.cc',
235         'tests/common/test_utils.h',
236         'tests/integration_tests/integration_tests.cc',
237         'src/dep_test.cc',
238         'src/file_policy_test.cc',
239         'src/handle_policy_test.cc',
240         'tests/integration_tests/integration_tests_test.cc',
241         'src/handle_closer_test.cc',
242         'src/integrity_level_test.cc',
243         'src/ipc_ping_test.cc',
244         'src/named_pipe_policy_test.cc',
245         'src/policy_target_test.cc',
246         'src/process_policy_test.cc',
247         'src/registry_policy_test.cc',
248         'src/sync_policy_test.cc',
249         'src/unload_dll_test.cc',
250       ],
251     },
252     {
253       'target_name': 'sbox_validation_tests',
254       'type': 'executable',
255       'dependencies': [
256         'sandbox',
257         '../testing/gtest.gyp:gtest',
258       ],
259       'sources': [
260         'tests/common/controller.cc',
261         'tests/common/controller.h',
262         'tests/validation_tests/unit_tests.cc',
263         'tests/validation_tests/commands.cc',
264         'tests/validation_tests/commands.h',
265         'tests/validation_tests/suite.cc',
266       ],
267     },
268     {
269       'target_name': 'sbox_unittests',
270       'type': 'executable',
271       'dependencies': [
272         'sandbox',
273         '../testing/gtest.gyp:gtest',
274       ],
275       'sources': [
276         'tests/common/test_utils.cc',
277         'tests/common/test_utils.h',
278         'tests/unit_tests/unit_tests.cc',
279         'src/interception_unittest.cc',
280         'src/service_resolver_unittest.cc',
281         'src/restricted_token_unittest.cc',
282         'src/job_unittest.cc',
283         'src/sid_unittest.cc',
284         'src/policy_engine_unittest.cc',
285         'src/policy_low_level_unittest.cc',
286         'src/policy_opcodes_unittest.cc',
287         'src/ipc_unittest.cc',
288         'src/threadpool_unittest.cc',
289         'src/win_utils_unittest.cc',
290       ],
291     },
292     {
293       'target_name': 'sandbox_poc',
294       'type': 'executable',
295       'dependencies': [
296         'sandbox',
297         'pocdll',
298       ],
299       'sources': [
300         'sandbox_poc/main_ui_window.cc',
301         'sandbox_poc/main_ui_window.h',
302         'sandbox_poc/resource.h',
303         'sandbox_poc/sandbox.cc',
304         'sandbox_poc/sandbox.h',
305         'sandbox_poc/sandbox.ico',
306         'sandbox_poc/sandbox.rc',
307       ],
308       'link_settings': {
309         'libraries': [
310           '-lcomctl32.lib',
311         ],
312       },
313       'msvs_settings': {
314         'VCLinkerTool': {
315           'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
316         },
317       },
318     },
319     {
320       'target_name': 'pocdll',
321       'type': 'shared_library',
322       'sources': [
323         'sandbox_poc/pocdll/exports.h',
324         'sandbox_poc/pocdll/fs.cc',
325         'sandbox_poc/pocdll/handles.cc',
326         'sandbox_poc/pocdll/invasive.cc',
327         'sandbox_poc/pocdll/network.cc',
328         'sandbox_poc/pocdll/pocdll.cc',
329         'sandbox_poc/pocdll/processes_and_threads.cc',
330         'sandbox_poc/pocdll/registry.cc',
331         'sandbox_poc/pocdll/spyware.cc',
332         'sandbox_poc/pocdll/utils.h',
333       ],
334       'defines': [
335         'POCDLL_EXPORTS',
336       ],
337       'include_dirs': [
338         '..',
339       ],
340     },
341   ],