Home | History | Annotate | Download | only in src
      1 # Copyright (c) 2009 Google Inc. 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   'target_defaults': {
      7     'conditions': [
      8       ['OS=="win"', {
      9         'defines': ['PLATFORM_WIN'],
     10       }],
     11       ['OS=="mac" or OS=="ios"', {
     12         'defines': ['PLATFORM_MAC'],
     13       }],
     14       ['OS=="linux"', {
     15         'defines': ['PLATFORM_LINUX'],
     16         # Support 64-bit shared libs (also works fine for 32-bit).
     17         'cflags': ['-fPIC'],
     18         'libraries': ['-ldl'],
     19       }],
     20     ],
     21   },
     22   'targets': [
     23     {
     24       'target_name': 'program',
     25       'type': 'executable',
     26       'dependencies': [
     27         'lib1',
     28         'lib2',
     29       ],
     30       'sources': [
     31         'program.c',
     32       ],
     33     },
     34     {
     35       'target_name': 'lib1',
     36       'type': 'loadable_module',
     37       'product_name': 'lib1',
     38       'product_prefix': '',
     39       'sources': [
     40         'lib1.c',
     41       ],
     42     },
     43     {
     44       'target_name': 'lib2',
     45       'product_name': 'lib2',
     46       'product_prefix': '',
     47       'type': 'loadable_module',
     48       'sources': [
     49         'lib2.c',
     50       ],
     51     },
     52   ],
     53 }
     54