# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# TODO: Rename files to use *_linux.cpp etc. names, to automatically include relevant files. Remove conditions section.

{
  'includes': [
    '../../common_settings.gypi', # Common settings
  ],
  'targets': [
    {
      'target_name': 'system_wrappers',
      'type': '<(library)',
      'include_dirs': [
        'spreadsortlib',
        '../interface',
      ],
      'direct_dependent_settings': {
        'include_dirs': [
          '../interface',
        ],
      },
      'sources': [
        '../interface/aligned_malloc.h',
        '../interface/atomic32_wrapper.h',
        '../interface/condition_variable_wrapper.h',
        '../interface/cpu_wrapper.h',
        '../interface/cpu_features_wrapper.h',
        '../interface/critical_section_wrapper.h',
        '../interface/event_wrapper.h',
        '../interface/file_wrapper.h',
        '../interface/list_wrapper.h',
        '../interface/map_wrapper.h',
        '../interface/rw_lock_wrapper.h',
        '../interface/sort.h',
        '../interface/thread_wrapper.h',
        '../interface/tick_util.h',
        '../interface/trace.h',
        'aligned_malloc.cc',
        'atomic32.cc',
        'atomic32_linux.h',
        'atomic32_mac.h',
        'atomic32_windows.h',
        'condition_variable.cc',
        'condition_variable_posix.h',
        'condition_variable_windows.h',
        'cpu.cc',
        'cpu_linux.h',
        'cpu_mac.h',
        'cpu_windows.h',
        'cpu_features.cc',
        'critical_section.cc',
        'critical_section_posix.h',
        'critical_section_windows.h',
        'event.cc',
        'event_posix.h',
        'event_windows.h',
        'file_impl.cc',
        'file_impl.h',
        'list_no_stl.cc',
        'map.cc',
        'rw_lock.cc',
        'rw_lock_posix.h',
        'rw_lock_windows.h',
        'sort.cc',
        'thread.cc',
        'thread_posix.h',
        'thread_windows.h',
        'trace_impl.cc',
        'trace_impl.h',
        'trace_posix.h',
        'trace_windows.h',
      ],
      'conditions': [
        ['os_posix==1', {
          'sources': [
            'condition_variable_posix.cc',
            'critical_section_posix.cc',
            'event_posix.cc',
            'rw_lock_posix.cc',
            'thread_posix.cc',
            'trace_posix.cc',
          ],
        }],
        ['OS=="linux"', {
          'sources': [
            'cpu_linux.cc',
          ],
          'link_settings': {
            'libraries': [
              '-lrt',
            ],
          },
        }],
        ['OS=="mac"', {
          'sources': [
            'cpu_mac.cc',
          ],
        }],
        ['OS=="win"', {
          'sources': [
            'condition_variable_windows.cc',
            'cpu_windows.cc',
            'critical_section_windows.cc',
            'event_windows.cc',
            'rw_lock_windows.cc',
            'thread_windows.cc',
            'trace_windows.cc',
          ],
          'link_settings': {
            'libraries': [
              '-lwinmm.lib',
            ],
          },
        }],
      ] # conditions
    },
    {
      'target_name': 'system_wrappersTest',
      'type': 'executable',
      'dependencies': [
        'system_wrappers'
      ],
      'sources': [
        '../test/Test.cpp',
      ],
    },
  ], # targets
}

# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2:

@@ -3250,20 +3250,116 @@
    %7D,%0A  
+%5D, # targets%0A  'conditions': %5B   %0A    %5B'build_with_chromium==0', %7B%0A      'targets': %5B%0A        %7B%0A  
   
-%7B%0A
       't
@@ -3392,32 +3392,36 @@
 ersTest',%0A      
+    
 'type': 'executa
@@ -3432,16 +3432,20 @@
 ,%0A      
+  
+  
 'depende
@@ -3446,32 +3446,36 @@
 ependencies': %5B%0A
+    
         'system_
@@ -3486,24 +3486,28 @@
 pers'%0A      
+    
 %5D,%0A      'so
@@ -3495,32 +3495,36 @@
        %5D,%0A      
+ 
+   
 'sources': %5B%0A   
@@ -3512,32 +3512,36 @@
    'sources': %5B%0A
+    
         '../test
@@ -3552,16 +3552,20 @@
 t.cpp',%0A
+    
       %5D,
@@ -3565,23 +3565,31 @@
      %5D,%0A
+    
     %7D,%0A
+    
   %5D, # t
@@ -3595,16 +3595,64 @@
 targets%0A
+    %7D%5D, # build_with_chromium%0A  %5D, # conditions%0A
 %7D%0A%0A# Loc

exclude the test target from building with chromiurm. Review URL: http://webrtc-codereview.appspot.com/89016