blob: 40177566190247eeafc3cca4e1088ad486d19c9e [file] [log] [blame]
[email protected]2f80c312009-02-25 21:26:551# 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 'variables': {
7 'chromium_code': 1,
8 },
9 'includes': [
10 '../build/common.gypi',
11 ],
12 'targets': [
13 {
14 'target_name': 'base',
15 'type': 'static_library',
16 'dependencies': [
17 '../third_party/icu38/icu38.gyp:icui18n',
18 '../third_party/icu38/icu38.gyp:icuuc',
19 ],
[email protected]0d54d2e2009-03-10 22:25:5420 'msvs_guid': '1832A374-8A74-4F9E-B536-69A699B3E165',
[email protected]2f80c312009-02-25 21:26:5521 'sources': [
22 '../build/build_config.h',
23 'third_party/dmg_fp/dmg_fp.h',
24 'third_party/dmg_fp/dtoa.cc',
25 'third_party/dmg_fp/g_fmt.cc',
26 'third_party/nspr/prcpucfg.h',
27 'third_party/nspr/prcpucfg_win.h',
28 'third_party/nspr/prtime.cc',
29 'third_party/nspr/prtime.h',
30 'third_party/nspr/prtypes.h',
31 'third_party/nss/blapi.h',
32 'third_party/nss/blapit.h',
33 'third_party/nss/sha256.h',
34 'third_party/nss/sha512.cc',
35 'third_party/purify/pure.h',
36 'third_party/purify/pure_api.c',
37 'atomicops_internals_x86_gcc.cc',
38 'at_exit.cc',
39 'at_exit.h',
40 'atomic_ref_count.h',
41 'atomic_sequence_num.h',
42 'atomicops.h',
43 'atomicops_internals_x86_msvc.h',
44 'base_drag_source.cc',
45 'base_drag_source.h',
46 'base_drop_target.cc',
47 'base_drop_target.h',
48 'base_paths.cc',
49 'base_paths.h',
50 'base_paths_linux.cc',
51 'base_paths_mac.mm',
52 'base_paths_win.cc',
53 'base_paths_win.h',
54 'base_switches.cc',
55 'base_switches.h',
56 'basictypes.h',
57 'bzip2_error_handler.cc',
58 'clipboard.cc',
59 'clipboard.h',
60 'clipboard_linux.cc',
61 'clipboard_mac.mm',
62 'clipboard_util.cc',
63 'clipboard_util.h',
64 'clipboard_win.cc',
65 'command_line.cc',
66 'command_line.h',
67 'compiler_specific.h',
68 'condition_variable.h',
69 'condition_variable_posix.cc',
70 'condition_variable_win.cc',
71 'cpu.cc',
72 'cpu.h',
73 'data_pack.cc',
74 'debug_on_start.cc',
75 'debug_on_start.h',
76 'debug_util.cc',
77 'debug_util.h',
78 'debug_util_mac.cc',
79 'debug_util_posix.cc',
80 'debug_util_win.cc',
81 'directory_watcher.h',
82 'directory_watcher_win.cc',
83 'event_recorder.cc',
84 'event_recorder.h',
85 'event_recorder_stubs.cc',
86 'field_trial.cc',
87 'field_trial.h',
88 'file_path.cc',
89 'file_path.h',
90 'file_util.cc',
91 'file_util.h',
92 'file_util_linux.cc',
93 'file_util_mac.mm',
94 'file_util_posix.cc',
95 'file_util_win.cc',
96 'file_version_info.cc',
97 'file_version_info.h',
98 'file_version_info_linux.cc',
99 'file_version_info_mac.mm',
100 'fix_wp64.h',
101 'float_util.h',
102 'hash_tables.h',
103 'histogram.cc',
104 'histogram.h',
105 'hmac.h',
106 'hmac_mac.cc',
107 'hmac_nss.cc',
108 'hmac_win.cc',
109 'iat_patch.cc',
110 'iat_patch.h',
111 'icu_util.cc',
112 'icu_util.h',
113 'id_map.h',
114 'idle_timer.cc',
115 'idle_timer.h',
116 'idle_timer_none.cc',
117 'image_util.cc',
118 'image_util.h',
119 'json_reader.cc',
120 'json_reader.h',
121 'json_writer.cc',
122 'json_writer.h',
123 'keyboard_codes.h',
124 'keyboard_codes_win.h',
125 'lazy_instance.cc',
126 'lazy_instance.h',
127 'linked_ptr.h',
128 'lock.cc',
129 'lock.h',
130 'lock_impl.h',
131 'lock_impl_posix.cc',
132 'lock_impl_win.cc',
133 'logging.cc',
134 'logging.h',
135 'mac_util.mm',
136 'md5.cc',
137 'md5.h',
138 'memory_debug.cc',
139 'memory_debug.h',
140 'message_loop.cc',
141 'message_loop.h',
142 'message_pump.h',
143 'message_pump_default.cc',
144 'message_pump_default.h',
145 'message_pump_glib.cc',
146 'message_pump_libevent.cc',
147 'message_pump_mac.mm',
148 'message_pump_win.cc',
149 'message_pump_win.h',
150 'non_thread_safe.cc',
151 'non_thread_safe.h',
152 'nss_init.cc',
153 'object_watcher.cc',
154 'object_watcher.h',
155 'observer_list.h',
156 'observer_list_threadsafe.h',
157 'path_service.cc',
158 'path_service.h',
159 'pe_image.cc',
160 'pe_image.h',
161 'pickle.cc',
162 'pickle.h',
163 'platform_file.h',
164 'platform_file_win.cc',
165 'platform_file_posix.cc',
166 'platform_thread.h',
167 'platform_thread_mac.mm',
168 'platform_thread_posix.cc',
169 'platform_thread_win.cc',
170 'port.h',
[email protected]9b2217562009-03-09 21:26:28171 'profiler.cc',
172 'profiler.h',
[email protected]2f80c312009-02-25 21:26:55173 'process.h',
174 'process_posix.cc',
175 'process_util.h',
176 'process_util_linux.cc',
177 'process_util_mac.mm',
178 'process_util_posix.cc',
179 'process_util_win.cc',
180 'process_win.cc',
181 'rand_util.cc',
182 'rand_util.h',
183 'rand_util_posix.cc',
184 'rand_util_win.cc',
185 'ref_counted.cc',
186 'ref_counted.h',
187 'registry.cc',
188 'registry.h',
189 'resource_util.cc',
190 'resource_util.h',
191 'revocable_store.cc',
192 'revocable_store.h',
193 'scoped_bstr_win.cc',
194 'scoped_bstr_win.h',
195 'scoped_clipboard_writer.cc',
196 'scoped_clipboard_writer.h',
197 'scoped_comptr_win.h',
198 'scoped_handle.h',
199 'scoped_handle_win.h',
200 'scoped_nsautorelease_pool.h',
201 'scoped_nsautorelease_pool.mm',
202 'scoped_ptr.h',
203 'scoped_temp_dir.cc',
204 'scoped_temp_dir.h',
205 'sha2.cc',
206 'sha2.h',
207 'shared_memory.h',
208 'shared_memory_posix.cc',
209 'shared_memory_win.cc',
210 'simple_thread.cc',
211 'simple_thread.h',
212 'singleton.h',
213 'spin_wait.h',
214 'stack_container.h',
215 'stats_counters.h',
216 'stats_table.cc',
217 'stats_table.h',
218 'string16.cc',
219 'string16.h',
220 'string_escape.cc',
221 'string_escape.h',
222 'string_piece.cc',
223 'string_piece.h',
224 'string_tokenizer.h',
225 'string_util.cc',
226 'string_util.h',
227 'string_util_icu.cc',
228 'string_util_win.h',
229 'sys_info.h',
230 'sys_info_mac.cc',
231 'sys_info_posix.cc',
232 'sys_info_win.cc',
233 'sys_string_conversions.h',
234 'sys_string_conversions_linux.cc',
235 'sys_string_conversions_mac.mm',
236 'sys_string_conversions_win.cc',
237 'system_monitor.cc',
238 'system_monitor.h',
239 'system_monitor_posix.cc',
240 'system_monitor_win.cc',
241 'task.h',
242 'test_file_util.h',
243 'test_file_util_linux.cc',
244 'test_file_util_mac.cc',
[email protected]2c80a4892009-03-10 16:40:45245 'test_file_util_posix.cc',
[email protected]2f80c312009-02-25 21:26:55246 'test_file_util_win.cc',
247 'thread.cc',
248 'thread.h',
249 'thread_collision_warner.cc',
250 'thread_collision_warner.h',
251 'thread_local.h',
252 'thread_local_posix.cc',
253 'thread_local_storage.h',
254 'thread_local_storage_posix.cc',
255 'thread_local_storage_win.cc',
256 'thread_local_win.cc',
257 'time.cc',
258 'time.h',
259 'time_format.cc',
260 'time_format.h',
261 'time_mac.cc',
262 'time_posix.cc',
263 'time_win.cc',
264 'timer.cc',
265 'timer.h',
266 'trace_event.cc',
267 'trace_event.h',
268 'tracked.cc',
269 'tracked.h',
270 'tracked_objects.cc',
271 'tracked_objects.h',
272 'tuple.h',
273 'values.cc',
274 'values.h',
275 'version.cc',
276 'version.h',
277 'waitable_event.h',
278 'waitable_event_posix.cc',
279 'waitable_event_watcher.h',
280 'waitable_event_watcher_posix.cc',
281 'waitable_event_watcher_win.cc',
282 'waitable_event_win.cc',
283 'watchdog.cc',
284 'watchdog.h',
285 'win_util.cc',
286 'win_util.h',
287 'windows_message_list.h',
288 'wmi_util.cc',
289 'wmi_util.h',
290 'word_iterator.cc',
291 'word_iterator.h',
[email protected]2f80c312009-02-25 21:26:55292 'worker_pool.h',
[email protected]5846da02009-03-06 20:35:45293 'worker_pool_linux.cc',
[email protected]2f80c312009-02-25 21:26:55294 'worker_pool_mac.mm',
[email protected]5846da02009-03-06 20:35:45295 'worker_pool_win.cc',
[email protected]2f80c312009-02-25 21:26:55296 ],
297 'include_dirs': [
298 '..',
299 ],
300 'direct_dependent_settings': {
301 'include_dirs': [
302 '..',
303 ],
304 },
305 # These warnings are needed for the files in third_party\dmg_fp.
306 'msvs_disabled_warnings': [
307 4244, 4554, 4018, 4102,
308 ],
309 'conditions': [
310 [ 'OS == "linux"', {
311 'sources/': [ ['exclude', '_(mac|win)\\.cc$'],
312 ['exclude', '\\.mm?$' ] ],
313 'sources!': [
314 # Linux has an implementation of idle_timer that depends
315 # on XScreenSaver, but it's unclear if we want it yet,
316 # so use idle_timer_none.cc instead.
317 'idle_timer.cc',
318 ],
319 'cflags': ['-Wno-write-strings'],
320 },
321 { # else: OS != "linux"
322 'sources!': [
323 'atomicops_internals_x86_gcc.cc',
[email protected]2f80c312009-02-25 21:26:55324 'hmac_nss.cc',
325 'idle_timer_none.cc',
326 'message_pump_glib.cc',
327 'nss_init.cc',
328 'time_posix.cc',
329 ],
330 }
331 ],
332 [ 'OS == "mac"', {
333 'sources/': [ ['exclude', '_(linux|win)\\.cc$'] ],
334 'sources!': [
[email protected]2f80c312009-02-25 21:26:55335 ],
336 'link_settings': {
337 'libraries': [
338 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
339 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
340 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
341 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
342 ],
343 },
344 },
345 ],
346 [ 'OS == "win"', {
347 'sources/': [ ['exclude', '_(linux|mac|posix)\\.cc$'],
348 ['exclude', '\\.mm?$' ] ],
349 'sources!': [
[email protected]b8e1f95c2009-02-26 15:25:44350 'data_pack.cc',
[email protected]2f80c312009-02-25 21:26:55351 'event_recorder_stubs.cc',
352 'message_pump_libevent.cc',
353 'string16.cc',
354 ],
355 },
356 { # else: OS != "win"
357 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
358 'sources!': [
359 'third_party/purify/pure_api.c',
360 'base_drag_source.cc',
361 'base_drop_target.cc',
362 'cpu.cc',
363 'clipboard_util.cc',
364 'debug_on_start.cc',
365 'event_recorder.cc',
366 'file_version_info.cc',
367 'iat_patch.cc',
368 'image_util.cc',
369 'object_watcher.cc',
370 'pe_image.cc',
371 'registry.cc',
372 'resource_util.cc',
373 'win_util.cc',
374 'wmi_util.cc',
375 ],
376 },
377 ],
378 ],
379 },
380 {
381 'target_name': 'base_gfx',
382 'type': 'static_library',
[email protected]0d54d2e2009-03-10 22:25:54383 'msvs_guid': 'A508ADD3-CECE-4E0F-8448-2F5E454DF551',
[email protected]2f80c312009-02-25 21:26:55384 'sources': [
385 'gfx/gdi_util.cc',
386 'gfx/gdi_util.h',
[email protected]40c3f522009-03-06 21:33:46387 'gfx/gtk_util.cc',
388 'gfx/gtk_util.h',
[email protected]2f80c312009-02-25 21:26:55389 'gfx/jpeg_codec.cc',
390 'gfx/jpeg_codec.h',
391 'gfx/native_theme.cc',
392 'gfx/native_theme.h',
393 'gfx/native_widget_types.h',
394 'gfx/platform_canvas.h',
395 'gfx/platform_canvas_linux.h',
396 'gfx/platform_canvas_mac.h',
397 'gfx/platform_device_linux.h',
398 'gfx/platform_device_mac.h',
399 'gfx/png_decoder.cc',
400 'gfx/png_decoder.h',
401 'gfx/png_encoder.cc',
402 'gfx/png_encoder.h',
403 'gfx/point.cc',
404 'gfx/point.h',
405 'gfx/rect.cc',
406 'gfx/rect.h',
407 'gfx/size.cc',
408 'gfx/size.h',
409 ],
410 'mac_framework_dirs': [
411 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
412 ],
413 'dependencies': [
414 'base',
415 '../skia/skia.gyp:skia',
416 '../third_party/libjpeg/libjpeg.gyp:libjpeg',
417 '../third_party/libpng/libpng.gyp:libpng',
418 '../third_party/zlib/zlib.gyp:zlib',
419 ],
420 'export_dependent_settings': [
421 'base',
422 ],
423 'conditions': [
424 [ 'OS != "win"', { 'sources!': [
[email protected]40c3f522009-03-06 21:33:46425 'gfx/gdi_util.cc',
426 'gfx/native_theme.cc',
[email protected]9e450f22009-03-10 23:12:16427 ],
[email protected]40c3f522009-03-06 21:33:46428 }],
429 [ 'OS != "linux"', { 'sources!': [
430 'gfx/gtk_util.cc',
[email protected]9e450f22009-03-10 23:12:16431 ],
[email protected]2f80c312009-02-25 21:26:55432 }],
433 ],
434 },
435 {
436 'target_name': 'base_unittests',
437 'type': 'executable',
[email protected]9e450f22009-03-10 23:12:16438 'msvs_guid': '27A30967-4BBA-48D1-8522-CDE95F7B1CEC',
[email protected]2f80c312009-02-25 21:26:55439 'sources': [
440 'gfx/jpeg_codec_unittest.cc',
441 'gfx/native_theme_unittest.cc',
442 'gfx/png_codec_unittest.cc',
443 'gfx/rect_unittest.cc',
444 'at_exit_unittest.cc',
445 'atomicops_unittest.cc',
446 'clipboard_unittest.cc',
447 'command_line_unittest.cc',
448 'condition_variable_unittest.cc',
449 'data_pack_unittest.cc',
450 'directory_watcher_unittest.cc',
451 'field_trial_unittest.cc',
452 'file_path_unittest.cc',
453 'file_util_unittest.cc',
454 'file_version_info_unittest.cc',
455 'histogram_unittest.cc',
456 'hmac_unittest.cc',
457 'idletimer_unittest.cc',
458 'json_reader_unittest.cc',
459 'json_writer_unittest.cc',
460 'lazy_instance_unittest.cc',
461 'linked_ptr_unittest.cc',
462 'mac_util_unittest.cc',
463 'message_loop_unittest.cc',
464 'object_watcher_unittest.cc',
465 'observer_list_unittest.cc',
466 'path_service_unittest.cc',
467 'pe_image_unittest.cc',
468 'pickle_unittest.cc',
469 'pr_time_unittest.cc',
470 'process_util_unittest.cc',
471 'rand_util_unittest.cc',
472 'ref_counted_unittest.cc',
473 'run_all_unittests.cc',
474 'scoped_bstr_win_unittest.cc',
475 'scoped_comptr_win_unittest.cc',
476 'scoped_ptr_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31477 'scoped_temp_dir_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55478 'sha2_unittest.cc',
479 'shared_memory_unittest.cc',
480 'simple_thread_unittest.cc',
481 'singleton_unittest.cc',
482 'stack_container_unittest.cc',
483 'stats_table_unittest.cc',
484 'string_escape_unittest.cc',
485 'string_piece_unittest.cc',
486 'string_tokenizer_unittest.cc',
487 'string_util_unittest.cc',
488 'sys_info_unittest.cc',
489 'sys_string_conversions_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55490 'system_monitor_unittest.cc',
491 'thread_collision_warner_unittest.cc',
492 'thread_local_storage_unittest.cc',
493 'thread_local_unittest.cc',
494 'thread_unittest.cc',
495 'time_unittest.cc',
496 'time_win_unittest.cc',
497 'timer_unittest.cc',
498 'tracked_objects_unittest.cc',
499 'tuple_unittest.cc',
500 'values_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31501 'version_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55502 'waitable_event_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31503 'waitable_event_watcher_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55504 'watchdog_unittest.cc',
505 'win_util_unittest.cc',
506 'wmi_util_unittest.cc',
507 'word_iterator_unittest.cc',
508 'worker_pool_unittest.cc',
509 ],
510 'include_dirs': [
511 # word_iterator.h (used by word_iterator_unittest.cc) leaks an ICU
512 # #include for unicode/uchar.h. This should probably be cleaned up.
513 '../third_party/icu38/public/common',
514 ],
515 'dependencies': [
516 'base',
517 'base_gfx',
518 '../skia/skia.gyp:skia',
519 '../testing/gtest.gyp:gtest',
520 ],
521 'conditions': [
[email protected]8b03e8d2009-03-02 06:53:31522 ['OS == "linux"', {
523 'sources!': [
524 'file_version_info_unittest.cc',
525 # Linux has an implementation of idle_timer, but it's unclear
526 # if we want it yet, so leave it 'unported' for now.
527 'idletimer_unittest.cc',
528 ],
529 }],
530 ['OS != "mac"', {
531 'sources!': [
532 'mac_util_unittest.cc',
533 ],
534 }],
[email protected]2f80c312009-02-25 21:26:55535 # This is needed to trigger the dll copy step on windows.
536 # TODO(mark): This should not be necessary.
[email protected]8b03e8d2009-03-02 06:53:31537 ['OS == "win"', {
538 'dependencies': [
539 '../third_party/icu38/icu38.gyp:icudata',
540 ],
541 'sources!': [
542 'data_pack_unittest.cc',
543 ],
544 }, { # OS != "win"
545 'sources!': [
546 'gfx/native_theme_unittest.cc',
547 'directory_watcher_unittest.cc',
548 'object_watcher_unittest.cc',
549 'pe_image_unittest.cc',
550 'scoped_bstr_win_unittest.cc',
551 'scoped_comptr_win_unittest.cc',
552 'system_monitor_unittest.cc',
553 'time_win_unittest.cc',
554 'win_util_unittest.cc',
555 'wmi_util_unittest.cc',
556 ],
557 }],
[email protected]2f80c312009-02-25 21:26:55558 ],
559 },
[email protected]e8ef09a2009-03-16 23:46:45560 {
561 'target_name': 'test_support_base',
562 'type': 'static_library',
563 'dependencies': [
564 'base',
565 '../testing/gtest.gyp:gtest',
566 ],
567 'sources': [
568 'perftimer.cc',
569 'run_all_perftests.cc',
570 ],
571 'direct_dependent_settings': {
572 'defines': [
573 'PERF_TEST',
574 ],
575 },
576 },
[email protected]2f80c312009-02-25 21:26:55577 ],
578 'conditions': [
579 [ 'OS == "win"', {
580 'targets': [
581 {
582 'target_name': 'debug_message',
583 'type': 'executable',
584 'sources': [
585 'debug_message.cc',
586 ],
587 },
588 ],
589 }],
590 ],
591}