1 # Copyright (c) 2012 The Native Client Authors. 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 'chromium_code': 1, # Use higher warning level. 8 'common_sources': [ 9 'file_downloader.cc', 10 'file_utils.cc', 11 'json_manifest.cc', 12 'module_ppapi.cc', 13 'nacl_http_response_headers.cc', 14 'nacl_subprocess.cc', 15 'plugin.cc', 16 'pnacl_coordinator.cc', 17 'pnacl_options.cc', 18 'pnacl_resources.cc', 19 'pnacl_translate_thread.cc', 20 'scriptable_plugin.cc', 21 'sel_ldr_launcher_chrome.cc', 22 'service_runtime.cc', 23 'srpc_client.cc', 24 'srpc_params.cc', 25 'temporary_file.cc', 26 'utility.cc', 27 ], 28 # Append the arch-specific ISA code to common_sources. 29 'conditions': [ 30 # Note: this test assumes that if this is not an ARM build, then this is 31 # is an x86 build. This is because |target_arch| for x86 can be one of a 32 # number of values (x64, ia32, etc.). 33 ['target_arch=="arm"', { 34 'common_sources': [ 35 'arch_arm/sandbox_isa.cc', 36 ], 37 }, { # else: 'target_arch != "arm" 38 'common_sources': [ 39 'arch_x86/sandbox_isa.cc', 40 ], 41 }], 42 ], 43 }, 44 'includes': [ 45 '../../../../../native_client/build/common.gypi', 46 ], 47 'target_defaults': { 48 'variables': { 49 'target_platform': 'none', 50 }, 51 'conditions': [ 52 ['OS=="linux"', { 53 'defines': [ 54 'XP_UNIX', 55 'MOZ_X11', 56 ], 57 'cflags': [ 58 '-Wno-long-long', 59 ], 60 'cflags!': [ 61 '-Wno-unused-parameter', # be a bit stricter to match NaCl flags. 62 ], 63 'conditions': [ 64 ['asan!=1', { 65 'ldflags': [ 66 # Catch unresolved symbols. 67 '-Wl,-z,defs', 68 ], 69 }], 70 ], 71 'libraries': [ 72 '-ldl', 73 ], 74 }], 75 ['OS=="mac"', { 76 'defines': [ 77 'XP_MACOSX', 78 'XP_UNIX', 79 'TARGET_API_MAC_CARBON=1', 80 'NO_X11', 81 'USE_SYSTEM_CONSOLE', 82 ], 83 'cflags': [ 84 '-Wno-long-long', 85 ], 86 'cflags!': [ 87 '-Wno-unused-parameter', # be a bit stricter to match NaCl flags. 88 ], 89 'link_settings': { 90 'libraries': [ 91 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', 92 ], 93 }, 94 }], 95 ['OS=="win"', { 96 'defines': [ 97 'XP_WIN', 98 'WIN32', 99 '_WINDOWS' 100 ], 101 'flags': [ 102 '-fPIC', 103 '-Wno-long-long', 104 ], 105 'link_settings': { 106 'libraries': [ 107 '-lgdi32.lib', 108 '-luser32.lib', 109 ], 110 }, 111 }], 112 ], 113 }, 114 } 115