blob: da7172b5eb6cef64366451c6778bd1a85fab92e2 [file] [log] [blame]
[email protected]96449d2c2009-11-25 00:01:321# Copyright (c) 2009 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'variables': {
7 'chromium_code': 1,
[email protected]69d80ae2009-12-23 08:57:428 # This is defined here because we need to compile this set of files
9 # twice with different defines. Once so it calls real GL, again so it
10 # calls mock GL for the unit tests.
[email protected]644362cf2010-03-29 23:18:1211 'gpu_service_source_files': [
[email protected]a93bb842010-02-16 23:03:4712 'command_buffer/service/buffer_manager.h',
13 'command_buffer/service/buffer_manager.cc',
[email protected]a25fa872010-03-25 02:57:5814 'command_buffer/service/framebuffer_manager.h',
15 'command_buffer/service/framebuffer_manager.cc',
[email protected]3916c97e2010-02-25 03:20:5016 'command_buffer/service/context_group.h',
17 'command_buffer/service/context_group.cc',
[email protected]69d80ae2009-12-23 08:57:4218 'command_buffer/service/gles2_cmd_decoder.h',
19 'command_buffer/service/gles2_cmd_decoder_autogen.h',
20 'command_buffer/service/gles2_cmd_decoder.cc',
21 'command_buffer/service/gles2_cmd_validation.h',
22 'command_buffer/service/gles2_cmd_validation.cc',
23 'command_buffer/service/gles2_cmd_validation_autogen.h',
24 'command_buffer/service/gles2_cmd_validation_implementation_autogen.h',
[email protected]d37231fa2010-04-09 21:16:0225 'command_buffer/service/gl_context.cc',
26 'command_buffer/service/gl_context.h',
[email protected]69d80ae2009-12-23 08:57:4227 'command_buffer/service/gl_utils.h',
[email protected]d37231fa2010-04-09 21:16:0228 'command_buffer/service/gpu_processor.h',
29 'command_buffer/service/gpu_processor.cc',
30 'command_buffer/service/gpu_processor_mock.h',
[email protected]a93bb842010-02-16 23:03:4731 'command_buffer/service/id_manager.h',
32 'command_buffer/service/id_manager.cc',
33 'command_buffer/service/program_manager.h',
34 'command_buffer/service/program_manager.cc',
[email protected]a25fa872010-03-25 02:57:5835 'command_buffer/service/renderbuffer_manager.h',
36 'command_buffer/service/renderbuffer_manager.cc',
[email protected]a93bb842010-02-16 23:03:4737 'command_buffer/service/shader_manager.h',
38 'command_buffer/service/shader_manager.cc',
39 'command_buffer/service/texture_manager.h',
40 'command_buffer/service/texture_manager.cc',
[email protected]69d80ae2009-12-23 08:57:4241 ],
[email protected]d37231fa2010-04-09 21:16:0242 'conditions': [
43 ['OS == "linux"',
44 {
45 'gpu_service_source_files': [
46 'command_buffer/service/gl_context_linux.cc',
47 'command_buffer/service/gpu_processor_linux.cc',
48 ],
49 },
50 ],
51 ['OS == "win"',
52 {
53 'gpu_service_source_files': [
54 'command_buffer/service/gl_context_win.cc',
55 'command_buffer/service/gpu_processor_win.cc',
56 ],
57 },
58 ],
59 ['OS == "mac"',
60 {
61 'gpu_service_source_files': [
62 'command_buffer/service/gl_context_mac.cc',
63 'command_buffer/service/gpu_processor_mac.cc',
64 ],
65 },
66 ],
67 ],
[email protected]96449d2c2009-11-25 00:01:3268 },
[email protected]96449d2c2009-11-25 00:01:3269 'targets': [
70 {
71 'target_name': 'gl_libs',
72 'type': 'static_library',
73 'include_dirs': [
74 '../third_party/glew/include',
75 ],
76 'defines': [
77 'GLEW_STATIC',
78 ],
79 'all_dependent_settings': {
80 'include_dirs': [
81 '../third_party/glew/include',
82 ],
83 'defines': [
84 'GLEW_STATIC',
85 ],
86 },
87 'sources': [
88 '../third_party/glew/src/glew.c',
89 ],
90 'conditions': [
91 [ 'OS=="linux"',
92 {
93 'all_dependent_settings': {
94 'defines': [
95 'GL_GLEXT_PROTOTYPES',
96 ],
97 'ldflags': [
98 '-L<(PRODUCT_DIR)',
99 ],
[email protected]644362cf2010-03-29 23:18:12100 'link_settings': {
101 'libraries': [
102 '-lX11',
103 # For dlsym() in '../third_party/glew/src/glew.c'
104 '-ldl',
105 ],
106 },
[email protected]96449d2c2009-11-25 00:01:32107 },
108 },
109 ],
110 [ 'OS=="mac"',
111 {
[email protected]c692dd32010-04-02 22:02:37112 'link_settings': {
113 'libraries': [
114 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
115 ],
[email protected]96449d2c2009-11-25 00:01:32116 },
117 },
118 ],
119 [ 'OS=="win"',
120 {
121 'all_dependent_settings': {
[email protected]644362cf2010-03-29 23:18:12122 'link_settings': {
123 'libraries': [
124 '-lOpenGL32.lib',
125 ],
126 },
[email protected]96449d2c2009-11-25 00:01:32127 },
128 },
129 ],
130 ],
131 },
132 {
133 'target_name': 'command_buffer_common',
134 'type': 'static_library',
135 'include_dirs': [
[email protected]9f427322010-03-08 22:58:58136 '.',
[email protected]96449d2c2009-11-25 00:01:32137 '..',
138 ],
139 'all_dependent_settings': {
140 'include_dirs': [
[email protected]9f427322010-03-08 22:58:58141 '.',
[email protected]96449d2c2009-11-25 00:01:32142 '..',
143 ],
144 },
[email protected]a7a27ace2009-12-12 00:11:25145 'dependencies': [
146 '../base/base.gyp:base',
147 ],
[email protected]96449d2c2009-11-25 00:01:32148 'sources': [
149 'command_buffer/common/bitfield_helpers.h',
[email protected]7477ea6f2009-12-22 23:28:15150 'command_buffer/common/buffer.h',
[email protected]96449d2c2009-11-25 00:01:32151 'command_buffer/common/cmd_buffer_common.h',
152 'command_buffer/common/cmd_buffer_common.cc',
153 'command_buffer/common/command_buffer.h',
154 'command_buffer/common/command_buffer_mock.h',
[email protected]d041d8c02009-12-03 00:35:52155 'command_buffer/common/constants.h',
[email protected]96449d2c2009-11-25 00:01:32156 'command_buffer/common/gles2_cmd_ids_autogen.h',
157 'command_buffer/common/gles2_cmd_ids.h',
158 'command_buffer/common/gles2_cmd_format_autogen.h',
159 'command_buffer/common/gles2_cmd_format.cc',
160 'command_buffer/common/gles2_cmd_format.h',
161 'command_buffer/common/gles2_cmd_utils.cc',
162 'command_buffer/common/gles2_cmd_utils.h',
163 'command_buffer/common/logging.h',
164 'command_buffer/common/mocks.h',
[email protected]1b1bba772010-01-27 20:30:45165 'command_buffer/common/thread_local.h',
[email protected]96449d2c2009-11-25 00:01:32166 'command_buffer/common/types.h',
167 ],
168 },
169 {
170 # Library helps make GLES2 command buffers.
171 'target_name': 'gles2_cmd_helper',
172 'type': 'static_library',
173 'dependencies': [
[email protected]246a70452010-03-05 21:53:50174 'command_buffer_client',
[email protected]96449d2c2009-11-25 00:01:32175 ],
176 'sources': [
177 'command_buffer/client/gles2_cmd_helper.cc',
178 'command_buffer/client/gles2_cmd_helper.h',
179 'command_buffer/client/gles2_cmd_helper_autogen.h',
180 ],
181 },
182 {
183 # Library emulates GLES2 using command_buffers.
184 'target_name': 'gles2_implementation',
185 'type': 'static_library',
186 'dependencies': [
187 'gles2_cmd_helper',
188 ],
[email protected]43f28f832010-02-03 02:28:48189 'all_dependent_settings': {
190 'include_dirs': [
191 # For GLES2/gl2.h
[email protected]9f427322010-03-08 22:58:58192 '.',
[email protected]43f28f832010-02-03 02:28:48193 ],
194 },
[email protected]96449d2c2009-11-25 00:01:32195 'sources': [
196 'command_buffer/client/gles2_implementation_autogen.h',
197 'command_buffer/client/gles2_implementation.cc',
[email protected]96449d2c2009-11-25 00:01:32198 'command_buffer/client/gles2_implementation.h',
199 ],
200 },
201 {
202 # Stub to expose gles2_implementation as a namespace rather than a class
203 # so GLES2 C++ programs can work with no changes.
204 'target_name': 'gles2_lib',
205 'type': 'static_library',
206 'dependencies': [
207 'gles2_implementation',
208 ],
209 'sources': [
210 'command_buffer/client/gles2_lib.cc',
211 'command_buffer/client/gles2_lib.h',
212 ],
213 },
214 {
215 # Stub to expose gles2_implemenation in C instead of C++.
216 # so GLES2 C programs can work with no changes.
217 'target_name': 'gles2_c_lib',
218 'type': 'static_library',
219 'dependencies': [
220 'gles2_lib',
221 ],
222 'sources': [
223 'command_buffer/client/gles2_c_lib.h',
224 'command_buffer/client/gles2_c_lib.cc',
225 'command_buffer/client/gles2_c_lib_autogen.h',
226 ],
227 },
228 {
[email protected]96449d2c2009-11-25 00:01:32229 'target_name': 'command_buffer_client',
230 'type': 'static_library',
231 'dependencies': [
232 'command_buffer_common',
233 ],
234 'sources': [
235 'command_buffer/client/cmd_buffer_helper.cc',
236 'command_buffer/client/cmd_buffer_helper.h',
237 'command_buffer/client/fenced_allocator.cc',
238 'command_buffer/client/fenced_allocator.h',
239 'command_buffer/client/id_allocator.cc',
240 'command_buffer/client/id_allocator.h',
241 ],
242 },
243 {
[email protected]69d80ae2009-12-23 08:57:42244 'target_name': 'command_buffer_service_impl',
[email protected]96449d2c2009-11-25 00:01:32245 'type': 'static_library',
246 'include_dirs': [
247 '..',
248 ],
249 'all_dependent_settings': {
250 'include_dirs': [
251 '..',
252 ],
253 },
254 'dependencies': [
255 'command_buffer_common',
[email protected]3916c97e2010-02-25 03:20:50256 'gl_libs',
[email protected]6217d392010-03-25 22:08:35257 '../gfx/gfx.gyp:gfx',
[email protected]96449d2c2009-11-25 00:01:32258 ],
259 'sources': [
260 'command_buffer/service/common_decoder.cc',
261 'command_buffer/service/common_decoder.h',
262 'command_buffer/service/cmd_buffer_engine.h',
263 'command_buffer/service/command_buffer_service.cc',
264 'command_buffer/service/command_buffer_service.h',
265 'command_buffer/service/cmd_parser.cc',
266 'command_buffer/service/cmd_parser.h',
[email protected]96449d2c2009-11-25 00:01:32267 'command_buffer/service/mocks.h',
[email protected]96449d2c2009-11-25 00:01:32268 ],
269 },
270 {
[email protected]69d80ae2009-12-23 08:57:42271 'target_name': 'command_buffer_service',
272 'type': 'static_library',
273 'include_dirs': [
274 '..',
275 ],
276 'all_dependent_settings': {
277 'include_dirs': [
278 '..',
279 ],
280 },
281 'dependencies': [
282 'command_buffer_service_impl',
283 'gl_libs',
284 ],
285 'sources': [
[email protected]644362cf2010-03-29 23:18:12286 '<@(gpu_service_source_files)',
[email protected]69d80ae2009-12-23 08:57:42287 ],
[email protected]d37231fa2010-04-09 21:16:02288 'conditions': [
289 ['OS == "linux"',
290 {
291 'dependencies': [
292 '../build/linux/system.gyp:gtk',
293 ]
294 },
295 ],
296 ],
[email protected]69d80ae2009-12-23 08:57:42297 },
298 {
[email protected]96449d2c2009-11-25 00:01:32299 'target_name': 'gpu_plugin',
[email protected]7477ea6f2009-12-22 23:28:15300 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32301 'dependencies': [
302 '../base/base.gyp:base',
303 'command_buffer_service',
[email protected]96449d2c2009-11-25 00:01:32304 ],
305 'include_dirs': [
306 '..',
307 ],
308 'all_dependent_settings': {
309 'include_dirs': [
310 '..',
311 ],
312 },
313 'sources': [
314 'gpu_plugin/gpu_plugin.cc',
315 'gpu_plugin/gpu_plugin.h',
[email protected]96449d2c2009-11-25 00:01:32316 ],
317 },
318 {
[email protected]644362cf2010-03-29 23:18:12319 'target_name': 'gpu_unittests',
[email protected]96449d2c2009-11-25 00:01:32320 'type': 'executable',
321 'dependencies': [
322 '../testing/gmock.gyp:gmock',
323 '../testing/gmock.gyp:gmockmain',
324 '../testing/gtest.gyp:gtest',
325 'command_buffer_client',
[email protected]96449d2c2009-11-25 00:01:32326 'command_buffer_common',
[email protected]69d80ae2009-12-23 08:57:42327 'command_buffer_service_impl',
[email protected]644362cf2010-03-29 23:18:12328 'gles2_lib',
329 'gles2_implementation',
330 'gles2_cmd_helper',
331 ],
332 'sources': [
333 '<@(gpu_service_source_files)',
334 'command_buffer/client/cmd_buffer_helper_test.cc',
335 'command_buffer/client/fenced_allocator_test.cc',
336 'command_buffer/client/id_allocator_test.cc',
337 'command_buffer/common/bitfield_helpers_test.cc',
338 'command_buffer/common/gles2_cmd_format_test.cc',
339 'command_buffer/common/gles2_cmd_format_test_autogen.h',
340 'command_buffer/common/gles2_cmd_id_test.cc',
341 'command_buffer/common/gles2_cmd_id_test_autogen.h',
342 'command_buffer/common/gles2_cmd_format_test.cc',
343 'command_buffer/common/gles2_cmd_format_test_autogen.h',
344 'command_buffer/common/gles2_cmd_id_test.cc',
345 'command_buffer/common/gles2_cmd_id_test_autogen.h',
346 'command_buffer/common/gles2_cmd_format_test.cc',
347 'command_buffer/common/gles2_cmd_format_test_autogen.h',
348 'command_buffer/common/gles2_cmd_id_test.cc',
349 'command_buffer/common/gles2_cmd_id_test_autogen.h',
350 'command_buffer/service/buffer_manager_unittest.cc',
351 'command_buffer/service/context_group_unittest.cc',
352 'command_buffer/service/cmd_parser_test.cc',
353 'command_buffer/service/cmd_parser_test.cc',
354 'command_buffer/service/common_decoder_unittest.cc',
355 'command_buffer/service/framebuffer_manager_unittest.cc',
356 'command_buffer/service/gpu_processor_unittest.cc',
357 'command_buffer/service/gl_interface.h',
358 'command_buffer/service/gl_interface.cc',
359 'command_buffer/service/gl_mock.h',
360 'command_buffer/service/gl_mock.cc',
361 'command_buffer/service/gles2_cmd_decoder_unittest_base.h',
362 'command_buffer/service/gles2_cmd_decoder_unittest_base.cc',
363 'command_buffer/service/gles2_cmd_decoder_unittest.cc',
364 'command_buffer/service/gles2_cmd_decoder_unittest_1.cc',
365 'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h',
366 'command_buffer/service/gles2_cmd_decoder_unittest_2.cc',
367 'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h',
368 'command_buffer/service/id_manager_unittest.cc',
369 'command_buffer/service/program_manager_unittest.cc',
370 'command_buffer/service/renderbuffer_manager_unittest.cc',
371 'command_buffer/service/shader_manager_unittest.cc',
372 'command_buffer/service/texture_manager_unittest.cc',
[email protected]96449d2c2009-11-25 00:01:32373 ],
374 },
375 {
[email protected]7477ea6f2009-12-22 23:28:15376 'target_name': 'gles2_demo_lib',
377 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32378 'dependencies': [
379 'command_buffer_client',
[email protected]96449d2c2009-11-25 00:01:32380 'gles2_lib',
381 'gles2_c_lib',
[email protected]96449d2c2009-11-25 00:01:32382 ],
383 'sources': [
[email protected]96449d2c2009-11-25 00:01:32384 'command_buffer/client/gles2_demo_c.h',
385 'command_buffer/client/gles2_demo_c.c',
386 'command_buffer/client/gles2_demo_cc.h',
387 'command_buffer/client/gles2_demo_cc.cc',
388 ],
389 },
[email protected]bc36e9912010-01-15 00:53:02390 {
391 'target_name': 'pgl',
392 'type': 'static_library',
393 'dependencies': [
394 'command_buffer_client',
395 'gles2_c_lib',
396 '../third_party/npapi/npapi.gyp:npapi',
397 ],
398 'include_dirs': [
399 '..',
400 '../third_party/npapi/bindings',
401 ],
402 'all_dependent_settings': {
403 'include_dirs': [
404 '../third_party/npapi/bindings',
405 ],
406 },
407 'sources': [
408 'pgl/command_buffer_pepper.cc',
409 'pgl/command_buffer_pepper.h',
410 'pgl/pgl.cc',
411 'pgl/pgl.h',
412 ],
413 },
[email protected]7477ea6f2009-12-22 23:28:15414 ],
415 'conditions': [
416 ['OS == "win"',
417 {
418 'targets': [
419 {
420 'target_name': 'gles2_demo',
421 'type': 'executable',
422 'dependencies': [
423 'command_buffer_service',
424 'gles2_demo_lib',
425 ],
426 'sources': [
427 'command_buffer/client/gles2_demo.cc',
428 ],
[email protected]6907f192010-01-19 22:15:21429 'msvs_settings': {
430 'VCLinkerTool': {
431 # 0 == not set
432 # 1 == /SUBSYSTEM:CONSOLE
433 # 2 == /SUBSYSTEM:WINDOWS
434 'SubSystem': '2',
435 },
436 },
[email protected]7477ea6f2009-12-22 23:28:15437 },
438 ],
439 },
440 ],
441 ],
[email protected]96449d2c2009-11-25 00:01:32442}
443
444# Local Variables:
445# tab-width:2
446# indent-tabs-mode:nil
447# End:
448# vim: set expandtab tabstop=2 shiftwidth=2: