summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/dependencies/sharedlib-linksettings/test.gyp
blob: 830ce3236d6662acec21d4c23127f3e0f5a15bbb (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
# Copyright (c) 2013 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': {
    'allow_sharedlib_linksettings_propagation': 0,
  },
  'targets': [
    {
      'target_name': 'sharedlib',
      'type': 'shared_library',
      'sources': [ 'sharedlib.c' ],
      'link_settings': {
        'defines': [ 'TEST_DEFINE=1' ],
      },
      'conditions': [
        ['OS=="linux"', {
          # Support 64-bit shared libs (also works fine for 32-bit).
          'cflags': ['-fPIC'],
        }],
      ],
    },
    {
      'target_name': 'staticlib',
      'type': 'static_library',
      'sources': [ 'staticlib.c' ],
      'dependencies': [ 'sharedlib' ],
    },
    {
      'target_name': 'program',
      'type': 'executable',
      'sources': [ 'program.c' ],
      'dependencies': [ 'staticlib' ],
    },
  ],
}