summaryrefslogtreecommitdiff
path: root/deps/gyp/test/external-cross-compile/src/cross.gyp
blob: aeda76b5bdf88d104077acac471ac84b28b13b08 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 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.

{
  'includes': ['cross_compile.gypi'],
  'target_defaults': {
    'variables': {
      'nix_lame%': 0,
    },
    'target_conditions': [
      ['nix_lame==1', {
        'sources/': [
          ['exclude', 'lame'],
        ],
      }],
    ],
  },
  'targets': [
    {
      'target_name': 'program',
      'type': 'executable',
      'dependencies': [
        'program_inc',
      ],
      'include_dirs': [
        '<(SHARED_INTERMEDIATE_DIR)',
      ],
      'sources': [
        'program.cc',
      ],
    },
    {
      'target_name': 'program_inc',
      'type': 'none',
      'dependencies': ['cross_program'],
      'actions': [
        {
          'action_name': 'program_inc',
          'inputs': ['<(SHARED_INTERMEDIATE_DIR)/cross_program.fake'],
          'outputs': ['<(SHARED_INTERMEDIATE_DIR)/cross_program.h'],
          'action': ['python', 'tochar.py', '<@(_inputs)', '<@(_outputs)'],
        },
      ],
      # Allows the test to run without hermetic cygwin on windows.
      'msvs_cygwin_shell': 0,
    },
    {
      'target_name': 'cross_program',
      'type': 'none',
      'variables': {
        'cross': 1,
        'nix_lame': 1,
      },
      'dependencies': ['cross_lib'],
      'sources': [
        'test1.cc',
        'test2.c',
        'very_lame.cc',
        '<(SHARED_INTERMEDIATE_DIR)/cross_lib.fake',
      ],
    },
    {
      'target_name': 'cross_lib',
      'type': 'none',
      'variables': {
        'cross': 1,
        'nix_lame': 1,
      },
      'sources': [
        'test3.cc',
        'test4.c',
        'bogus1.cc',
        'bogus2.c',
        'sort_of_lame.cc',
      ],
      'sources!': [
        'bogus1.cc',
        'bogus2.c',
      ],
    },
  ],
}