Home | History | Annotate | Download | only in source
      1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
      2 #
      3 # Use of this source code is governed by a BSD-style license
      4 # that can be found in the LICENSE file in the root of the source
      5 # tree. An additional intellectual property rights grant can be found
      6 # in the file PATENTS.  All contributing project authors may
      7 # be found in the AUTHORS file in the root of the source tree.
      8 
      9 {
     10   'includes': [ '../../build/common.gypi', ],
     11   'targets': [
     12     {
     13       'target_name': 'system_wrappers',
     14       'type': '<(library)',
     15       'include_dirs': [
     16         'spreadsortlib',
     17         '../interface',
     18       ],
     19       'direct_dependent_settings': {
     20         'include_dirs': [
     21           '../interface',
     22         ],
     23       },
     24       'sources': [
     25         '../interface/aligned_malloc.h',
     26         '../interface/atomic32.h',
     27         '../interface/compile_assert.h',
     28         '../interface/condition_variable_wrapper.h',
     29         '../interface/cpu_info.h',
     30         '../interface/cpu_wrapper.h',
     31         '../interface/cpu_features_wrapper.h',
     32         '../interface/critical_section_wrapper.h',
     33         '../interface/data_log.h',
     34         '../interface/data_log_c.h',
     35         '../interface/data_log_impl.h',
     36         '../interface/event_wrapper.h',
     37         '../interface/file_wrapper.h',
     38         '../interface/fix_interlocked_exchange_pointer_win.h',
     39         '../interface/list_wrapper.h',
     40         '../interface/map_wrapper.h',
     41         '../interface/ref_count.h',
     42         '../interface/rw_lock_wrapper.h',
     43         '../interface/scoped_ptr.h',
     44         '../interface/scoped_refptr.h',
     45         '../interface/sleep.h',
     46         '../interface/sort.h',
     47         '../interface/static_instance.h',
     48         '../interface/thread_wrapper.h',
     49         '../interface/tick_util.h',
     50         '../interface/trace.h',
     51         'aligned_malloc.cc',
     52         'atomic32_mac.cc',
     53         'atomic32_posix.cc',
     54         'atomic32_win.cc',
     55         'condition_variable.cc',
     56         'condition_variable_posix.cc',
     57         'condition_variable_posix.h',
     58         'condition_variable_win.cc',
     59         'condition_variable_win.h',
     60         'cpu.cc',
     61         'cpu_no_op.cc',
     62         'cpu_info.cc',
     63         'cpu_linux.cc',
     64         'cpu_linux.h',
     65         'cpu_mac.cc',
     66         'cpu_mac.h',
     67         'cpu_win.cc',
     68         'cpu_win.h',
     69         'cpu_features.cc',
     70         'critical_section.cc',
     71         'critical_section_posix.cc',
     72         'critical_section_posix.h',
     73         'critical_section_win.cc',
     74         'critical_section_win.h',
     75         'data_log.cc',
     76         'data_log_c.cc',
     77         'data_log_no_op.cc',
     78         'event.cc',
     79         'event_posix.cc',
     80         'event_posix.h',
     81         'event_win.cc',
     82         'event_win.h',
     83         'file_impl.cc',
     84         'file_impl.h',
     85         'list_no_stl.cc',
     86         'map.cc',
     87         'rw_lock.cc',
     88         'rw_lock_posix.cc',
     89         'rw_lock_posix.h',
     90         'rw_lock_win.cc',
     91         'rw_lock_win.h',
     92         'sleep.cc',
     93         'sort.cc',
     94         'thread.cc',
     95         'thread_posix.cc',
     96         'thread_posix.h',
     97         'thread_win.cc',
     98         'thread_win.h',
     99         'set_thread_name_win.h',
    100         'trace_impl.cc',
    101         'trace_impl.h',
    102         'trace_impl_no_op.cc',
    103         'trace_posix.cc',
    104         'trace_posix.h',
    105         'trace_win.cc',
    106         'trace_win.h',
    107       ],
    108       'conditions': [
    109         ['enable_data_logging==1', {
    110           'sources!': [ 'data_log_no_op.cc', ],
    111         },{
    112           'sources!': [ 'data_log.cc', ],
    113         },],
    114         ['OS=="android"', {
    115           'dependencies': [ 'cpu_features_android', ],
    116         }],
    117         ['OS=="linux"', {
    118           'link_settings': {
    119             'libraries': [ '-lrt', ],
    120           },
    121         }],
    122         ['OS=="mac"', {
    123           'link_settings': {
    124             'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
    125           },
    126           'sources!': [
    127             'atomic32_posix.cc',
    128           ],
    129         }],
    130         ['OS=="win"', {
    131           'link_settings': {
    132             'libraries': [ '-lwinmm.lib', ],
    133           },
    134         }],
    135         ['build_with_chromium==1', {
    136           'sources!': [
    137             'cpu.cc',
    138             'cpu_linux.h',
    139             'cpu_mac.h',
    140             'cpu_win.h',
    141             'trace_impl.cc',
    142             'trace_impl.h',
    143             'trace_posix.cc',
    144             'trace_posix.h',
    145             'trace_win.cc',
    146             'trace_win.h',
    147           ],
    148         }, {
    149           'sources!': [
    150             'cpu_no_op.cc',
    151             'trace_impl_no_op.cc',
    152           ],
    153         }]
    154       ] # conditions
    155     },
    156   ], # targets
    157   'conditions': [
    158     ['OS=="android"', {
    159       'targets': [
    160         {
    161           'variables': {
    162             # Treat this as third-party code.
    163             'chromium_code': 0,
    164           },
    165           'target_name': 'cpu_features_android',
    166           'type': '<(library)',
    167           'sources': [
    168             'android/cpu-features.c',
    169             'android/cpu-features.h',
    170             # TODO(leozwang): Ideally we want to audomatically exclude .c files
    171             # as with .cc files, gyp currently only excludes .cc files.
    172             'cpu_features_android.c',
    173           ],
    174         },
    175       ],
    176     }],
    177     ['include_tests==1', {
    178       'targets': [
    179         {
    180           'target_name': 'system_wrappers_unittests',
    181           'type': 'executable',
    182           'dependencies': [
    183             'system_wrappers',
    184             '<(DEPTH)/testing/gtest.gyp:gtest',
    185             '<(webrtc_root)/test/test.gyp:test_support_main',
    186           ],
    187           'sources': [
    188             'condition_variable_unittest.cc',
    189             'cpu_wrapper_unittest.cc',
    190             'cpu_measurement_harness.h',
    191             'cpu_measurement_harness.cc',
    192             'critical_section_unittest.cc',
    193             'list_unittest.cc',
    194             'map_unittest.cc',
    195             'data_log_unittest.cc',
    196             'data_log_unittest_disabled.cc',
    197             'data_log_helpers_unittest.cc',
    198             'data_log_c_helpers_unittest.c',
    199             'data_log_c_helpers_unittest.h',
    200             'thread_unittest.cc',
    201             'trace_unittest.cc',
    202             'unittest_utilities_unittest.cc',
    203           ],
    204           'conditions': [
    205             ['enable_data_logging==1', {
    206               'sources!': [ 'data_log_unittest_disabled.cc', ],
    207             }, {
    208               'sources!': [ 'data_log_unittest.cc', ],
    209             }],
    210           ],
    211         },
    212       ], # targets
    213     }], # include_tests
    214   ], # conditions
    215 }
    216 
    217 # Local Variables:
    218 # tab-width:2
    219 # indent-tabs-mode:nil
    220 # End:
    221 # vim: set expandtab tabstop=2 shiftwidth=2:
    222