blob: dd98c60d6fc80baa8abb86241d2ed0434918a493 [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.
11 'gpu_source_files': [
12 'command_buffer/service/gles2_cmd_decoder.h',
13 'command_buffer/service/gles2_cmd_decoder_autogen.h',
14 'command_buffer/service/gles2_cmd_decoder.cc',
15 'command_buffer/service/gles2_cmd_validation.h',
16 'command_buffer/service/gles2_cmd_validation.cc',
17 'command_buffer/service/gles2_cmd_validation_autogen.h',
18 'command_buffer/service/gles2_cmd_validation_implementation_autogen.h',
19 'command_buffer/service/gl_utils.h',
20 ],
[email protected]96449d2c2009-11-25 00:01:3221 },
22 'includes': [
23 '../build/common.gypi',
24 ],
25 'targets': [
26 {
27 'target_name': 'gl_libs',
28 'type': 'static_library',
29 'include_dirs': [
30 '../third_party/glew/include',
31 ],
32 'defines': [
33 'GLEW_STATIC',
34 ],
35 'all_dependent_settings': {
36 'include_dirs': [
37 '../third_party/glew/include',
38 ],
39 'defines': [
40 'GLEW_STATIC',
41 ],
42 },
43 'sources': [
44 '../third_party/glew/src/glew.c',
45 ],
46 'conditions': [
47 [ 'OS=="linux"',
48 {
49 'all_dependent_settings': {
50 'defines': [
51 'GL_GLEXT_PROTOTYPES',
52 ],
53 'ldflags': [
54 '-L<(PRODUCT_DIR)',
55 ],
56 'libraries': [
[email protected]96449d2c2009-11-25 00:01:3257 '-lX11',
58 ],
59 },
60 },
61 ],
62 [ 'OS=="mac"',
63 {
64 'direct_dependent_settings': {
65 'libraries': [
66 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
67 ],
68 },
69 },
70 ],
71 [ 'OS=="win"',
72 {
73 'all_dependent_settings': {
74 'libraries': [
75 '-lOpenGL32.lib',
76 ],
77 },
78 },
79 ],
80 ],
81 },
82 {
83 'target_name': 'command_buffer_common',
84 'type': 'static_library',
85 'include_dirs': [
86 'command_buffer/common',
87 '..',
88 ],
89 'all_dependent_settings': {
90 'include_dirs': [
91 'command_buffer/common',
92 '..',
93 ],
94 },
[email protected]a7a27ace2009-12-12 00:11:2595 'dependencies': [
96 '../base/base.gyp:base',
97 ],
[email protected]96449d2c2009-11-25 00:01:3298 'sources': [
99 'command_buffer/common/bitfield_helpers.h',
[email protected]7477ea6f2009-12-22 23:28:15100 'command_buffer/common/buffer.h',
[email protected]96449d2c2009-11-25 00:01:32101 'command_buffer/common/cmd_buffer_common.h',
102 'command_buffer/common/cmd_buffer_common.cc',
103 'command_buffer/common/command_buffer.h',
104 'command_buffer/common/command_buffer_mock.h',
[email protected]d041d8c02009-12-03 00:35:52105 'command_buffer/common/constants.h',
[email protected]96449d2c2009-11-25 00:01:32106 'command_buffer/common/gles2_cmd_ids_autogen.h',
107 'command_buffer/common/gles2_cmd_ids.h',
108 'command_buffer/common/gles2_cmd_format_autogen.h',
109 'command_buffer/common/gles2_cmd_format.cc',
110 'command_buffer/common/gles2_cmd_format.h',
111 'command_buffer/common/gles2_cmd_utils.cc',
112 'command_buffer/common/gles2_cmd_utils.h',
113 'command_buffer/common/logging.h',
114 'command_buffer/common/mocks.h',
115 'command_buffer/common/resource.cc',
116 'command_buffer/common/resource.h',
[email protected]1b1bba772010-01-27 20:30:45117 'command_buffer/common/thread_local.h',
[email protected]96449d2c2009-11-25 00:01:32118 'command_buffer/common/types.h',
119 ],
120 },
121 {
122 # Library helps make GLES2 command buffers.
123 'target_name': 'gles2_cmd_helper',
124 'type': 'static_library',
125 'dependencies': [
126 'command_buffer_common',
[email protected]96449d2c2009-11-25 00:01:32127 ],
128 'sources': [
129 'command_buffer/client/gles2_cmd_helper.cc',
130 'command_buffer/client/gles2_cmd_helper.h',
131 'command_buffer/client/gles2_cmd_helper_autogen.h',
132 ],
133 },
134 {
135 # Library emulates GLES2 using command_buffers.
136 'target_name': 'gles2_implementation',
137 'type': 'static_library',
138 'dependencies': [
139 'gles2_cmd_helper',
140 ],
141 'sources': [
142 'command_buffer/client/gles2_implementation_autogen.h',
143 'command_buffer/client/gles2_implementation.cc',
144 'command_buffer/client/gles2_implementation_gen.h',
145 'command_buffer/client/gles2_implementation.h',
146 ],
147 },
148 {
149 # Stub to expose gles2_implementation as a namespace rather than a class
150 # so GLES2 C++ programs can work with no changes.
151 'target_name': 'gles2_lib',
152 'type': 'static_library',
153 'dependencies': [
154 'gles2_implementation',
155 ],
156 'sources': [
157 'command_buffer/client/gles2_lib.cc',
158 'command_buffer/client/gles2_lib.h',
159 ],
160 },
161 {
162 # Stub to expose gles2_implemenation in C instead of C++.
163 # so GLES2 C programs can work with no changes.
164 'target_name': 'gles2_c_lib',
165 'type': 'static_library',
166 'dependencies': [
167 'gles2_lib',
168 ],
169 'sources': [
170 'command_buffer/client/gles2_c_lib.h',
171 'command_buffer/client/gles2_c_lib.cc',
172 'command_buffer/client/gles2_c_lib_autogen.h',
173 ],
174 },
175 {
176 'target_name': 'command_buffer_common_unittests',
177 'type': 'none',
178 'include_dirs': [
179 'command_buffer/common',
180 ],
181 'dependencies': [
182 'gles2_lib',
183 'gles2_implementation',
184 'gles2_cmd_helper',
185 ],
186 'direct_dependent_settings': {
187 'sources': [
188 'command_buffer/common/bitfield_helpers_test.cc',
[email protected]96449d2c2009-11-25 00:01:32189 ],
190 },
191 },
192 {
193 'target_name': 'command_buffer_client',
194 'type': 'static_library',
195 'dependencies': [
196 'command_buffer_common',
197 ],
198 'sources': [
199 'command_buffer/client/cmd_buffer_helper.cc',
200 'command_buffer/client/cmd_buffer_helper.h',
201 'command_buffer/client/fenced_allocator.cc',
202 'command_buffer/client/fenced_allocator.h',
203 'command_buffer/client/id_allocator.cc',
204 'command_buffer/client/id_allocator.h',
205 ],
206 },
207 {
208 'target_name': 'command_buffer_client_unittests',
209 'type': 'none',
210 'direct_dependent_settings': {
211 'sources': [
212 'command_buffer/client/cmd_buffer_helper_test.cc',
213 'command_buffer/client/fenced_allocator_test.cc',
214 'command_buffer/client/id_allocator_test.cc',
215 ],
216 },
217 },
218 {
[email protected]69d80ae2009-12-23 08:57:42219 'target_name': 'command_buffer_service_impl',
[email protected]96449d2c2009-11-25 00:01:32220 'type': 'static_library',
221 'include_dirs': [
222 '..',
223 ],
224 'all_dependent_settings': {
225 'include_dirs': [
226 '..',
227 ],
228 },
229 'dependencies': [
230 'command_buffer_common',
[email protected]96449d2c2009-11-25 00:01:32231 ],
232 'sources': [
233 'command_buffer/service/common_decoder.cc',
234 'command_buffer/service/common_decoder.h',
235 'command_buffer/service/cmd_buffer_engine.h',
236 'command_buffer/service/command_buffer_service.cc',
237 'command_buffer/service/command_buffer_service.h',
238 'command_buffer/service/cmd_parser.cc',
239 'command_buffer/service/cmd_parser.h',
[email protected]96449d2c2009-11-25 00:01:32240 'command_buffer/service/gpu_processor.h',
241 'command_buffer/service/gpu_processor.cc',
242 'command_buffer/service/gpu_processor_mock.h',
243 'command_buffer/service/mocks.h',
244 'command_buffer/service/precompile.cc',
245 'command_buffer/service/precompile.h',
246 'command_buffer/service/resource.cc',
247 'command_buffer/service/resource.h',
248 ],
249 'conditions': [
250 ['OS == "linux"',
251 {
252 'sources': [
[email protected]be4f1882010-01-06 04:38:55253 'command_buffer/service/gpu_processor_linux.cc',
[email protected]c3d7d602009-12-10 22:42:00254 'command_buffer/service/x_utils.cc',
255 'command_buffer/service/x_utils.h',
[email protected]96449d2c2009-11-25 00:01:32256 ],
[email protected]be4f1882010-01-06 04:38:55257 'dependencies': [
[email protected]7684ec12010-01-09 02:45:56258 'gl_libs',
[email protected]be4f1882010-01-06 04:38:55259 '../build/linux/system.gyp:gtk',
260 ]
[email protected]96449d2c2009-11-25 00:01:32261 },
262 ],
263 ['OS == "win"',
264 {
265 'sources': [
266 'command_buffer/service/gpu_processor_win.cc',
267 ],
268 },
269 ],
270 ],
271 },
272 {
[email protected]69d80ae2009-12-23 08:57:42273 'target_name': 'command_buffer_service',
274 'type': 'static_library',
275 'include_dirs': [
276 '..',
277 ],
278 'all_dependent_settings': {
279 'include_dirs': [
280 '..',
281 ],
282 },
283 'dependencies': [
284 'command_buffer_service_impl',
285 'gl_libs',
286 ],
287 'sources': [
288 '<@(gpu_source_files)',
289 ],
290 },
291 {
[email protected]96449d2c2009-11-25 00:01:32292 'target_name': 'command_buffer_service_unittests',
293 'type': 'none',
294 'direct_dependent_settings': {
295 'sources': [
[email protected]69d80ae2009-12-23 08:57:42296 '<@(gpu_source_files)',
[email protected]96449d2c2009-11-25 00:01:32297 'command_buffer/service/cmd_parser_test.cc',
298 'command_buffer/service/command_buffer_service_unittest.cc',
[email protected]c0ce9d812009-12-10 09:30:28299 'command_buffer/service/common_decoder_unittest.cc',
[email protected]96449d2c2009-11-25 00:01:32300 'command_buffer/service/gpu_processor_unittest.cc',
301 'command_buffer/service/resource_test.cc',
[email protected]69d80ae2009-12-23 08:57:42302 'command_buffer/service/gl_interface.h',
303 'command_buffer/service/gl_interface.cc',
304 'command_buffer/service/gl_mock.h',
305 'command_buffer/service/gl_mock.cc',
306 'command_buffer/service/gles2_cmd_decoder_unittest.cc',
[email protected]8a837bb2010-01-05 00:21:24307 'command_buffer/service/gles2_cmd_decoder_unittest_autogen.h',
[email protected]69d80ae2009-12-23 08:57:42308 'command_buffer/common/gles2_cmd_format_test.cc',
309 'command_buffer/common/gles2_cmd_format_test_autogen.h',
310 'command_buffer/common/gles2_cmd_id_test.cc',
311 'command_buffer/common/gles2_cmd_id_test_autogen.h',
[email protected]96449d2c2009-11-25 00:01:32312 ],
313 },
314 },
315 {
[email protected]96449d2c2009-11-25 00:01:32316 'target_name': 'gpu_plugin',
[email protected]7477ea6f2009-12-22 23:28:15317 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32318 'dependencies': [
319 '../base/base.gyp:base',
320 'command_buffer_service',
[email protected]96449d2c2009-11-25 00:01:32321 ],
322 'include_dirs': [
323 '..',
324 ],
325 'all_dependent_settings': {
326 'include_dirs': [
327 '..',
328 ],
329 },
330 'sources': [
331 'gpu_plugin/gpu_plugin.cc',
332 'gpu_plugin/gpu_plugin.h',
[email protected]96449d2c2009-11-25 00:01:32333 ],
334 },
335 {
[email protected]96449d2c2009-11-25 00:01:32336 'target_name': 'gpu_all_unittests',
337 'type': 'executable',
338 'dependencies': [
339 '../testing/gmock.gyp:gmock',
340 '../testing/gmock.gyp:gmockmain',
341 '../testing/gtest.gyp:gtest',
342 'command_buffer_client',
343 'command_buffer_client_unittests',
344 'command_buffer_common',
345 'command_buffer_common_unittests',
[email protected]69d80ae2009-12-23 08:57:42346 'command_buffer_service_impl',
[email protected]96449d2c2009-11-25 00:01:32347 'command_buffer_service_unittests',
[email protected]96449d2c2009-11-25 00:01:32348 ],
349 },
350 {
[email protected]7477ea6f2009-12-22 23:28:15351 'target_name': 'gles2_demo_lib',
352 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32353 'dependencies': [
354 'command_buffer_client',
[email protected]96449d2c2009-11-25 00:01:32355 'gles2_lib',
356 'gles2_c_lib',
[email protected]96449d2c2009-11-25 00:01:32357 ],
358 'sources': [
[email protected]96449d2c2009-11-25 00:01:32359 'command_buffer/client/gles2_demo_c.h',
360 'command_buffer/client/gles2_demo_c.c',
361 'command_buffer/client/gles2_demo_cc.h',
362 'command_buffer/client/gles2_demo_cc.cc',
363 ],
364 },
[email protected]bc36e9912010-01-15 00:53:02365 {
366 'target_name': 'pgl',
367 'type': 'static_library',
368 'dependencies': [
369 'command_buffer_client',
370 'gles2_c_lib',
371 '../third_party/npapi/npapi.gyp:npapi',
372 ],
373 'include_dirs': [
374 '..',
375 '../third_party/npapi/bindings',
376 ],
377 'all_dependent_settings': {
378 'include_dirs': [
379 '../third_party/npapi/bindings',
380 ],
381 },
382 'sources': [
383 'pgl/command_buffer_pepper.cc',
384 'pgl/command_buffer_pepper.h',
385 'pgl/pgl.cc',
386 'pgl/pgl.h',
387 ],
388 },
[email protected]7477ea6f2009-12-22 23:28:15389 ],
390 'conditions': [
391 ['OS == "win"',
392 {
393 'targets': [
394 {
395 'target_name': 'gles2_demo',
396 'type': 'executable',
397 'dependencies': [
398 'command_buffer_service',
399 'gles2_demo_lib',
400 ],
401 'sources': [
402 'command_buffer/client/gles2_demo.cc',
403 ],
[email protected]6907f192010-01-19 22:15:21404 'msvs_settings': {
405 'VCLinkerTool': {
406 # 0 == not set
407 # 1 == /SUBSYSTEM:CONSOLE
408 # 2 == /SUBSYSTEM:WINDOWS
409 'SubSystem': '2',
410 },
411 },
[email protected]7477ea6f2009-12-22 23:28:15412 },
413 ],
414 },
415 ],
416 ],
[email protected]96449d2c2009-11-25 00:01:32417}
418
419# Local Variables:
420# tab-width:2
421# indent-tabs-mode:nil
422# End:
423# vim: set expandtab tabstop=2 shiftwidth=2: