summaryrefslogtreecommitdiff
path: root/deps/gyp/test/rules/src/subdir4/build-asm.gyp
blob: fe0fe93787e1e753e764753d3ef53627ae0af786 (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
# 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.

# This one tests that assembly files ended as .s and .S are compiled.

{
  'target_defaults': {
    'conditions': [
      ['OS=="win"', {
        'defines': ['PLATFORM_WIN'],
      }],
      ['OS=="mac"', {
        'defines': ['PLATFORM_MAC'],
      }],
      ['OS=="linux"', {
        'defines': ['PLATFORM_LINUX'],
      }],
    ],
  },
  'targets': [
    {
      'target_name': 'program4',
      'type': 'executable',
      'sources': [
        'asm-function.assem',
        'program.c',
      ],
      'conditions': [
        ['OS=="linux" or OS=="mac"', {
          'rules': [
            {
              'rule_name': 'convert_assem',
              'extension': 'assem',
              'inputs': [],
              'outputs': [
                '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).S',
              ],
              'action': [
                'bash', '-c', 'cp <(RULE_INPUT_PATH) <@(_outputs)',
              ],
              'process_outputs_as_sources': 1,
            },
          ],
        }],
      ],
    },
  ],
}