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