1 # Copyright 2012 the V8 project authors. All rights reserved. 2 # Redistribution and use in source and binary forms, with or without 3 # modification, are permitted provided that the following conditions are 4 # met: 5 # 6 # * Redistributions of source code must retain the above copyright 7 # notice, this list of conditions and the following disclaimer. 8 # * Redistributions in binary form must reproduce the above 9 # copyright notice, this list of conditions and the following 10 # disclaimer in the documentation and/or other materials provided 11 # with the distribution. 12 # * Neither the name of Google Inc. nor the names of its 13 # contributors may be used to endorse or promote products derived 14 # from this software without specific prior written permission. 15 # 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 28 { 29 'includes': ['../build/common.gypi'], 30 'variables': { 31 'console%': '', 32 }, 33 'targets': [ 34 { 35 'target_name': 'd8', 36 'type': 'executable', 37 'dependencies': [ 38 '../tools/gyp/v8.gyp:v8', 39 ], 40 # Generated source files need this explicitly: 41 'include_dirs+': [ 42 '../src', 43 ], 44 'sources': [ 45 'd8.cc', 46 ], 47 'conditions': [ 48 [ 'component!="shared_library"', { 49 'sources': [ 'd8-debug.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', ], 50 'conditions': [ 51 [ 'want_separate_host_toolset==1', { 52 'dependencies': [ 53 'd8_js2c#host', 54 ], 55 }, { 56 'dependencies': [ 57 'd8_js2c', 58 ], 59 }], 60 [ 'console=="readline"', { 61 'libraries': [ '-lreadline', ], 62 'sources': [ 'd8-readline.cc' ], 63 }], 64 ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \ 65 or OS=="openbsd" or OS=="solaris" or OS=="android")', { 66 'sources': [ 'd8-posix.cc', ] 67 }], 68 [ 'OS=="win"', { 69 'sources': [ 'd8-windows.cc', ] 70 }], 71 ], 72 }], 73 ], 74 }, 75 { 76 'target_name': 'd8_js2c', 77 'type': 'none', 78 'variables': { 79 'js_files': [ 80 'd8.js', 81 'macros.py', 82 ], 83 }, 84 'conditions': [ 85 [ 'want_separate_host_toolset==1', { 86 'toolsets': ['host'], 87 }, { 88 'toolsets': ['target'], 89 }] 90 ], 91 'actions': [ 92 { 93 'action_name': 'd8_js2c', 94 'inputs': [ 95 '../tools/js2c.py', 96 '<@(js_files)', 97 ], 98 'outputs': [ 99 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', 100 ], 101 'action': [ 102 'python', 103 '../tools/js2c.py', 104 '<@(_outputs)', 105 'D8', 106 'off', # compress startup data 107 '<@(js_files)' 108 ], 109 }, 110 ], 111 } 112 ], 113 } 114