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 'target_defaults': { 7 'conditions': [ 8 ['OS=="win"', { 9 'defines': ['PLATFORM_WIN'], 10 }], 11 ['OS=="mac" or OS=="ios"', { 12 'defines': ['PLATFORM_MAC'], 13 }], 14 ['OS=="linux"', { 15 'defines': ['PLATFORM_LINUX'], 16 }], 17 ['OS=="android"', { 18 'defines': ['PLATFORM_ANDROID'], 19 }], 20 ], 21 }, 22 'targets': [ 23 { 24 'target_name': 'program', 25 'type': 'executable', 26 'dependencies': ['lib1'], 27 'sources': [ 28 'program.c', 29 ], 30 }, 31 { 32 'target_name': 'lib1', 33 'type': 'static_library', 34 'sources': [ 35 'lib1.S', 36 ], 37 }, 38 ], 39 'conditions': [ 40 ['OS=="win"', { 41 'target_defaults': { 42 'rules': [ 43 { 44 'rule_name': 'assembler', 45 'msvs_cygwin_shell': 0, 46 'extension': 'S', 47 'inputs': [ 48 'as.bat', 49 ], 50 'outputs': [ 51 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', 52 ], 53 'action': 54 ['as.bat', 'lib1.c', '<(_outputs)'], 55 'message': 'Building assembly file <(RULE_INPUT_PATH)', 56 'process_outputs_as_sources': 1, 57 }, 58 ], 59 }, 60 },], 61 ], 62 } 63