summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/module/src/module.gyp
blob: 2bc398bb3bf6b57d9d274cd21131c4073bcccd04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'target_defaults': {
    'conditions': [
      ['OS=="win"', {
        'defines': ['PLATFORM_WIN'],
      }],
      ['OS=="mac" or OS=="ios"', {
        'defines': ['PLATFORM_MAC'],
      }],
      ['OS=="linux"', {
        'defines': ['PLATFORM_LINUX'],
        # Support 64-bit shared libs (also works fine for 32-bit).
        'cflags': ['-fPIC'],
        'libraries': ['-ldl'],
      }],
    ],
  },
  'targets': [
    {
      'target_name': 'program',
      'type': 'executable',
      'dependencies': [
        'lib1',
        'lib2',
      ],
      'sources': [
        'program.c',
      ],
    },
    {
      'target_name': 'lib1',
      'type': 'loadable_module',
      'product_name': 'lib1',
      'product_prefix': '',
      'sources': [
        'lib1.c',
      ],
    },
    {
      'target_name': 'lib2',
      'product_name': 'lib2',
      'product_prefix': '',
      'type': 'loadable_module',
      'sources': [
        'lib2.c',
      ],
    },
  ],
}