blob: 58294d34140f8574ed4d9a5b7fb65f23a1e56b56 [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': [
57 '-lGL',
58 '-lX11',
59 ],
60 },
61 },
62 ],
63 [ 'OS=="mac"',
64 {
65 'direct_dependent_settings': {
66 'libraries': [
67 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
68 ],
69 },
70 },
71 ],
72 [ 'OS=="win"',
73 {
74 'all_dependent_settings': {
75 'libraries': [
76 '-lOpenGL32.lib',
77 ],
78 },
79 },
80 ],
81 ],
82 },
83 {
84 'target_name': 'command_buffer_common',
85 'type': 'static_library',
86 'include_dirs': [
87 'command_buffer/common',
88 '..',
89 ],
90 'all_dependent_settings': {
91 'include_dirs': [
92 'command_buffer/common',
93 '..',
94 ],
95 },
[email protected]a7a27ace2009-12-12 00:11:2596 'dependencies': [
97 '../base/base.gyp:base',
98 ],
[email protected]96449d2c2009-11-25 00:01:3299 'sources': [
100 'command_buffer/common/bitfield_helpers.h',
[email protected]7477ea6f2009-12-22 23:28:15101 'command_buffer/common/buffer.h',
[email protected]96449d2c2009-11-25 00:01:32102 'command_buffer/common/cmd_buffer_common.h',
103 'command_buffer/common/cmd_buffer_common.cc',
104 'command_buffer/common/command_buffer.h',
105 'command_buffer/common/command_buffer_mock.h',
[email protected]d041d8c02009-12-03 00:35:52106 'command_buffer/common/constants.h',
[email protected]96449d2c2009-11-25 00:01:32107 'command_buffer/common/gles2_cmd_ids_autogen.h',
108 'command_buffer/common/gles2_cmd_ids.h',
109 'command_buffer/common/gles2_cmd_format_autogen.h',
110 'command_buffer/common/gles2_cmd_format.cc',
111 'command_buffer/common/gles2_cmd_format.h',
112 'command_buffer/common/gles2_cmd_utils.cc',
113 'command_buffer/common/gles2_cmd_utils.h',
114 'command_buffer/common/logging.h',
115 'command_buffer/common/mocks.h',
116 'command_buffer/common/resource.cc',
117 'command_buffer/common/resource.h',
118 '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]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 ],
256 },
257 ],
258 ['OS == "win"',
259 {
260 'sources': [
261 'command_buffer/service/gpu_processor_win.cc',
262 ],
263 },
264 ],
265 ],
266 },
267 {
[email protected]69d80ae2009-12-23 08:57:42268 'target_name': 'command_buffer_service',
269 'type': 'static_library',
270 'include_dirs': [
271 '..',
272 ],
273 'all_dependent_settings': {
274 'include_dirs': [
275 '..',
276 ],
277 },
278 'dependencies': [
279 'command_buffer_service_impl',
280 'gl_libs',
281 ],
282 'sources': [
283 '<@(gpu_source_files)',
284 ],
285 },
286 {
[email protected]96449d2c2009-11-25 00:01:32287 'target_name': 'command_buffer_service_unittests',
288 'type': 'none',
289 'direct_dependent_settings': {
290 'sources': [
[email protected]69d80ae2009-12-23 08:57:42291 '<@(gpu_source_files)',
[email protected]96449d2c2009-11-25 00:01:32292 'command_buffer/service/cmd_parser_test.cc',
293 'command_buffer/service/command_buffer_service_unittest.cc',
[email protected]c0ce9d812009-12-10 09:30:28294 'command_buffer/service/common_decoder_unittest.cc',
[email protected]96449d2c2009-11-25 00:01:32295 'command_buffer/service/gpu_processor_unittest.cc',
296 'command_buffer/service/resource_test.cc',
[email protected]69d80ae2009-12-23 08:57:42297 'command_buffer/service/gl_interface.h',
298 'command_buffer/service/gl_interface.cc',
299 'command_buffer/service/gl_mock.h',
300 'command_buffer/service/gl_mock.cc',
301 'command_buffer/service/gles2_cmd_decoder_unittest.cc',
302 'command_buffer/common/gles2_cmd_format_test.cc',
303 'command_buffer/common/gles2_cmd_format_test_autogen.h',
304 'command_buffer/common/gles2_cmd_id_test.cc',
305 'command_buffer/common/gles2_cmd_id_test_autogen.h',
[email protected]96449d2c2009-11-25 00:01:32306 ],
307 },
308 },
309 {
[email protected]96449d2c2009-11-25 00:01:32310 'target_name': 'gpu_plugin',
[email protected]7477ea6f2009-12-22 23:28:15311 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32312 'dependencies': [
313 '../base/base.gyp:base',
314 'command_buffer_service',
[email protected]96449d2c2009-11-25 00:01:32315 ],
316 'include_dirs': [
317 '..',
318 ],
319 'all_dependent_settings': {
320 'include_dirs': [
321 '..',
322 ],
323 },
324 'sources': [
325 'gpu_plugin/gpu_plugin.cc',
326 'gpu_plugin/gpu_plugin.h',
[email protected]96449d2c2009-11-25 00:01:32327 ],
328 },
329 {
[email protected]96449d2c2009-11-25 00:01:32330 'target_name': 'gpu_all_unittests',
331 'type': 'executable',
332 'dependencies': [
333 '../testing/gmock.gyp:gmock',
334 '../testing/gmock.gyp:gmockmain',
335 '../testing/gtest.gyp:gtest',
336 'command_buffer_client',
337 'command_buffer_client_unittests',
338 'command_buffer_common',
339 'command_buffer_common_unittests',
[email protected]69d80ae2009-12-23 08:57:42340 'command_buffer_service_impl',
[email protected]96449d2c2009-11-25 00:01:32341 'command_buffer_service_unittests',
[email protected]96449d2c2009-11-25 00:01:32342 ],
343 },
344 {
[email protected]7477ea6f2009-12-22 23:28:15345 'target_name': 'gles2_demo_lib',
346 'type': 'static_library',
[email protected]96449d2c2009-11-25 00:01:32347 'dependencies': [
348 'command_buffer_client',
[email protected]96449d2c2009-11-25 00:01:32349 'gles2_lib',
350 'gles2_c_lib',
[email protected]96449d2c2009-11-25 00:01:32351 ],
352 'sources': [
[email protected]96449d2c2009-11-25 00:01:32353 'command_buffer/client/gles2_demo_c.h',
354 'command_buffer/client/gles2_demo_c.c',
355 'command_buffer/client/gles2_demo_cc.h',
356 'command_buffer/client/gles2_demo_cc.cc',
357 ],
358 },
[email protected]7477ea6f2009-12-22 23:28:15359 ],
360 'conditions': [
361 ['OS == "win"',
362 {
363 'targets': [
364 {
365 'target_name': 'gles2_demo',
366 'type': 'executable',
367 'dependencies': [
368 'command_buffer_service',
369 'gles2_demo_lib',
370 ],
371 'sources': [
372 'command_buffer/client/gles2_demo.cc',
373 ],
374 },
375 ],
376 },
377 ],
378 ],
[email protected]96449d2c2009-11-25 00:01:32379}
380
381# Local Variables:
382# tab-width:2
383# indent-tabs-mode:nil
384# End:
385# vim: set expandtab tabstop=2 shiftwidth=2: