blob: c43e37d5fc3eebb531f0ab7cccf9b713060f73e3 [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,
8 },
9 'includes': [
10 '../build/common.gypi',
11 ],
12 'targets': [
13 {
14 'target_name': 'gl_libs',
15 'type': 'static_library',
16 'include_dirs': [
17 '../third_party/glew/include',
18 ],
19 'defines': [
20 'GLEW_STATIC',
21 ],
22 'all_dependent_settings': {
23 'include_dirs': [
24 '../third_party/glew/include',
25 ],
26 'defines': [
27 'GLEW_STATIC',
28 ],
29 },
30 'sources': [
31 '../third_party/glew/src/glew.c',
32 ],
33 'conditions': [
34 [ 'OS=="linux"',
35 {
36 'all_dependent_settings': {
37 'defines': [
38 'GL_GLEXT_PROTOTYPES',
39 ],
40 'ldflags': [
41 '-L<(PRODUCT_DIR)',
42 ],
43 'libraries': [
44 '-lGL',
45 '-lX11',
46 ],
47 },
48 },
49 ],
50 [ 'OS=="mac"',
51 {
52 'direct_dependent_settings': {
53 'libraries': [
54 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
55 ],
56 },
57 },
58 ],
59 [ 'OS=="win"',
60 {
61 'all_dependent_settings': {
62 'libraries': [
63 '-lOpenGL32.lib',
64 ],
65 },
66 },
67 ],
68 ],
69 },
70 {
71 'target_name': 'command_buffer_common',
72 'type': 'static_library',
73 'include_dirs': [
74 'command_buffer/common',
75 '..',
76 ],
77 'all_dependent_settings': {
78 'include_dirs': [
79 'command_buffer/common',
80 '..',
81 ],
82 },
83 'sources': [
84 'command_buffer/common/bitfield_helpers.h',
85 'command_buffer/common/cmd_buffer_common.h',
86 'command_buffer/common/cmd_buffer_common.cc',
87 'command_buffer/common/command_buffer.h',
88 'command_buffer/common/command_buffer_mock.h',
[email protected]d041d8c02009-12-03 00:35:5289 'command_buffer/common/constants.h',
[email protected]96449d2c2009-11-25 00:01:3290 'command_buffer/common/gles2_cmd_ids_autogen.h',
91 'command_buffer/common/gles2_cmd_ids.h',
92 'command_buffer/common/gles2_cmd_format_autogen.h',
93 'command_buffer/common/gles2_cmd_format.cc',
94 'command_buffer/common/gles2_cmd_format.h',
95 'command_buffer/common/gles2_cmd_utils.cc',
96 'command_buffer/common/gles2_cmd_utils.h',
97 'command_buffer/common/logging.h',
98 'command_buffer/common/mocks.h',
99 'command_buffer/common/resource.cc',
100 'command_buffer/common/resource.h',
101 'command_buffer/common/types.h',
102 ],
103 },
104 {
105 # Library helps make GLES2 command buffers.
106 'target_name': 'gles2_cmd_helper',
107 'type': 'static_library',
108 'dependencies': [
109 'command_buffer_common',
110 'np_utils',
111 ],
112 'sources': [
113 'command_buffer/client/gles2_cmd_helper.cc',
114 'command_buffer/client/gles2_cmd_helper.h',
115 'command_buffer/client/gles2_cmd_helper_autogen.h',
116 ],
117 },
118 {
119 # Library emulates GLES2 using command_buffers.
120 'target_name': 'gles2_implementation',
121 'type': 'static_library',
122 'dependencies': [
123 'gles2_cmd_helper',
124 ],
125 'sources': [
126 'command_buffer/client/gles2_implementation_autogen.h',
127 'command_buffer/client/gles2_implementation.cc',
128 'command_buffer/client/gles2_implementation_gen.h',
129 'command_buffer/client/gles2_implementation.h',
130 ],
131 },
132 {
133 # Stub to expose gles2_implementation as a namespace rather than a class
134 # so GLES2 C++ programs can work with no changes.
135 'target_name': 'gles2_lib',
136 'type': 'static_library',
137 'dependencies': [
138 'gles2_implementation',
139 ],
140 'sources': [
141 'command_buffer/client/gles2_lib.cc',
142 'command_buffer/client/gles2_lib.h',
143 ],
144 },
145 {
146 # Stub to expose gles2_implemenation in C instead of C++.
147 # so GLES2 C programs can work with no changes.
148 'target_name': 'gles2_c_lib',
149 'type': 'static_library',
150 'dependencies': [
151 'gles2_lib',
152 ],
153 'sources': [
154 'command_buffer/client/gles2_c_lib.h',
155 'command_buffer/client/gles2_c_lib.cc',
156 'command_buffer/client/gles2_c_lib_autogen.h',
157 ],
158 },
159 {
160 'target_name': 'command_buffer_common_unittests',
161 'type': 'none',
162 'include_dirs': [
163 'command_buffer/common',
164 ],
165 'dependencies': [
166 'gles2_lib',
167 'gles2_implementation',
168 'gles2_cmd_helper',
169 ],
170 'direct_dependent_settings': {
171 'sources': [
172 'command_buffer/common/bitfield_helpers_test.cc',
173 'command_buffer/common/gles2_cmd_format_test.cc',
174 'command_buffer/common/gles2_cmd_format_test_autogen.h',
175 'command_buffer/common/gles2_cmd_id_test.cc',
176 ],
177 },
178 },
179 {
180 'target_name': 'command_buffer_client',
181 'type': 'static_library',
182 'dependencies': [
183 'command_buffer_common',
184 ],
185 'sources': [
186 'command_buffer/client/cmd_buffer_helper.cc',
187 'command_buffer/client/cmd_buffer_helper.h',
188 'command_buffer/client/fenced_allocator.cc',
189 'command_buffer/client/fenced_allocator.h',
190 'command_buffer/client/id_allocator.cc',
191 'command_buffer/client/id_allocator.h',
192 ],
193 },
194 {
195 'target_name': 'command_buffer_client_unittests',
196 'type': 'none',
197 'direct_dependent_settings': {
198 'sources': [
199 'command_buffer/client/cmd_buffer_helper_test.cc',
200 'command_buffer/client/fenced_allocator_test.cc',
201 'command_buffer/client/id_allocator_test.cc',
202 ],
203 },
204 },
205 {
206 'target_name': 'command_buffer_service',
207 'type': 'static_library',
208 'include_dirs': [
209 '..',
210 ],
211 'all_dependent_settings': {
212 'include_dirs': [
213 '..',
214 ],
215 },
216 'dependencies': [
217 'command_buffer_common',
218 'gl_libs',
219 ],
220 'sources': [
221 'command_buffer/service/common_decoder.cc',
222 'command_buffer/service/common_decoder.h',
223 'command_buffer/service/cmd_buffer_engine.h',
224 'command_buffer/service/command_buffer_service.cc',
225 'command_buffer/service/command_buffer_service.h',
226 'command_buffer/service/cmd_parser.cc',
227 'command_buffer/service/cmd_parser.h',
228 'command_buffer/service/gles2_cmd_decoder.h',
229 'command_buffer/service/gles2_cmd_decoder_validate.h',
230 'command_buffer/service/gles2_cmd_decoder_autogen.h',
231 'command_buffer/service/gles2_cmd_decoder.cc',
232 'command_buffer/service/gl_utils.h',
233 'command_buffer/service/gpu_processor.h',
234 'command_buffer/service/gpu_processor.cc',
235 'command_buffer/service/gpu_processor_mock.h',
236 'command_buffer/service/mocks.h',
237 'command_buffer/service/precompile.cc',
238 'command_buffer/service/precompile.h',
239 'command_buffer/service/resource.cc',
240 'command_buffer/service/resource.h',
241 ],
242 'conditions': [
243 ['OS == "linux"',
244 {
245 'sources': [
[email protected]c3d7d602009-12-10 22:42:00246 'command_buffer/service/x_utils.cc',
247 'command_buffer/service/x_utils.h',
[email protected]96449d2c2009-11-25 00:01:32248 ],
249 },
250 ],
251 ['OS == "win"',
252 {
253 'sources': [
254 'command_buffer/service/gpu_processor_win.cc',
255 ],
256 },
257 ],
258 ],
259 },
260 {
261 'target_name': 'command_buffer_service_unittests',
262 'type': 'none',
263 'direct_dependent_settings': {
264 'sources': [
265 'command_buffer/service/cmd_parser_test.cc',
266 'command_buffer/service/command_buffer_service_unittest.cc',
[email protected]c0ce9d812009-12-10 09:30:28267 'command_buffer/service/common_decoder_unittest.cc',
[email protected]96449d2c2009-11-25 00:01:32268 'command_buffer/service/gpu_processor_unittest.cc',
269 'command_buffer/service/resource_test.cc',
270 ],
271 },
272 },
273 {
274 'target_name': 'np_utils',
275 'type': '<(library)',
276 'dependencies': [
277 '../base/base.gyp:base',
278 ],
279 'include_dirs': [
280 '..',
281 ],
282 'all_dependent_settings': {
283 'include_dirs': [
284 '..',
285 ],
286 },
287 'sources': [
288 'np_utils/default_np_object.h',
289 'np_utils/dynamic_np_object.cc',
290 'np_utils/dynamic_np_object.h',
291 'np_utils/np_browser.cc',
292 'np_utils/np_browser.h',
293 'np_utils/np_browser_mock.h',
294 'np_utils/np_browser_stub.cc',
295 'np_utils/np_browser_stub.h',
296 'np_utils/np_class.h',
297 'np_utils/np_dispatcher.cc',
298 'np_utils/np_dispatcher.h',
299 'np_utils/np_dispatcher_specializations.h',
300 'np_utils/np_headers.h',
301 'np_utils/np_object_mock.h',
302 'np_utils/np_object_pointer.h',
303 'np_utils/np_plugin_object.h',
304 'np_utils/np_plugin_object_mock.h',
305 'np_utils/np_plugin_object_factory.cc',
306 'np_utils/np_plugin_object_factory.h',
307 'np_utils/np_plugin_object_factory_mock.h',
308 'np_utils/np_utils.cc',
309 'np_utils/np_utils.h',
310 'np_utils/webkit_browser.h',
311 ],
312 },
313 {
314 'target_name': 'np_utils_unittests',
315 'type': 'none',
316 'direct_dependent_settings': {
317 'include_dirs': [
318 '..',
319 ],
320 'sources': [
321 'np_utils/dispatched_np_object_unittest.cc',
322 'np_utils/dynamic_np_object_unittest.cc',
323 'np_utils/np_class_unittest.cc',
324 'np_utils/np_object_pointer_unittest.cc',
325 'np_utils/np_utils_unittest.cc',
326 ],
327 },
328 },
329 {
330 'target_name': 'gpu_plugin',
331 'type': '<(library)',
332 'dependencies': [
333 '../base/base.gyp:base',
334 'command_buffer_service',
335 'np_utils',
336 ],
337 'include_dirs': [
338 '..',
339 ],
340 'all_dependent_settings': {
341 'include_dirs': [
342 '..',
343 ],
344 },
345 'sources': [
346 'gpu_plugin/gpu_plugin.cc',
347 'gpu_plugin/gpu_plugin.h',
348 'gpu_plugin/gpu_plugin_object.cc',
349 'gpu_plugin/gpu_plugin_object.h',
350 'gpu_plugin/gpu_plugin_object_win.cc',
351 'gpu_plugin/gpu_plugin_object_factory.cc',
352 'gpu_plugin/gpu_plugin_object_factory.h',
353 ],
354 },
355 {
356 'target_name': 'gpu_plugin_unittests',
357 'type': 'none',
358 'direct_dependent_settings': {
359 'include_dirs': [
360 '..',
361 ],
362 'sources': [
363 'gpu_plugin/gpu_plugin_unittest.cc',
364 'gpu_plugin/gpu_plugin_object_unittest.cc',
365 'gpu_plugin/gpu_plugin_object_factory_unittest.cc',
366 ],
367 },
368 },
369 {
370 'target_name': 'gpu_all_unittests',
371 'type': 'executable',
372 'dependencies': [
373 '../testing/gmock.gyp:gmock',
374 '../testing/gmock.gyp:gmockmain',
375 '../testing/gtest.gyp:gtest',
376 'command_buffer_client',
377 'command_buffer_client_unittests',
378 'command_buffer_common',
379 'command_buffer_common_unittests',
380 'command_buffer_service',
381 'command_buffer_service_unittests',
382 'gpu_plugin',
383 'gpu_plugin_unittests',
384 'np_utils',
385 'np_utils_unittests',
386 ],
387 },
388 {
389 'target_name': 'gles2_demo',
390 'type': 'executable',
391 'dependencies': [
392 'command_buffer_client',
393 'command_buffer_service',
394 'gles2_lib',
395 'gles2_c_lib',
396 'gpu_plugin',
397 'np_utils',
398 ],
399 'sources': [
400 'command_buffer/client/gles2_demo.cc',
401 'command_buffer/client/gles2_demo_c.h',
402 'command_buffer/client/gles2_demo_c.c',
403 'command_buffer/client/gles2_demo_cc.h',
404 'command_buffer/client/gles2_demo_cc.cc',
405 ],
406 },
407 ]
408}
409
410# Local Variables:
411# tab-width:2
412# indent-tabs-mode:nil
413# End:
414# vim: set expandtab tabstop=2 shiftwidth=2: