Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 1 | { |
Ryan Dahl | bea4827 | 2011-08-04 06:36:27 | [diff] [blame] | 2 | 'variables': { |
Ryan Dahl | bca88b2 | 2012-01-07 00:20:45 | [diff] [blame] | 3 | 'v8_use_snapshot%': 'true', |
Ryan Dahl | d2ab314 | 2011-10-07 08:08:53 | [diff] [blame] | 4 | # Turn off -Werror in V8 |
| 5 | # See http://codereview.chromium.org/8159015 |
| 6 | 'werror': '', |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 7 | 'node_use_dtrace%': 'false', |
Igor Zinkovsky | 35a1421 | 2012-06-11 23:23:17 | [diff] [blame] | 8 | 'node_use_etw%': 'false', |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 9 | 'node_use_perfctr%': 'false', |
Scott Blomquist | 841b7f5 | 2012-12-21 08:06:21 | [diff] [blame] | 10 | 'node_has_winsdk%': 'false', |
Nathan Rajlich | a84adad | 2012-02-23 22:32:24 | [diff] [blame] | 11 | 'node_shared_v8%': 'false', |
T.C. Hollingsworth | d03b848 | 2012-02-26 23:02:21 | [diff] [blame] | 12 | 'node_shared_zlib%': 'false', |
Stephen Gallagher | bfd78b6 | 2012-10-23 13:01:26 | [diff] [blame] | 13 | 'node_shared_http_parser%': 'false', |
Stephen Gallagher | 73ff653 | 2012-10-23 14:27:19 | [diff] [blame] | 14 | 'node_shared_cares%': 'false', |
Stephen Gallagher | 38809e3 | 2012-10-23 23:54:22 | [diff] [blame] | 15 | 'node_shared_libuv%': 'false', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 16 | 'node_use_openssl%': 'true', |
Jan Wynholds | 06810b2 | 2012-10-09 22:09:07 | [diff] [blame] | 17 | 'node_use_systemtap%': 'false', |
Ryan Dahl | fe464a2 | 2012-06-20 20:31:49 | [diff] [blame] | 18 | 'node_shared_openssl%': 'false', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 19 | 'library_files': [ |
| 20 | 'src/node.js', |
| 21 | 'lib/_debugger.js', |
| 22 | 'lib/_linklist.js', |
| 23 | 'lib/assert.js', |
| 24 | 'lib/buffer.js', |
Ryan Dahl | 96e423a | 2011-10-11 20:16:33 | [diff] [blame] | 25 | 'lib/child_process.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 26 | 'lib/console.js', |
| 27 | 'lib/constants.js', |
| 28 | 'lib/crypto.js', |
Ryan Dahl | 73b4b86 | 2011-10-12 21:51:25 | [diff] [blame] | 29 | 'lib/cluster.js', |
Ryan Dahl | 71cce3f | 2011-10-11 20:26:41 | [diff] [blame] | 30 | 'lib/dgram.js', |
Ryan Dahl | 58e892d | 2011-10-11 20:21:30 | [diff] [blame] | 31 | 'lib/dns.js', |
isaacs | 963459d | 2012-04-06 23:26:18 | [diff] [blame] | 32 | 'lib/domain.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 33 | 'lib/events.js', |
| 34 | 'lib/freelist.js', |
| 35 | 'lib/fs.js', |
| 36 | 'lib/http.js', |
Timothy J Fontaine | 62e4f89 | 2013-04-11 21:47:15 | [diff] [blame] | 37 | 'lib/_http_agent.js', |
Timothy J Fontaine | 951e0b6 | 2013-04-11 23:11:12 | [diff] [blame] | 38 | 'lib/_http_client.js', |
Timothy J Fontaine | bb56489 | 2013-04-11 22:15:41 | [diff] [blame] | 39 | 'lib/_http_common.js', |
Timothy J Fontaine | 5909a9c | 2013-04-11 22:00:45 | [diff] [blame] | 40 | 'lib/_http_incoming.js', |
Timothy J Fontaine | dc9f97b | 2013-04-11 22:37:14 | [diff] [blame] | 41 | 'lib/_http_outgoing.js', |
Timothy J Fontaine | 6717fdc | 2013-04-11 23:00:19 | [diff] [blame] | 42 | 'lib/_http_server.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 43 | 'lib/https.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 44 | 'lib/module.js', |
Ryan Dahl | be0bb2d | 2011-10-11 20:07:14 | [diff] [blame] | 45 | 'lib/net.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 46 | 'lib/os.js', |
| 47 | 'lib/path.js', |
| 48 | 'lib/punycode.js', |
| 49 | 'lib/querystring.js', |
| 50 | 'lib/readline.js', |
| 51 | 'lib/repl.js', |
| 52 | 'lib/stream.js', |
isaacs | 420e07c | 2012-10-02 22:44:50 | [diff] [blame] | 53 | 'lib/_stream_readable.js', |
| 54 | 'lib/_stream_writable.js', |
| 55 | 'lib/_stream_duplex.js', |
| 56 | 'lib/_stream_transform.js', |
| 57 | 'lib/_stream_passthrough.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 58 | 'lib/string_decoder.js', |
| 59 | 'lib/sys.js', |
Ryan Dahl | be0bb2d | 2011-10-11 20:07:14 | [diff] [blame] | 60 | 'lib/timers.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 61 | 'lib/tls.js', |
Fedor Indutny | af80e7b | 2013-06-13 13:36:00 | [diff] [blame] | 62 | 'lib/_tls_legacy.js', |
| 63 | 'lib/_tls_wrap.js', |
Ryan Dahl | cdf5d91 | 2011-10-11 20:41:33 | [diff] [blame] | 64 | 'lib/tty.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 65 | 'lib/url.js', |
| 66 | 'lib/util.js', |
| 67 | 'lib/vm.js', |
isaacs | 5b8e1da | 2011-09-06 23:13:05 | [diff] [blame] | 68 | 'lib/zlib.js', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 69 | ], |
Ryan Dahl | bea4827 | 2011-08-04 06:36:27 | [diff] [blame] | 70 | }, |
| 71 | |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 72 | 'targets': [ |
| 73 | { |
| 74 | 'target_name': 'node', |
| 75 | 'type': 'executable', |
Ryan Dahl | bea4827 | 2011-08-04 06:36:27 | [diff] [blame] | 76 | |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 77 | 'dependencies': [ |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 78 | 'node_js2c#host', |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 79 | ], |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 80 | |
| 81 | 'include_dirs': [ |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 82 | 'src', |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 83 | 'tools/msvs/genfiles', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 84 | 'deps/uv/src/ares', |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 85 | '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h |
| 86 | ], |
| 87 | |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 88 | 'sources': [ |
Igor Zinkovsky | 8fe5712 | 2011-09-22 23:18:08 | [diff] [blame] | 89 | 'src/fs_event_wrap.cc', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 90 | 'src/cares_wrap.cc', |
| 91 | 'src/handle_wrap.cc', |
| 92 | 'src/node.cc', |
| 93 | 'src/node_buffer.cc', |
| 94 | 'src/node_constants.cc', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 95 | 'src/node_extensions.cc', |
| 96 | 'src/node_file.cc', |
| 97 | 'src/node_http_parser.cc', |
| 98 | 'src/node_javascript.cc', |
| 99 | 'src/node_main.cc', |
| 100 | 'src/node_os.cc', |
| 101 | 'src/node_script.cc', |
Ben Noordhuis | f0ce984 | 2012-06-16 20:41:37 | [diff] [blame] | 102 | 'src/node_stat_watcher.cc', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 103 | 'src/node_string.cc', |
Andrew Paprocki | c081809 | 2012-10-08 19:24:08 | [diff] [blame] | 104 | 'src/node_watchdog.cc', |
isaacs | 5b8e1da | 2011-09-06 23:13:05 | [diff] [blame] | 105 | 'src/node_zlib.cc', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 106 | 'src/pipe_wrap.cc', |
Bert Belder | 600a646 | 2012-08-20 21:59:21 | [diff] [blame] | 107 | 'src/signal_wrap.cc', |
Trevor Norris | 8f3f9f7 | 2013-04-17 23:18:47 | [diff] [blame] | 108 | 'src/smalloc.cc', |
isaacs | 64fc34b | 2013-05-01 22:40:43 | [diff] [blame] | 109 | 'src/string_bytes.cc', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 110 | 'src/stream_wrap.cc', |
| 111 | 'src/tcp_wrap.cc', |
| 112 | 'src/timer_wrap.cc', |
Ryan Dahl | c1ae6ea | 2011-09-20 20:38:07 | [diff] [blame] | 113 | 'src/tty_wrap.cc', |
Ryan Dahl | db1bf67 | 2011-08-08 19:11:48 | [diff] [blame] | 114 | 'src/process_wrap.cc', |
Ryan Dahl | 06f750c | 2011-08-24 23:20:08 | [diff] [blame] | 115 | 'src/udp_wrap.cc', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 116 | # headers to make for a more pleasant IDE experience |
| 117 | 'src/handle_wrap.h', |
| 118 | 'src/node.h', |
| 119 | 'src/node_buffer.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 120 | 'src/node_constants.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 121 | 'src/node_extensions.h', |
| 122 | 'src/node_file.h', |
| 123 | 'src/node_http_parser.h', |
| 124 | 'src/node_javascript.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 125 | 'src/node_os.h', |
| 126 | 'src/node_root_certs.h', |
| 127 | 'src/node_script.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 128 | 'src/node_string.h', |
| 129 | 'src/node_version.h', |
Andrew Paprocki | c081809 | 2012-10-08 19:24:08 | [diff] [blame] | 130 | 'src/node_watchdog.h', |
Fedor Indutny | 6978e99 | 2013-06-11 10:52:27 | [diff] [blame] | 131 | 'src/node_wrap.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 132 | 'src/pipe_wrap.h', |
Ben Noordhuis | a7820a1 | 2013-06-04 10:21:58 | [diff] [blame] | 133 | 'src/queue.h', |
Trevor Norris | 8f3f9f7 | 2013-04-17 23:18:47 | [diff] [blame] | 134 | 'src/smalloc.h', |
Fedor Indutny | af98fc9 | 2012-05-16 16:04:24 | [diff] [blame] | 135 | 'src/tty_wrap.h', |
| 136 | 'src/tcp_wrap.h', |
| 137 | 'src/udp_wrap.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 138 | 'src/req_wrap.h', |
isaacs | 64fc34b | 2013-05-01 22:40:43 | [diff] [blame] | 139 | 'src/string_bytes.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 140 | 'src/stream_wrap.h', |
Bert Belder | 9e55ba7 | 2012-08-06 19:22:11 | [diff] [blame] | 141 | 'src/tree.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 142 | 'deps/http_parser/http_parser.h', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 143 | '<(SHARED_INTERMEDIATE_DIR)/node_natives.h', |
Bert Belder | ae2ac4f | 2011-09-04 23:01:53 | [diff] [blame] | 144 | # javascript files to make for an even more pleasant IDE experience |
| 145 | '<@(library_files)', |
Bert Belder | c0c4bd4 | 2011-10-28 10:10:24 | [diff] [blame] | 146 | # node.gyp is added to the project by default. |
| 147 | 'common.gypi', |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 148 | ], |
| 149 | |
| 150 | 'defines': [ |
Ben Noordhuis | 09dc577 | 2011-11-29 16:35:19 | [diff] [blame] | 151 | 'NODE_WANT_INTERNALS=1', |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 152 | 'ARCH="<(target_arch)"', |
| 153 | 'PLATFORM="<(OS)"', |
Maciej Małecki | f84bf5b | 2012-12-21 01:56:47 | [diff] [blame] | 154 | 'NODE_TAG="<(node_tag)"', |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 155 | ], |
| 156 | |
| 157 | 'conditions': [ |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 158 | [ 'node_use_openssl=="true"', { |
Peter Bright | 71333b3 | 2011-08-06 19:20:15 | [diff] [blame] | 159 | 'defines': [ 'HAVE_OPENSSL=1' ], |
Fedor Indutny | 03e008d | 2013-06-11 10:59:10 | [diff] [blame] | 160 | 'sources': [ |
| 161 | 'src/node_crypto.cc', |
| 162 | 'src/node_crypto_bio.cc', |
Nathan Rajlich | 567c72b | 2013-07-06 03:53:23 | [diff] [blame^] | 163 | 'src/node_crypto.h', |
| 164 | 'src/node_crypto_bio.h', |
Fedor Indutny | 03e008d | 2013-06-11 10:59:10 | [diff] [blame] | 165 | 'src/tls_wrap.cc', |
| 166 | 'src/tls_wrap.h' |
| 167 | ], |
Ben Noordhuis | 9f98698 | 2011-08-29 22:01:43 | [diff] [blame] | 168 | 'conditions': [ |
Ryan Dahl | fe464a2 | 2012-06-20 20:31:49 | [diff] [blame] | 169 | [ 'node_shared_openssl=="false"', { |
Ben Noordhuis | 9f98698 | 2011-08-29 22:01:43 | [diff] [blame] | 170 | 'dependencies': [ './deps/openssl/openssl.gyp:openssl' ], |
| 171 | }]] |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 172 | }, { |
| 173 | 'defines': [ 'HAVE_OPENSSL=0' ] |
| 174 | }], |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 175 | [ 'node_use_dtrace=="true"', { |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 176 | 'defines': [ 'HAVE_DTRACE=1' ], |
| 177 | 'dependencies': [ 'node_dtrace_header' ], |
| 178 | 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], |
| 179 | # |
Dave Pacheco | fe7440c | 2013-03-28 18:36:00 | [diff] [blame] | 180 | # DTrace is supported on solaris, mac, and bsd. There are three |
| 181 | # object files associated with DTrace support, but they're not all |
| 182 | # used all the time: |
| 183 | # |
| 184 | # node_dtrace.o all configurations |
| 185 | # node_dtrace_ustack.o not supported on OS X |
| 186 | # node_dtrace_provider.o All except OS X. "dtrace -G" is not |
| 187 | # used on OS X. |
| 188 | # |
| 189 | # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not |
| 190 | # actually exist. They're listed here to trick GYP into linking the |
| 191 | # corresponding object files into the final "node" executable. These |
| 192 | # object files are generated by "dtrace -G" using custom actions |
| 193 | # below, and the GYP-generated Makefiles will properly build them when |
| 194 | # needed. |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 195 | # |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 196 | 'sources': [ |
Ryan Dahl | b3ddb89 | 2011-10-26 18:31:12 | [diff] [blame] | 197 | 'src/node_dtrace.cc', |
Peter Bright | 64b4168 | 2011-08-15 16:35:48 | [diff] [blame] | 198 | ], |
Dave Pacheco | fe7440c | 2013-03-28 18:36:00 | [diff] [blame] | 199 | 'conditions': [ [ |
| 200 | 'OS!="mac"', { |
| 201 | 'sources': [ |
| 202 | 'src/node_dtrace_ustack.cc', |
| 203 | 'src/node_dtrace_provider.cc', |
| 204 | ] |
| 205 | } |
| 206 | ] ] |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 207 | } ], |
Jan Wynholds | 06810b2 | 2012-10-09 22:09:07 | [diff] [blame] | 208 | [ 'node_use_systemtap=="true"', { |
| 209 | 'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1=1' ], |
Jan Wynholds | 06810b2 | 2012-10-09 22:09:07 | [diff] [blame] | 210 | 'sources': [ |
| 211 | 'src/node_dtrace.cc', |
Jan Wynholds | 06810b2 | 2012-10-09 22:09:07 | [diff] [blame] | 212 | ], |
| 213 | } ], |
Igor Zinkovsky | 35a1421 | 2012-06-11 23:23:17 | [diff] [blame] | 214 | [ 'node_use_etw=="true"', { |
| 215 | 'defines': [ 'HAVE_ETW=1' ], |
| 216 | 'dependencies': [ 'node_etw' ], |
| 217 | 'sources': [ |
| 218 | 'src/node_win32_etw_provider.h', |
| 219 | 'src/node_win32_etw_provider-inl.h', |
| 220 | 'src/node_win32_etw_provider.cc', |
| 221 | 'src/node_dtrace.cc', |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 222 | 'tools/msvs/genfiles/node_etw_provider.h', |
| 223 | 'tools/msvs/genfiles/node_etw_provider.rc', |
Igor Zinkovsky | 35a1421 | 2012-06-11 23:23:17 | [diff] [blame] | 224 | ] |
| 225 | } ], |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 226 | [ 'node_use_perfctr=="true"', { |
| 227 | 'defines': [ 'HAVE_PERFCTR=1' ], |
| 228 | 'dependencies': [ 'node_perfctr' ], |
| 229 | 'sources': [ |
| 230 | 'src/node_win32_perfctr_provider.h', |
| 231 | 'src/node_win32_perfctr_provider.cc', |
| 232 | 'src/node_counters.cc', |
| 233 | 'src/node_counters.h', |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 234 | 'tools/msvs/genfiles/node_perfctr_provider.rc', |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 235 | ] |
| 236 | } ], |
Paddy Byers | d8852aa | 2013-04-03 07:35:39 | [diff] [blame] | 237 | [ 'v8_postmortem_support=="true"', { |
| 238 | 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ], |
| 239 | }], |
Ben Noordhuis | f00c8bc | 2012-06-26 22:33:50 | [diff] [blame] | 240 | [ 'node_shared_v8=="false"', { |
isaacs | 59ecf2c | 2012-02-23 22:52:18 | [diff] [blame] | 241 | 'sources': [ |
| 242 | 'deps/v8/include/v8.h', |
| 243 | 'deps/v8/include/v8-debug.h', |
| 244 | ], |
| 245 | 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ], |
| 246 | }], |
| 247 | |
T.C. Hollingsworth | d03b848 | 2012-02-26 23:02:21 | [diff] [blame] | 248 | [ 'node_shared_zlib=="false"', { |
| 249 | 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], |
| 250 | }], |
| 251 | |
Stephen Gallagher | bfd78b6 | 2012-10-23 13:01:26 | [diff] [blame] | 252 | [ 'node_shared_http_parser=="false"', { |
| 253 | 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ], |
| 254 | }], |
| 255 | |
Stephen Gallagher | 73ff653 | 2012-10-23 14:27:19 | [diff] [blame] | 256 | [ 'node_shared_cares=="false"', { |
| 257 | 'dependencies': [ 'deps/cares/cares.gyp:cares' ], |
| 258 | }], |
| 259 | |
Stephen Gallagher | 38809e3 | 2012-10-23 23:54:22 | [diff] [blame] | 260 | [ 'node_shared_libuv=="false"', { |
| 261 | 'dependencies': [ 'deps/uv/uv.gyp:libuv' ], |
| 262 | }], |
| 263 | |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 264 | [ 'OS=="win"', { |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 265 | 'sources': [ |
Bert Belder | 0187b65 | 2012-06-13 15:40:50 | [diff] [blame] | 266 | 'src/res/node.rc', |
Peter Bright | 71333b3 | 2011-08-06 19:20:15 | [diff] [blame] | 267 | ], |
Peter Bright | 6ac8c55 | 2011-08-07 05:11:21 | [diff] [blame] | 268 | 'defines': [ |
Peter Bright | 6ac8c55 | 2011-08-07 05:11:21 | [diff] [blame] | 269 | 'FD_SETSIZE=1024', |
Peter Bright | 79d9f62 | 2011-08-07 17:43:24 | [diff] [blame] | 270 | # we need to use node's preferred "win32" rather than gyp's preferred "win" |
| 271 | 'PLATFORM="win32"', |
Bert Belder | d52f502 | 2012-02-16 19:20:07 | [diff] [blame] | 272 | '_UNICODE=1', |
Peter Bright | 6ac8c55 | 2011-08-07 05:11:21 | [diff] [blame] | 273 | ], |
Ryan Dahl | 1976288 | 2011-09-02 19:53:16 | [diff] [blame] | 274 | 'libraries': [ '-lpsapi.lib' ] |
Ben Noordhuis | acbfc40 | 2012-07-12 23:43:14 | [diff] [blame] | 275 | }, { # POSIX |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 276 | 'defines': [ '__POSIX__' ], |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 277 | }], |
| 278 | [ 'OS=="mac"', { |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 279 | 'libraries': [ '-framework Carbon' ], |
Nathan Rajlich | f2ba4ce | 2012-01-11 22:44:39 | [diff] [blame] | 280 | 'defines!': [ |
| 281 | 'PLATFORM="mac"', |
| 282 | ], |
Nathan Rajlich | 9ff86a2 | 2012-01-11 22:36:27 | [diff] [blame] | 283 | 'defines': [ |
| 284 | # we need to use node's preferred "darwin" rather than gyp's preferred "mac" |
| 285 | 'PLATFORM="darwin"', |
| 286 | ], |
Ryan Dahl | b433c42 | 2011-08-16 00:54:47 | [diff] [blame] | 287 | }], |
Ben Noordhuis | decd818 | 2011-08-17 05:44:53 | [diff] [blame] | 288 | [ 'OS=="freebsd"', { |
Ben Noordhuis | decd818 | 2011-08-17 05:44:53 | [diff] [blame] | 289 | 'libraries': [ |
| 290 | '-lutil', |
| 291 | '-lkvm', |
| 292 | ], |
| 293 | }], |
Ben Noordhuis | 13871fa | 2011-10-26 05:11:20 | [diff] [blame] | 294 | [ 'OS=="solaris"', { |
Ben Noordhuis | 13871fa | 2011-10-26 05:11:20 | [diff] [blame] | 295 | 'libraries': [ |
| 296 | '-lkstat', |
Trent Mick | f70b138 | 2012-07-27 17:56:40 | [diff] [blame] | 297 | '-lumem', |
Ben Noordhuis | 13871fa | 2011-10-26 05:11:20 | [diff] [blame] | 298 | ], |
Nathan Rajlich | 606a933 | 2012-08-29 21:57:25 | [diff] [blame] | 299 | 'defines!': [ |
| 300 | 'PLATFORM="solaris"', |
| 301 | ], |
| 302 | 'defines': [ |
| 303 | # we need to use node's preferred "sunos" |
| 304 | # rather than gyp's preferred "solaris" |
| 305 | 'PLATFORM="sunos"', |
| 306 | ], |
Ben Noordhuis | 13871fa | 2011-10-26 05:11:20 | [diff] [blame] | 307 | }], |
Peter Bright | 16788f4 | 2011-08-13 18:17:47 | [diff] [blame] | 308 | ], |
Bert Belder | 5691e8a | 2012-09-24 22:50:37 | [diff] [blame] | 309 | 'msvs_settings': { |
Peter Bright | 16788f4 | 2011-08-13 18:17:47 | [diff] [blame] | 310 | 'VCLinkerTool': { |
| 311 | 'SubSystem': 1, # /subsystem:console |
| 312 | }, |
| 313 | }, |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 314 | }, |
Igor Zinkovsky | 35a1421 | 2012-06-11 23:23:17 | [diff] [blame] | 315 | # generate ETW header and resource files |
| 316 | { |
| 317 | 'target_name': 'node_etw', |
| 318 | 'type': 'none', |
| 319 | 'conditions': [ |
Scott Blomquist | 841b7f5 | 2012-12-21 08:06:21 | [diff] [blame] | 320 | [ 'node_use_etw=="true" and node_has_winsdk=="true"', { |
Igor Zinkovsky | 35a1421 | 2012-06-11 23:23:17 | [diff] [blame] | 321 | 'actions': [ |
| 322 | { |
| 323 | 'action_name': 'node_etw', |
| 324 | 'inputs': [ 'src/res/node_etw_provider.man' ], |
Scott Blomquist | 953b049 | 2012-10-25 23:51:46 | [diff] [blame] | 325 | 'outputs': [ |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 326 | 'tools/msvs/genfiles/node_etw_provider.rc', |
| 327 | 'tools/msvs/genfiles/node_etw_provider.h', |
| 328 | 'tools/msvs/genfiles/node_etw_providerTEMP.BIN', |
Scott Blomquist | 953b049 | 2012-10-25 23:51:46 | [diff] [blame] | 329 | ], |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 330 | 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ] |
Igor Zinkovsky | 35a1421 | 2012-06-11 23:23:17 | [diff] [blame] | 331 | } |
| 332 | ] |
| 333 | } ] |
| 334 | ] |
| 335 | }, |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 336 | # generate perf counter header and resource files |
| 337 | { |
| 338 | 'target_name': 'node_perfctr', |
| 339 | 'type': 'none', |
| 340 | 'conditions': [ |
Scott Blomquist | 841b7f5 | 2012-12-21 08:06:21 | [diff] [blame] | 341 | [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', { |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 342 | 'actions': [ |
| 343 | { |
| 344 | 'action_name': 'node_perfctr_man', |
| 345 | 'inputs': [ 'src/res/node_perfctr_provider.man' ], |
| 346 | 'outputs': [ |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 347 | 'tools/msvs/genfiles/node_perfctr_provider.h', |
| 348 | 'tools/msvs/genfiles/node_perfctr_provider.rc', |
| 349 | 'tools/msvs/genfiles/MSG00001.BIN', |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 350 | ], |
| 351 | 'action': [ 'ctrpp <@(_inputs) ' |
Scott Blomquist | a616774 | 2013-01-03 22:36:04 | [diff] [blame] | 352 | '-o tools/msvs/genfiles/node_perfctr_provider.h ' |
| 353 | '-rc tools/msvs/genfiles/node_perfctr_provider.rc' |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 354 | ] |
| 355 | }, |
| 356 | ], |
| 357 | } ] |
| 358 | ] |
| 359 | }, |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 360 | { |
| 361 | 'target_name': 'node_js2c', |
| 362 | 'type': 'none', |
| 363 | 'toolsets': ['host'], |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 364 | 'actions': [ |
| 365 | { |
| 366 | 'action_name': 'node_js2c', |
| 367 | 'inputs': [ |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 368 | '<@(library_files)', |
Nathan Rajlich | 95fd517 | 2012-03-14 15:34:44 | [diff] [blame] | 369 | './config.gypi', |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 370 | ], |
| 371 | 'outputs': [ |
| 372 | '<(SHARED_INTERMEDIATE_DIR)/node_natives.h', |
| 373 | ], |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 374 | 'conditions': [ |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 375 | [ 'node_use_dtrace=="false"' |
| 376 | ' and node_use_etw=="false"' |
| 377 | ' and node_use_systemtap=="false"', |
Jan Wynholds | 06810b2 | 2012-10-09 22:09:07 | [diff] [blame] | 378 | { |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 379 | 'inputs': ['src/macros.py'] |
| 380 | } |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 381 | ], |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 382 | [ 'node_use_perfctr=="false"', { |
| 383 | 'inputs': [ 'src/perfctr_macros.py' ] |
Ryan Dahl | a979ab9 | 2011-08-04 23:40:07 | [diff] [blame] | 384 | }] |
Peter Bright | 71333b3 | 2011-08-06 19:20:15 | [diff] [blame] | 385 | ], |
Scott Blomquist | f657ce6 | 2012-11-20 23:27:22 | [diff] [blame] | 386 | 'action': [ |
| 387 | '<(python)', |
| 388 | 'tools/js2c.py', |
| 389 | '<@(_outputs)', |
| 390 | '<@(_inputs)', |
| 391 | ], |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 392 | }, |
| 393 | ], |
| 394 | }, # end node_js2c |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 395 | { |
| 396 | 'target_name': 'node_dtrace_header', |
| 397 | 'type': 'none', |
| 398 | 'conditions': [ |
Timothy J Fontaine | 23509eb | 2013-03-31 02:51:17 | [diff] [blame] | 399 | [ 'node_use_dtrace=="true" or node_use_systemtap=="true"', { |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 400 | 'actions': [ |
| 401 | { |
| 402 | 'action_name': 'node_dtrace_header', |
| 403 | 'inputs': [ 'src/node_provider.d' ], |
| 404 | 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ], |
| 405 | 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)', |
| 406 | '-o', '<@(_outputs)' ] |
| 407 | } |
| 408 | ] |
| 409 | } ] |
| 410 | ] |
| 411 | }, |
| 412 | { |
| 413 | 'target_name': 'node_dtrace_provider', |
| 414 | 'type': 'none', |
| 415 | 'conditions': [ |
Dave Pacheco | fe7440c | 2013-03-28 18:36:00 | [diff] [blame] | 416 | [ 'node_use_dtrace=="true" and OS!="mac"', { |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 417 | 'actions': [ |
| 418 | { |
| 419 | 'action_name': 'node_dtrace_provider_o', |
| 420 | 'inputs': [ |
Timothy J Fontaine | f0d80d7 | 2013-04-16 23:18:07 | [diff] [blame] | 421 | '<(PRODUCT_DIR)/obj.target/libuv/deps/uv/src/unix/core.o', |
| 422 | '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o', |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 423 | ], |
| 424 | 'outputs': [ |
| 425 | '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o' |
| 426 | ], |
Timothy J Fontaine | f0d80d7 | 2013-04-16 23:18:07 | [diff] [blame] | 427 | 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d', |
| 428 | '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)', |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 429 | '-o', '<@(_outputs)' ] |
| 430 | } |
| 431 | ] |
| 432 | } ] |
| 433 | ] |
| 434 | }, |
| 435 | { |
| 436 | 'target_name': 'node_dtrace_ustack', |
| 437 | 'type': 'none', |
| 438 | 'conditions': [ |
Dave Pacheco | fe7440c | 2013-03-28 18:36:00 | [diff] [blame] | 439 | [ 'node_use_dtrace=="true" and OS!="mac"', { |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 440 | 'actions': [ |
| 441 | { |
| 442 | 'action_name': 'node_dtrace_ustack_constants', |
| 443 | 'inputs': [ |
Timothy J Fontaine | 39dfe94 | 2013-04-17 22:37:22 | [diff] [blame] | 444 | '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a' |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 445 | ], |
| 446 | 'outputs': [ |
| 447 | '<(SHARED_INTERMEDIATE_DIR)/v8constants.h' |
| 448 | ], |
| 449 | 'action': [ |
| 450 | 'tools/genv8constants.py', |
| 451 | '<@(_outputs)', |
| 452 | '<@(_inputs)' |
| 453 | ] |
| 454 | }, |
| 455 | { |
| 456 | 'action_name': 'node_dtrace_ustack', |
| 457 | 'inputs': [ |
| 458 | 'src/v8ustack.d', |
| 459 | '<(SHARED_INTERMEDIATE_DIR)/v8constants.h' |
| 460 | ], |
| 461 | 'outputs': [ |
| 462 | '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o' |
| 463 | ], |
Fedor Indutny | 3d913fe | 2013-02-26 07:57:12 | [diff] [blame] | 464 | 'conditions': [ |
| 465 | [ 'target_arch=="ia32"', { |
| 466 | 'action': [ |
| 467 | 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc', |
| 468 | '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)', |
| 469 | ] |
| 470 | } ], |
| 471 | [ 'target_arch=="x64"', { |
| 472 | 'action': [ |
| 473 | 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc', |
| 474 | '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)', |
| 475 | ] |
| 476 | } ], |
Dave Pacheco | cc15299 | 2012-03-28 17:26:10 | [diff] [blame] | 477 | ] |
| 478 | } |
| 479 | ] |
| 480 | } ], |
| 481 | ] |
| 482 | } |
Ryan Dahl | 4f3c8b3 | 2011-08-04 00:01:30 | [diff] [blame] | 483 | ] # end targets |
| 484 | } |