blob: 2d9af7807a05a77bf17200b4deb02efa8e895a63 [file] [log] [blame]
ager@chromium.org5f0c45f2010-12-17 08:51:21 +00001# 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{
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000029 'variables': {
30 'console%': '',
31 },
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000032 'targets': [
33 {
34 'target_name': 'd8',
35 'type': 'executable',
36 'dependencies': [
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000037 '../tools/gyp/v8.gyp:v8',
38 ],
39 'include_dirs+': [
40 '../src',
41 ],
42 'defines': [
43 'ENABLE_DEBUGGER_SUPPORT',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000044 ],
45 'sources': [
46 'd8.cc',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000047 ],
48 'conditions': [
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000049 [ 'component!="shared_library"', {
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000050 'sources': [ 'd8-debug.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', ],
51 'conditions': [
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +000052 [ 'want_separate_host_toolset==1', {
53 'dependencies': [
54 'd8_js2c#host',
55 ],
56 }, {
57 'dependencies': [
58 'd8_js2c',
59 ],
60 }],
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000061 [ 'console=="readline"', {
62 'libraries': [ '-lreadline', ],
63 'sources': [ 'd8-readline.cc' ],
64 }],
65 [ '(OS=="linux" or OS=="mac" or OS=="freebsd" \
66 or OS=="openbsd" or OS=="solaris")', {
67 'sources': [ 'd8-posix.cc', ]
68 }],
69 [ 'OS=="win"', {
70 'sources': [ 'd8-windows.cc', ]
71 }],
72 ],
sgjesse@chromium.org8e8294a2011-05-02 14:30:53 +000073 }],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000074 ],
75 },
76 {
77 'target_name': 'd8_js2c',
78 'type': 'none',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000079 'variables': {
80 'js_files': [
81 'd8.js',
danno@chromium.org160a7b02011-04-18 15:51:38 +000082 'macros.py',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000083 ],
84 },
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +000085 'conditions': [
86 [ 'want_separate_host_toolset==1', {
87 'toolsets': ['host'],
88 }, {
89 'toolsets': ['target'],
90 }]
91 ],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000092 'actions': [
93 {
94 'action_name': 'd8_js2c',
95 'inputs': [
96 '../tools/js2c.py',
97 '<@(js_files)',
98 ],
99 'outputs': [
100 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +0000101 ],
102 'action': [
103 'python',
104 '../tools/js2c.py',
105 '<@(_outputs)',
106 'D8',
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +0000107 'off', # compress startup data
ager@chromium.org5f0c45f2010-12-17 08:51:21 +0000108 '<@(js_files)'
109 ],
110 },
111 ],
112 }
113 ],
114}