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  'variables': {
7    'moveable_function%': 0,
8  },
9  'targets': [
10    {
11      'target_name': 'program',
12      'type': 'executable',
13      'dependencies': [
14        'lib1',
15        'lib2',
16      ],
17      'sources': [
18        'program.c',
19      ],
20    },
21    {
22      'target_name': 'lib1',
23      'type': '<(library)',
24      'sources': [
25        'lib1.c',
26      ],
27      'conditions': [
28        ['moveable_function=="lib1"', {
29          'sources': [
30            'lib1_moveable.c',
31          ],
32        }],
33      ],
34    },
35    {
36      'target_name': 'lib2',
37      'type': '<(library)',
38      'sources': [
39        'lib2.c',
40      ],
41      'conditions': [
42        ['moveable_function=="lib2"', {
43          'sources': [
44            'lib2_moveable.c',
45          ],
46        }],
47      ],
48    },
49  ],
50  'conditions': [
51    ['OS=="linux"', {
52      'target_defaults': {
53        # Support 64-bit shared libs (also works fine for 32-bit).
54        'cflags': ['-fPIC'],
55      },
56    }],
57  ],
58}
59