michael@0: # Copyright (c) 2009 Google Inc. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: { michael@0: 'target_defaults': { michael@0: 'conditions': [ michael@0: ['OS=="win"', { michael@0: 'defines': ['PLATFORM_WIN'], michael@0: }], michael@0: ['OS=="mac"', { michael@0: 'defines': ['PLATFORM_MAC'], michael@0: }], michael@0: ['OS=="linux"', { michael@0: 'defines': ['PLATFORM_LINUX'], michael@0: # Support 64-bit shared libs (also works fine for 32-bit). michael@0: 'cflags': ['-fPIC'], michael@0: 'libraries': ['-ldl'], michael@0: }], michael@0: ], michael@0: }, michael@0: 'targets': [ michael@0: { michael@0: 'target_name': 'program', michael@0: 'type': 'executable', michael@0: 'dependencies': [ michael@0: 'lib1', michael@0: 'lib2', michael@0: ], michael@0: 'sources': [ michael@0: 'program.c', michael@0: ], michael@0: }, michael@0: { michael@0: 'target_name': 'lib1', michael@0: 'type': 'loadable_module', michael@0: 'product_name': 'lib1', michael@0: 'product_prefix': '', michael@0: 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib'], 'MACH_O_TYPE': ''}, michael@0: 'sources': [ michael@0: 'lib1.c', michael@0: ], michael@0: }, michael@0: { michael@0: 'target_name': 'lib2', michael@0: 'product_name': 'lib2', michael@0: 'product_prefix': '', michael@0: 'type': 'loadable_module', michael@0: 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib'], 'MACH_O_TYPE': ''}, michael@0: 'sources': [ michael@0: 'lib2.c', michael@0: ], michael@0: }, michael@0: ], michael@0: }