blob: cce8f2a1fb0782738648dd9f09d4fd40b22d14a8 [file] [log] [blame]
ulan@chromium.org2efb9002012-01-19 15:36:35 +00001# Copyright 2012 the V8 project authors. All rights reserved.
ager@chromium.org5f0c45f2010-12-17 08:51:21 +00002# 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.org4668a2c2011-08-29 10:41:00 +000029 'includes': ['../build/common.gypi'],
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000030 'variables': {
31 'console%': '',
32 },
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000033 'targets': [
34 {
35 'target_name': 'd8',
36 'type': 'executable',
37 'dependencies': [
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000038 '../tools/gyp/v8.gyp:v8',
39 ],
ricow@chromium.org4668a2c2011-08-29 10:41:00 +000040 # Generated source files need this explicitly:
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000041 'include_dirs+': [
42 '../src',
43 ],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000044 'sources': [
45 'd8.cc',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000046 ],
47 'conditions': [
jkummerow@chromium.org59297c72013-01-09 16:32:23 +000048 [ 'console=="readline"', {
49 'libraries': [ '-lreadline', ],
50 'sources': [ 'd8-readline.cc' ],
51 }],
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000052 [ 'component!="shared_library"', {
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000053 'sources': [ 'd8-debug.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', ],
54 'conditions': [
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +000055 [ 'want_separate_host_toolset==1', {
56 'dependencies': [
57 'd8_js2c#host',
58 ],
59 }, {
60 'dependencies': [
61 'd8_js2c',
62 ],
63 }],
rossberg@chromium.orgfab14982012-01-05 15:02:15 +000064 ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
65 or OS=="openbsd" or OS=="solaris" or OS=="android")', {
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000066 'sources': [ 'd8-posix.cc', ]
67 }],
68 [ 'OS=="win"', {
69 'sources': [ 'd8-windows.cc', ]
70 }],
71 ],
sgjesse@chromium.org8e8294a2011-05-02 14:30:53 +000072 }],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000073 ],
74 },
75 {
76 'target_name': 'd8_js2c',
77 'type': 'none',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000078 'variables': {
79 'js_files': [
80 'd8.js',
danno@chromium.org160a7b02011-04-18 15:51:38 +000081 'macros.py',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000082 ],
83 },
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +000084 'conditions': [
85 [ 'want_separate_host_toolset==1', {
86 'toolsets': ['host'],
87 }, {
88 'toolsets': ['target'],
89 }]
90 ],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000091 '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',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +0000100 ],
101 'action': [
102 'python',
103 '../tools/js2c.py',
104 '<@(_outputs)',
105 'D8',
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +0000106 'off', # compress startup data
ager@chromium.org5f0c45f2010-12-17 08:51:21 +0000107 '<@(js_files)'
108 ],
109 },
110 ],
111 }
112 ],
113}