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