| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 # for details. All rights reserved. Use of this source code is governed by a | |
| 3 # BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 { | |
| 6 'includes': [ | |
| 7 'tools/gyp/runtime-configurations.gypi', | |
| 8 'vm/vm.gypi', | |
| 9 'observatory/observatory.gypi', | |
| 10 'bin/bin.gypi', | |
| 11 'third_party/double-conversion/src/double-conversion.gypi', | |
| 12 ], | |
| 13 'variables': { | |
| 14 'gen_source_dir': '<(SHARED_INTERMEDIATE_DIR)', | |
| 15 'version_in_cc_file': 'vm/version_in.cc', | |
| 16 'version_cc_file': '<(gen_source_dir)/version.cc', | |
| 17 | |
| 18 'libdart_deps': ['libdart_lib_nosnapshot', 'libdart_lib', | |
| 19 'libdart_vm_nosnapshot', 'libdart_vm', | |
| 20 'libdouble_conversion',], | |
| 21 }, | |
| 22 'targets': [ | |
| 23 { | |
| 24 'target_name': 'libdart', | |
| 25 'type': 'static_library', | |
| 26 'dependencies': [ | |
| 27 'libdart_lib', | |
| 28 'libdart_vm', | |
| 29 'libdouble_conversion', | |
| 30 'generate_version_cc_file#host', | |
| 31 ], | |
| 32 'include_dirs': [ | |
| 33 '.', | |
| 34 ], | |
| 35 'sources': [ | |
| 36 'include/dart_api.h', | |
| 37 'include/dart_mirrors_api.h', | |
| 38 'include/dart_native_api.h', | |
| 39 'include/dart_tools_api.h', | |
| 40 'vm/dart_api_impl.cc', | |
| 41 'vm/debugger_api_impl.cc', | |
| 42 'vm/mirrors_api_impl.cc', | |
| 43 'vm/native_api_impl.cc', | |
| 44 'vm/version.h', | |
| 45 '<(version_cc_file)', | |
| 46 ], | |
| 47 'defines': [ | |
| 48 # The only effect of DART_SHARED_LIB is to export the Dart API entries. | |
| 49 'DART_SHARED_LIB', | |
| 50 ], | |
| 51 'direct_dependent_settings': { | |
| 52 'include_dirs': [ | |
| 53 'include', | |
| 54 ], | |
| 55 }, | |
| 56 }, | |
| 57 { | |
| 58 'target_name': 'libdart_precompiled_runtime', | |
| 59 'type': 'static_library', | |
| 60 'dependencies': [ | |
| 61 'libdart_lib_precompiled_runtime', | |
| 62 'libdart_vm_precompiled_runtime', | |
| 63 'libdouble_conversion', | |
| 64 'generate_version_cc_file#host', | |
| 65 ], | |
| 66 'include_dirs': [ | |
| 67 '.', | |
| 68 ], | |
| 69 'sources': [ | |
| 70 'include/dart_api.h', | |
| 71 'include/dart_mirrors_api.h', | |
| 72 'include/dart_native_api.h', | |
| 73 'include/dart_tools_api.h', | |
| 74 'vm/dart_api_impl.cc', | |
| 75 'vm/debugger_api_impl.cc', | |
| 76 'vm/mirrors_api_impl.cc', | |
| 77 'vm/native_api_impl.cc', | |
| 78 'vm/version.h', | |
| 79 '<(version_cc_file)', | |
| 80 ], | |
| 81 'defines': [ | |
| 82 # The only effect of DART_SHARED_LIB is to export the Dart API entries. | |
| 83 'DART_SHARED_LIB', | |
| 84 'DART_PRECOMPILED_RUNTIME', | |
| 85 ], | |
| 86 'direct_dependent_settings': { | |
| 87 'include_dirs': [ | |
| 88 'include', | |
| 89 ], | |
| 90 }, | |
| 91 }, | |
| 92 { | |
| 93 'target_name': 'generate_version_cc_file', | |
| 94 'type': 'none', | |
| 95 'toolsets':['host'], | |
| 96 'dependencies': [ | |
| 97 'libdart_dependency_helper.target#target', | |
| 98 'libdart_dependency_helper.host#host', | |
| 99 ], | |
| 100 'actions': [ | |
| 101 { | |
| 102 'action_name': 'generate_version_cc', | |
| 103 'inputs': [ | |
| 104 '../tools/make_version.py', | |
| 105 '../tools/utils.py', | |
| 106 '../tools/print_version.py', | |
| 107 '../tools/VERSION', | |
| 108 '<(version_in_cc_file)', | |
| 109 # Depend on libdart_dependency_helper to track the libraries it | |
| 110 # depends on. | |
| 111 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)libdart_dependency_helper.target
<(EXECUTABLE_SUFFIX)', | |
| 112 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)libdart_dependency_helper.host<(
EXECUTABLE_SUFFIX)', | |
| 113 ], | |
| 114 'outputs': [ | |
| 115 '<(version_cc_file)', | |
| 116 ], | |
| 117 'action': [ | |
| 118 'python', | |
| 119 '-u', # Make standard I/O unbuffered. | |
| 120 '../tools/make_version.py', | |
| 121 '--output', '<(version_cc_file)', | |
| 122 '--input', '<(version_in_cc_file)', | |
| 123 ], | |
| 124 }, | |
| 125 ], | |
| 126 }, | |
| 127 { | |
| 128 'target_name': 'libdart_dependency_helper.target', | |
| 129 'type': 'executable', | |
| 130 'toolsets':['target'], | |
| 131 # The dependencies here are the union of the dependencies of libdart and | |
| 132 # libdart_nosnapshot. | |
| 133 'dependencies': ['<@(libdart_deps)'], | |
| 134 'sources': [ | |
| 135 'vm/libdart_dependency_helper.cc', | |
| 136 ], | |
| 137 }, | |
| 138 { | |
| 139 'target_name': 'libdart_dependency_helper.host', | |
| 140 'type': 'executable', | |
| 141 'toolsets':['host'], | |
| 142 # The dependencies here are the union of the dependencies of libdart and | |
| 143 # libdart_nosnapshot. | |
| 144 'dependencies': ['<@(libdart_deps)'], | |
| 145 'sources': [ | |
| 146 'vm/libdart_dependency_helper.cc', | |
| 147 ], | |
| 148 }, | |
| 149 # Targets coming from dart/dart.gyp. | |
| 150 { | |
| 151 'target_name': 'runtime_all', | |
| 152 'type': 'none', | |
| 153 'dependencies': [ | |
| 154 'sample_extension', | |
| 155 ], | |
| 156 }, | |
| 157 { | |
| 158 'target_name': 'sample_extension', | |
| 159 'type': 'shared_library', | |
| 160 'dependencies': [ | |
| 161 'dart', | |
| 162 ], | |
| 163 'include_dirs': [ | |
| 164 '.', | |
| 165 ], | |
| 166 'sources': [ | |
| 167 '../samples/sample_extension/sample_extension.cc', | |
| 168 '../samples/sample_extension/sample_extension_dllmain_win.cc', | |
| 169 ], | |
| 170 'defines': [ | |
| 171 'DART_SHARED_LIB', | |
| 172 ], | |
| 173 'conditions': [ | |
| 174 ['OS=="win"', { | |
| 175 'msvs_settings': { | |
| 176 'VCLinkerTool': { | |
| 177 'AdditionalDependencies': [ 'dart.lib' ], | |
| 178 'AdditionalLibraryDirectories': [ '<(PRODUCT_DIR)' ], | |
| 179 }, | |
| 180 }, | |
| 181 }], | |
| 182 ['OS=="mac"', { | |
| 183 'xcode_settings': { | |
| 184 'OTHER_LDFLAGS': [ | |
| 185 '-undefined', | |
| 186 'dynamic_lookup', | |
| 187 ], | |
| 188 }, | |
| 189 }], | |
| 190 ['OS=="linux"', { | |
| 191 'cflags': [ | |
| 192 '-fPIC', | |
| 193 ], | |
| 194 }], | |
| 195 ], | |
| 196 }, | |
| 197 ], | |
| 198 } | |
| OLD | NEW |