ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 1 | # Copyright 2010 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 | { |
ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 29 | 'includes': ['../build/common.gypi'], |
svenpanne@chromium.org | 84bcc55 | 2011-07-18 09:50:57 +0000 | [diff] [blame] | 30 | 'variables': { |
| 31 | 'console%': '', |
| 32 | }, |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 33 | 'targets': [ |
| 34 | { |
| 35 | 'target_name': 'd8', |
| 36 | 'type': 'executable', |
| 37 | 'dependencies': [ |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 38 | '../tools/gyp/v8.gyp:v8', |
| 39 | ], |
ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 40 | # Generated source files need this explicitly: |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 41 | 'include_dirs+': [ |
| 42 | '../src', |
| 43 | ], |
| 44 | 'defines': [ |
| 45 | 'ENABLE_DEBUGGER_SUPPORT', |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 46 | ], |
| 47 | 'sources': [ |
| 48 | 'd8.cc', |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 49 | ], |
| 50 | 'conditions': [ |
svenpanne@chromium.org | 84bcc55 | 2011-07-18 09:50:57 +0000 | [diff] [blame] | 51 | [ 'component!="shared_library"', { |
svenpanne@chromium.org | 84bcc55 | 2011-07-18 09:50:57 +0000 | [diff] [blame] | 52 | 'sources': [ 'd8-debug.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', ], |
| 53 | 'conditions': [ |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 54 | [ 'want_separate_host_toolset==1', { |
| 55 | 'dependencies': [ |
| 56 | 'd8_js2c#host', |
| 57 | ], |
| 58 | }, { |
| 59 | 'dependencies': [ |
| 60 | 'd8_js2c', |
| 61 | ], |
| 62 | }], |
svenpanne@chromium.org | 84bcc55 | 2011-07-18 09:50:57 +0000 | [diff] [blame] | 63 | [ 'console=="readline"', { |
| 64 | 'libraries': [ '-lreadline', ], |
| 65 | 'sources': [ 'd8-readline.cc' ], |
| 66 | }], |
| 67 | [ '(OS=="linux" or OS=="mac" or OS=="freebsd" \ |
| 68 | or OS=="openbsd" or OS=="solaris")', { |
| 69 | 'sources': [ 'd8-posix.cc', ] |
| 70 | }], |
| 71 | [ 'OS=="win"', { |
| 72 | 'sources': [ 'd8-windows.cc', ] |
| 73 | }], |
| 74 | ], |
sgjesse@chromium.org | 8e8294a | 2011-05-02 14:30:53 +0000 | [diff] [blame] | 75 | }], |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 76 | ], |
| 77 | }, |
| 78 | { |
| 79 | 'target_name': 'd8_js2c', |
| 80 | 'type': 'none', |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 81 | 'variables': { |
| 82 | 'js_files': [ |
| 83 | 'd8.js', |
danno@chromium.org | 160a7b0 | 2011-04-18 15:51:38 +0000 | [diff] [blame] | 84 | 'macros.py', |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 85 | ], |
| 86 | }, |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 87 | 'conditions': [ |
| 88 | [ 'want_separate_host_toolset==1', { |
| 89 | 'toolsets': ['host'], |
| 90 | }, { |
| 91 | 'toolsets': ['target'], |
| 92 | }] |
| 93 | ], |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 94 | 'actions': [ |
| 95 | { |
| 96 | 'action_name': 'd8_js2c', |
| 97 | 'inputs': [ |
| 98 | '../tools/js2c.py', |
| 99 | '<@(js_files)', |
| 100 | ], |
| 101 | 'outputs': [ |
| 102 | '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 103 | ], |
| 104 | 'action': [ |
| 105 | 'python', |
| 106 | '../tools/js2c.py', |
| 107 | '<@(_outputs)', |
| 108 | 'D8', |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 109 | 'off', # compress startup data |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 110 | '<@(js_files)' |
| 111 | ], |
| 112 | }, |
| 113 | ], |
| 114 | } |
| 115 | ], |
| 116 | } |