blob: 3185f5bfbfc2151a805da067b673470a4b71565c [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',
117 'command_buffer/common/types.h',
118 ],
119 },
120 {
121 # Library helps make GLES2 command buffers.
122 'target_name': 'gles2_cmd_helper',
123 'type': 'static_library',
124 'dependencies': [
125 'command_buffer_common',
[email protected]96449d2c2009-11-25 00:01:32126 ],
127 'sources': [
128 'command_buffer/client/gles2_cmd_helper.cc',
129 'command_buffer/client/gles2_cmd_helper.h',
130 'command_buffer/client/gles2_cmd_helper_autogen.h',
131 ],
132 },
133 {
134 # Library emulates GLES2 using command_buffers.
135 'target_name': 'gles2_implementation',
136 'type': 'static_library',
137 'dependencies': [
138 'gles2_cmd_helper',
139 ],
140 'sources': [
141 'command_buffer/client/gles2_implementation_autogen.h',
142 'command_buffer/client/gles2_implementation.cc',
143 'command_buffer/client/gles2_implementation_gen.h',
144 'command_buffer/client/gles2_implementation.h',
145 ],
146 },
147 {
148 # Stub to expose gles2_implementation as a namespace rather than a class
149 # so GLES2 C++ programs can work with no changes.
150 'target_name': 'gles2_lib',
151 'type': 'static_library',
152 'dependencies': [
153 'gles2_implementation',
154 ],
155 'sources': [
156 'command_buffer/client/gles2_lib.cc',
157 'command_buffer/client/gles2_lib.h',
158 ],
159 },
160 {
161 # Stub to expose gles2_implemenation in C instead of C++.
162 # so GLES2 C programs can work with no changes.
163 'target_name': 'gles2_c_lib',
164 'type': 'static_library',
165 'dependencies': [
166 'gles2_lib',
167 ],
168 'sources': [
169 'command_buffer/client/gles2_c_lib.h',
170 'command_buffer/client/gles2_c_lib.cc',
171 'command_buffer/client/gles2_c_lib_autogen.h',
172 ],
173 },
174 {
175 'target_name': 'command_buffer_common_unittests',
176 'type': 'none',
177 'include_dirs': [
178 'command_buffer/common',
179 ],
180 'dependencies': [
181 'gles2_lib',
182 'gles2_implementation',
183 'gles2_cmd_helper',
184 ],
185 'direct_dependent_settings': {
186 'sources': [
187 'command_buffer/common/bitfield_helpers_test.cc',
[email protected]96449d2c2009-11-25 00:01:32188 ],
189 },
190 },
191 {
192 'target_name': 'command_buffer_client',
193 'type': 'static_library',
194 'dependencies': [
195 'command_buffer_common',
196 ],
197 'sources': [
198 'command_buffer/client/cmd_buffer_helper.cc',
199 'command_buffer/client/cmd_buffer_helper.h',
200 'command_buffer/client/fenced_allocator.cc',
201 'command_buffer/client/fenced_allocator.h',
202 'command_buffer/client/id_allocator.cc',
203 'command_buffer/client/id_allocator.h',
204 ],
205 },
206 {
207 'target_name': 'command_buffer_client_unittests',
208 'type': 'none',
209 'direct_dependent_settings': {
210 'sources': [
211 'command_buffer/client/cmd_buffer_helper_test.cc',
212 'command_buffer/client/fenced_allocator_test.cc',
213 'command_buffer/client/id_allocator_test.cc',
214 ],
215 },
216 },
217 {
[email protected]69d80ae2009-12-23 08:57:42218 'target_name': 'command_buffer_service_impl',
[email protected]96449d2c2009-11-25 00:01:32219 'type': 'static_library',
220 'include_dirs': [
221 '..',
222 ],
223 'all_dependent_settings': {
224 'include_dirs': [
225 '..',
226 ],
227 },
228 'dependencies': [
229 'command_buffer_common',
[email protected]96449d2c2009-11-25 00:01:32230 ],
231 'sources': [
232 'command_buffer/service/common_decoder.cc',
233 'command_buffer/service/common_decoder.h',
234 'command_buffer/service/cmd_buffer_engine.h',
235 'command_buffer/service/command_buffer_service.cc',
236 'command_buffer/service/command_buffer_service.h',
237 'command_buffer/service/cmd_parser.cc',
238 'command_buffer/service/cmd_parser.h',
[email protected]96449d2c2009-11-25 00:01:32239 'command_buffer/service/gpu_processor.h',
240 'command_buffer/service/gpu_processor.cc',
241 'command_buffer/service/gpu_processor_mock.h',
242 'command_buffer/service/mocks.h',
243 'command_buffer/service/precompile.cc',
244 'command_buffer/service/precompile.h',
245 'command_buffer/service/resource.cc',
246 'command_buffer/service/resource.h',
247 ],
248 'conditions': [
249 ['OS == "linux"',
250 {
251 'sources': [
[email protected]be4f1882010-01-06 04:38:55252 'command_buffer/service/gpu_processor_linux.cc',
[email protected]c3d7d602009-12-10 22:42:00253 'command_buffer/service/x_utils.cc',
254 'command_buffer/service/x_utils.h',
[email protected]96449d2c2009-11-25 00:01:32255 ],
[email protected]be4f1882010-01-06 04:38:55256 'dependencies': [
[email protected]7684ec12010-01-09 02:45:56257 'gl_libs',
[email protected]be4f1882010-01-06 04:38:55258 '../build/linux/system.gyp:gtk',
259 ]
[email protected]96449d2c2009-11-25 00:01:32260 },
261 ],
262 ['OS == "win"',
263 {
264 'sources': [
265 'command_buffer/service/gpu_processor_win.cc',
266 ],
267 },
268 ],
269 ],
270 },
271 {
[email protected]69d80ae2009-12-23 08:57:42272 'target_name': 'command_buffer_service',
273 'type': 'static_library',
274 'include_dirs': [
275 '..',
276 ],
277 'all_dependent_settings': {
278 'include_dirs': [
279 '..',
280 ],
281 },
282 'dependencies': [
283 'command_buffer_service_impl',
284 'gl_libs',
285 ],
286 'sources': [
287 '<@(gpu_source_files)',
288 ],
289 },
290 {
[email protected]96449d2c2009-11-25 00:01:32291 'target_name': 'command_buffer_service_unittests',
292 'type': 'none',
293 'direct_dependent_settings': {
294 'sources': [
[email protected]69d80ae2009-12-23 08:57:42295 '<@(gpu_source_files)',
[email protected]96449d2c2009-11-25 00:01:32296 'command_buffer/service/cmd_parser_test.cc',
297 'command_buffer/service/command_buffer_service_unittest.cc',
[email protected]c0ce9d812009-12-10 09:30:28298 'command_buffer/service/common_decoder_unittest.cc',
[email protected]96449d2c2009-11-25 00:01:32299 'command_buffer/service/gpu_processor_unittest.cc',
300 'command_buffer/service/resource_test.cc',
[email protected]69d80ae2009-12-23 08:57:42301 'command_buffer/service/gl_interface.h',
302 'command_buffer/service/gl_interface.cc',
303 'command_buffer/service/gl_mock.h',
304 'command_buffer/service/gl_mock.cc',
305 'command_buffer/service/gles2_cmd_decoder_unittest.cc',
[email protected]8a837bb2010-01-05 00:21:24306 'command_buffer/service/gles2_cmd_decoder_unittest_autogen.h',
[email protected]69d80ae2009-12-23 08:57:42307 'command_buffer/common/gles2_cmd_format_test.cc',
308 'command_buffer/common/gles2_cmd_format_test_autogen.h',
309 'command_buffer/common/gles2_cmd_id_test.cc',
310 'command_buffer/common/gles2_cmd_id_test_autogen.h',
[email protected]96449d2c2009-11-25 00:01:32311 ],
312 },
313 },
314 {
[email protected]96449d2c2009-11-25 00:01:32315 'target_name': 'gpu_plugin',
[email protected]7477ea6f2009-12-22 23:28:15316 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32317 'dependencies': [
318 '../base/base.gyp:base',
319 'command_buffer_service',
[email protected]96449d2c2009-11-25 00:01:32320 ],
321 'include_dirs': [
322 '..',
323 ],
324 'all_dependent_settings': {
325 'include_dirs': [
326 '..',
327 ],
328 },
329 'sources': [
330 'gpu_plugin/gpu_plugin.cc',
331 'gpu_plugin/gpu_plugin.h',
[email protected]96449d2c2009-11-25 00:01:32332 ],
333 },
334 {
[email protected]96449d2c2009-11-25 00:01:32335 'target_name': 'gpu_all_unittests',
336 'type': 'executable',
337 'dependencies': [
338 '../testing/gmock.gyp:gmock',
339 '../testing/gmock.gyp:gmockmain',
340 '../testing/gtest.gyp:gtest',
341 'command_buffer_client',
342 'command_buffer_client_unittests',
343 'command_buffer_common',
344 'command_buffer_common_unittests',
[email protected]69d80ae2009-12-23 08:57:42345 'command_buffer_service_impl',
[email protected]96449d2c2009-11-25 00:01:32346 'command_buffer_service_unittests',
[email protected]96449d2c2009-11-25 00:01:32347 ],
348 },
349 {
[email protected]7477ea6f2009-12-22 23:28:15350 'target_name': 'gles2_demo_lib',
351 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32352 'dependencies': [
353 'command_buffer_client',
[email protected]96449d2c2009-11-25 00:01:32354 'gles2_lib',
355 'gles2_c_lib',
[email protected]96449d2c2009-11-25 00:01:32356 ],
357 'sources': [
[email protected]96449d2c2009-11-25 00:01:32358 'command_buffer/client/gles2_demo_c.h',
359 'command_buffer/client/gles2_demo_c.c',
360 'command_buffer/client/gles2_demo_cc.h',
361 'command_buffer/client/gles2_demo_cc.cc',
362 ],
363 },
[email protected]bc36e9912010-01-15 00:53:02364 {
365 'target_name': 'pgl',
366 'type': 'static_library',
367 'dependencies': [
368 'command_buffer_client',
369 'gles2_c_lib',
370 '../third_party/npapi/npapi.gyp:npapi',
371 ],
372 'include_dirs': [
373 '..',
374 '../third_party/npapi/bindings',
375 ],
376 'all_dependent_settings': {
377 'include_dirs': [
378 '../third_party/npapi/bindings',
379 ],
380 },
381 'sources': [
382 'pgl/command_buffer_pepper.cc',
383 'pgl/command_buffer_pepper.h',
384 'pgl/pgl.cc',
385 'pgl/pgl.h',
386 ],
387 },
[email protected]7477ea6f2009-12-22 23:28:15388 ],
389 'conditions': [
390 ['OS == "win"',
391 {
392 'targets': [
393 {
394 'target_name': 'gles2_demo',
395 'type': 'executable',
396 'dependencies': [
397 'command_buffer_service',
398 'gles2_demo_lib',
399 ],
400 'sources': [
401 'command_buffer/client/gles2_demo.cc',
402 ],
403 },
404 ],
405 },
406 ],
407 ],
[email protected]96449d2c2009-11-25 00:01:32408}
409
410# Local Variables:
411# tab-width:2
412# indent-tabs-mode:nil
413# End:
414# vim: set expandtab tabstop=2 shiftwidth=2: