1# preamble
2
3NULL =
4
5SUBDIRS =
6
7BUILT_SOURCES =
8
9EXTRA_DIST =
10CLEANFILES =
11DISTCLEANFILES =
12
13AM_CPPFLAGS = \
14	-I$(top_srcdir)				\
15	-I$(top_builddir)			\
16	-I$(srcdir)/deprecated			\
17	-I$(srcdir)/winsys 			\
18	-I$(srcdir)/driver/gl 			\
19	-I$(srcdir)/driver/gl/gl 		\
20	-I$(srcdir)/driver/gl/gles 		\
21	$(NULL)
22
23AM_CPPFLAGS += \
24	-DG_LOG_DOMAIN=\"Cogl\" 	\
25	-DCOGL_COMPILATION		\
26	-DCOGL_GL_LIBNAME=\"$(COGL_GL_LIBNAME)\" \
27	-DCOGL_GLES1_LIBNAME=\"$(COGL_GLES1_LIBNAME)\" \
28	-DCOGL_GLES2_LIBNAME=\"$(COGL_GLES2_LIBNAME)\" \
29	-DCOGL_LOCALEDIR=\""$(localedir)"\" \
30	$(NULL)
31
32if HAVE_COGL_DEFAULT_DRIVER
33AM_CPPFLAGS += \
34	-DCOGL_DEFAULT_DRIVER=\"$(COGL_DEFAULT_DRIVER)\"
35endif
36
37
38AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
39
40BUILT_SOURCES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
41DISTCLEANFILES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
42EXTRA_DIST += cogl-defines.h.in cogl-egl-defines.h.in cogl-gl-header.h.in
43
44pc_files = muffin-cogl-$(MUFFIN_PLUGIN_API_VERSION).pc
45
46pkgconfigdir = $(prefix)/libdata/pkgconfig
47pkgconfig_DATA = $(pc_files)
48
49DISTCLEANFILES += $(pc_files)
50
51cogl_deprecated_h = \
52	deprecated/cogl-material-compat.h 	\
53	deprecated/cogl-vertex-buffer.h 	\
54	deprecated/cogl-shader.h 		\
55	deprecated/cogl-clutter.h       	\
56	deprecated/cogl-type-casts.h       	\
57	deprecated/cogl-auto-texture.h	\
58	$(NULL)
59
60cogl_deprecated_nonintrospected_h = \
61	deprecated/cogl-framebuffer-deprecated.h \
62	$(NULL)
63
64# public 1.x api headers
65cogl_1_public_h = \
66	$(cogl_deprecated_h)			\
67	cogl1-context.h 		\
68	cogl-bitmap.h 		\
69	cogl-color.h 			\
70	cogl-matrix.h 		\
71	cogl-offscreen.h 		\
72	cogl-primitives.h 		\
73	cogl-texture.h 		\
74	cogl-types.h 			\
75	cogl.h			\
76	$(NULL)
77
78cogl_nonintrospected_h = \
79	cogl-object.h 		\
80	cogl-renderer.h 		\
81	cogl-swap-chain.h 		\
82	cogl-onscreen-template.h 	\
83	cogl-display.h 		\
84	cogl-context.h 		\
85	cogl-pipeline.h 		\
86	cogl-pipeline-state.h 	\
87	cogl-pipeline-layer-state.h 	\
88	cogl-snippet.h		\
89	cogl-gles2.h			\
90	cogl-gles2-types.h		\
91	cogl-index-buffer.h 		\
92	cogl-attribute-buffer.h 	\
93	cogl-indices.h 		\
94	cogl-attribute.h 		\
95	cogl-primitive.h 		\
96	cogl-framebuffer.h		\
97	cogl-onscreen.h		\
98	cogl-frame-info.h		\
99	cogl-vector.h 		\
100	cogl-euler.h 			\
101	cogl-output.h			\
102	cogl-quaternion.h 		\
103	cogl-matrix-stack.h		\
104	cogl-poll.h			\
105	cogl-texture-3d.h             \
106	cogl-texture-2d.h             \
107	cogl-texture-2d-gl.h 		\
108	cogl-texture-rectangle.h      \
109	cogl-texture-2d-sliced.h      \
110	cogl-sub-texture.h            \
111	cogl-atlas-texture.h          \
112	cogl-meta-texture.h		\
113	cogl-primitive-texture.h	\
114	cogl-depth-state.h 		\
115	cogl-buffer.h 		\
116	cogl-pixel-buffer.h		\
117	cogl-macros.h			\
118	cogl-fence.h       		\
119	cogl-version.h		\
120	cogl-error.h			\
121	cogl-bitmap.h			\
122	cogl-color.h			\
123	cogl-matrix.h			\
124	cogl-texture.h		\
125	cogl-types.h			\
126	cogl-gtype-private.h		\
127	cogl-muffin.h			\
128	$(NULL)
129
130cogl_nodist_h = \
131	$(NULL)
132
133# nop driver
134cogl_driver_sources = \
135	driver/nop/cogl-driver-nop.c \
136	driver/nop/cogl-framebuffer-nop-private.h \
137	driver/nop/cogl-framebuffer-nop.c \
138	driver/nop/cogl-attribute-nop-private.h \
139	driver/nop/cogl-attribute-nop.c \
140	driver/nop/cogl-clip-stack-nop-private.h \
141	driver/nop/cogl-clip-stack-nop.c \
142	driver/nop/cogl-texture-2d-nop-private.h \
143	driver/nop/cogl-texture-2d-nop.c \
144	$(NULL)
145
146# gl driver sources
147cogl_gl_prototypes_h = \
148	gl-prototypes/cogl-gles2-functions.h		\
149	gl-prototypes/cogl-core-functions.h		\
150	gl-prototypes/cogl-in-gles-core-functions.h	\
151	gl-prototypes/cogl-in-gles2-core-functions.h	\
152	gl-prototypes/cogl-glsl-functions.h		\
153	$(NULL)
154
155cogl_driver_sources += \
156	driver/gl/cogl-util-gl-private.h \
157	driver/gl/cogl-util-gl.c \
158	driver/gl/cogl-framebuffer-gl-private.h \
159	driver/gl/cogl-framebuffer-gl.c \
160	driver/gl/cogl-texture-gl-private.h \
161	driver/gl/cogl-texture-gl.c \
162	driver/gl/cogl-texture-2d-gl-private.h \
163	driver/gl/cogl-texture-2d-gl.c \
164	driver/gl/cogl-attribute-gl-private.h \
165	driver/gl/cogl-attribute-gl.c \
166	driver/gl/cogl-clip-stack-gl-private.h \
167	driver/gl/cogl-clip-stack-gl.c \
168	driver/gl/cogl-buffer-gl-private.h \
169	driver/gl/cogl-buffer-gl.c \
170	driver/gl/cogl-pipeline-opengl.c \
171	driver/gl/cogl-pipeline-opengl-private.h \
172	driver/gl/cogl-pipeline-fragend-glsl.c \
173	driver/gl/cogl-pipeline-fragend-glsl-private.h \
174	driver/gl/gl/cogl-pipeline-fragend-arbfp.c \
175	driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h \
176	driver/gl/gl/cogl-pipeline-progend-fixed-arbfp.c \
177	driver/gl/gl/cogl-pipeline-progend-fixed-arbfp-private.h \
178	driver/gl/cogl-pipeline-fragend-fixed.c \
179	driver/gl/cogl-pipeline-fragend-fixed-private.h \
180	driver/gl/cogl-pipeline-vertend-glsl.c \
181	driver/gl/cogl-pipeline-vertend-glsl-private.h \
182	driver/gl/cogl-pipeline-vertend-fixed.c \
183	driver/gl/cogl-pipeline-vertend-fixed-private.h \
184	driver/gl/cogl-pipeline-progend-fixed.c \
185	driver/gl/cogl-pipeline-progend-fixed-private.h \
186	driver/gl/cogl-pipeline-progend-glsl.c \
187	driver/gl/cogl-pipeline-progend-glsl-private.h \
188	$(NULL)
189
190if COGL_DRIVER_GL_SUPPORTED
191cogl_driver_sources += \
192	driver/gl/gl/cogl-driver-gl.c \
193	driver/gl/gl/cogl-texture-driver-gl.c \
194	$(NULL)
195endif
196
197if COGL_DRIVER_GLES_SUPPORTED
198cogl_driver_sources += \
199	driver/gl/gles/cogl-driver-gles.c \
200	driver/gl/gles/cogl-texture-driver-gles.c	\
201	$(NULL)
202endif
203
204# winsys sources, common to all backends
205cogl_winsys_common_sources = \
206	winsys/cogl-winsys-private.h \
207	winsys/cogl-winsys.c \
208	$(NULL)
209
210# sources
211cogl_sources_c = \
212	$(cogl_driver_sources)				\
213	$(cogl_winsys_common_sources)			\
214	cogl-private.h			\
215	cogl-i18n-private.h 			\
216	cogl-debug.h 				\
217	cogl-debug-options.h			\
218	cogl-gpu-info.c			\
219	cogl-gpu-info-private.h		\
220	cogl-context-private.h		\
221	cogl-context.c			\
222	cogl-renderer-private.h		\
223	cogl-renderer.h			\
224	cogl-renderer.c			\
225	cogl-swap-chain-private.h		\
226	cogl-swap-chain.h			\
227	cogl-swap-chain.c			\
228	cogl-onscreen-template-private.h 	\
229	cogl-onscreen-template.h 		\
230	cogl-onscreen-template.c 		\
231	cogl-display-private.h		\
232	cogl-display.h			\
233	cogl-display.c			\
234	cogl-driver.h				\
235	cogl.c				\
236	cogl-object-private.h			\
237	cogl-object.h				\
238	cogl-object.c				\
239	cogl-util.h 				\
240	cogl-util.c 				\
241	cogl-bitmap-private.h 		\
242	cogl-bitmap.c 			\
243	cogl-bitmap-conversion.c 		\
244	cogl-bitmap-packing.h			\
245	cogl-primitives-private.h 		\
246	cogl-primitives.h 			\
247	cogl-primitives.c 			\
248	cogl-bitmap-pixbuf.c 			\
249	cogl-clip-stack.h 			\
250	cogl-clip-stack.c			\
251	cogl-feature-private.h                \
252	cogl-feature-private.c                \
253	cogl-color-private.h    		\
254	cogl-color.c				\
255	cogl-buffer-private.h 		\
256	cogl-buffer.c				\
257	cogl-pixel-buffer-private.h		\
258	cogl-pixel-buffer.c			\
259	cogl-index-buffer-private.h		\
260	cogl-index-buffer.c			\
261	cogl-attribute-buffer-private.h	\
262	cogl-attribute-buffer.c		\
263	cogl-indices-private.h		\
264	cogl-indices.c			\
265	cogl-attribute-private.h		\
266	cogl-attribute.c			\
267	cogl-primitive-private.h		\
268	cogl-primitive.c			\
269	cogl-matrix.c				\
270	cogl-vector.c				\
271	cogl-euler.c				\
272	cogl-quaternion-private.h 		\
273	cogl-quaternion.c			\
274	cogl-matrix-private.h			\
275	cogl-matrix-stack.c			\
276	cogl-matrix-stack-private.h		\
277	cogl-depth-state.c			\
278	cogl-depth-state-private.h		\
279	cogl-node.c				\
280	cogl-node-private.h			\
281	cogl-pipeline.c			\
282	cogl-pipeline-private.h		\
283	cogl-pipeline-layer.c			\
284	cogl-pipeline-layer-private.h		\
285	cogl-pipeline-state.c			\
286	cogl-pipeline-layer-state-private.h	\
287	cogl-pipeline-layer-state.c		\
288	cogl-pipeline-state-private.h		\
289	cogl-pipeline-debug.c			\
290        cogl-glsl-shader.c                    \
291        cogl-glsl-shader-private.h            \
292        cogl-glsl-shader-boilerplate.h        \
293	cogl-pipeline-snippet-private.h	\
294	cogl-pipeline-snippet.c		\
295	cogl-pipeline-cache.h			\
296	cogl-pipeline-cache.c			\
297	cogl-pipeline-hash-table.h		\
298	cogl-pipeline-hash-table.c		\
299	cogl-sampler-cache.c			\
300	cogl-sampler-cache-private.h		\
301	cogl-blend-string.c			\
302	cogl-blend-string.h			\
303	cogl-debug.c				\
304	cogl-sub-texture-private.h            \
305	cogl-texture-private.h		\
306	cogl-texture-2d-private.h             \
307	cogl-texture-2d-sliced-private.h 	\
308	cogl-texture-3d-private.h             \
309	cogl-texture-driver.h			\
310	cogl-sub-texture.c                    \
311	cogl-texture.c			\
312	cogl-texture-2d.c                     \
313	cogl-texture-2d-sliced.c		\
314	cogl-texture-3d.c                     \
315	cogl-texture-rectangle-private.h      \
316	cogl-texture-rectangle.c              \
317	cogl-rectangle-map.h                  \
318	cogl-rectangle-map.c                  \
319	cogl-atlas.h                          \
320	cogl-atlas.c                          \
321	cogl-atlas-texture-private.h          \
322	cogl-atlas-texture.c                  \
323	cogl-meta-texture.c			\
324	cogl-primitive-texture.c		\
325	cogl-blit.h				\
326	cogl-blit.c				\
327	cogl-spans.h				\
328	cogl-spans.c				\
329	cogl-journal-private.h		\
330	cogl-journal.c			\
331	cogl-frame-info-private.h		\
332	cogl-frame-info.c			\
333	cogl-framebuffer-private.h		\
334	cogl-framebuffer.c 			\
335	cogl-onscreen-private.h		\
336	cogl-onscreen.c 			\
337	cogl-output-private.h			\
338	cogl-output.c				\
339	cogl-profile.h 			\
340	cogl-profile.c 			\
341	cogl-flags.h				\
342	cogl-bitmask.h                        \
343	cogl-bitmask.c                        \
344	cogl-gtype.c                          \
345	cogl-gtype-private.h                  \
346	cogl-point-in-poly-private.h       	\
347	cogl-point-in-poly.c       		\
348	cogl-list.c				\
349	cogl-list.h				\
350	winsys/cogl-winsys-stub-private.h	\
351	winsys/cogl-winsys-stub.c		\
352	cogl-config-private.h			\
353	cogl-config.c				\
354	cogl-boxed-value.h			\
355	cogl-boxed-value.c			\
356	cogl-snippet-private.h		\
357	cogl-snippet.c			\
358	cogl-poll-private.h			\
359	cogl-poll.c				\
360	gl-prototypes/cogl-all-functions.h	\
361	gl-prototypes/cogl-gles1-functions.h	\
362	gl-prototypes/cogl-gles2-functions.h	\
363	gl-prototypes/cogl-core-functions.h	\
364	gl-prototypes/cogl-in-gles-core-functions.h	\
365	gl-prototypes/cogl-in-gles1-core-functions.h	\
366	gl-prototypes/cogl-in-gles2-core-functions.h	\
367	gl-prototypes/cogl-fixed-functions.h	\
368	gl-prototypes/cogl-glsl-functions.h	\
369	cogl-memory-stack-private.h		\
370	cogl-memory-stack.c			\
371	cogl-magazine-private.h		\
372	cogl-magazine.c			\
373	cogl-gles2-context-private.h		\
374	cogl-gles2-context.c			\
375	cogl-error-private.h			\
376	cogl-error.c				\
377	cogl-closure-list-private.h		\
378	cogl-closure-list.c			\
379	cogl-fence.c				\
380	cogl-fence-private.h			\
381	deprecated/cogl-vertex-buffer-private.h	\
382	deprecated/cogl-vertex-buffer.c		\
383	deprecated/cogl-material-compat.c		\
384	deprecated/cogl-program.c			\
385	deprecated/cogl-program-private.h		\
386	deprecated/cogl-auto-texture.c		\
387	deprecated/cogl-shader-private.h		\
388	deprecated/cogl-shader.c			\
389	deprecated/cogl-clutter.c       		\
390	deprecated/cogl-framebuffer-deprecated.c      \
391	$(NULL)
392
393cogl_nonintrospected_h += cogl-glib-source.h
394cogl_sources_c += cogl-glib-source.c
395
396if SUPPORT_XLIB
397cogl_deprecated_nonintrospected_h += deprecated/cogl-clutter-xlib.h
398cogl_1_public_h += cogl-xlib-renderer.h
399
400cogl_nonintrospected_h += \
401	winsys/cogl-texture-pixmap-x11.h \
402	cogl-xlib.h
403
404cogl_sources_c += \
405	cogl-x11-renderer-private.h \
406	cogl-xlib-renderer-private.h \
407	cogl-xlib-renderer.c \
408	cogl-xlib.c \
409	cogl-xlib-private.h \
410	winsys/cogl-texture-pixmap-x11.c \
411	winsys/cogl-texture-pixmap-x11-private.h
412endif
413if SUPPORT_GLX
414cogl_nonintrospected_h += cogl-glx.h
415cogl_sources_c += \
416	cogl-glx-renderer-private.h \
417	cogl-glx-display-private.h \
418	winsys/cogl-winsys-glx-feature-functions.h \
419	winsys/cogl-winsys-glx-private.h \
420	winsys/cogl-winsys-glx.c
421endif
422if SUPPORT_WAYLAND_EGL_SERVER
423cogl_nonintrospected_h += cogl-wayland-server.h
424endif
425if SUPPORT_EGL_PLATFORM_XLIB
426cogl_sources_c += \
427	winsys/cogl-winsys-egl-x11.c \
428	winsys/cogl-winsys-egl-x11-private.h
429endif
430if SUPPORT_EGL
431cogl_nonintrospected_h += cogl-egl.h
432cogl_nodist_h += cogl-egl-defines.h
433
434cogl_sources_c += \
435	cogl-egl-private.h \
436	winsys/cogl-winsys-egl.c \
437	winsys/cogl-winsys-egl-feature-functions.h \
438	winsys/cogl-winsys-egl-private.h
439endif
440
441muffinlibdir = $(libdir)/muffin
442muffinlib_LTLIBRARIES = libmuffin-cogl-@MUFFIN_PLUGIN_API_VERSION@.la
443
444libmuffin_cogl_@MUFFIN_PLUGIN_API_VERSION@_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
445if UNIT_TESTS
446libmuffin_cogl_@MUFFIN_PLUGIN_API_VERSION@_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
447endif
448# XXX: The aim is to eventually get rid of all private API exports
449# for cogl-pango.
450libmuffin_cogl_@MUFFIN_PLUGIN_API_VERSION@_la_LDFLAGS = \
451	-no-undefined \
452	-avoid-version \
453	-export-dynamic \
454	-rpath $(muffinlibdir) \
455	-export-symbols-regex "^(cogl|_cogl_debug_flags|_cogl_atlas_new|_cogl_atlas_add_reorganize_callback|_cogl_atlas_reserve_space|_cogl_callback|_cogl_util_get_eye_planes_for_screen_poly|_cogl_atlas_texture_remove_reorganize_callback|_cogl_atlas_texture_add_reorganize_callback|_cogl_texture_get_format|_cogl_texture_foreach_sub_texture_in_region|_cogl_texture_set_region|_cogl_profile_trace_message|_cogl_context_get_default|_cogl_framebuffer_get_stencil_bits|_cogl_clip_stack_push_rectangle|_cogl_framebuffer_get_modelview_stack|_cogl_object_default_unref|_cogl_pipeline_foreach_layer_internal|_cogl_clip_stack_push_primitive|_cogl_buffer_unmap_for_fill_or_fallback|_cogl_framebuffer_draw_primitive|_cogl_debug_instances|_cogl_framebuffer_get_projection_stack|_cogl_pipeline_layer_get_texture|_cogl_buffer_map_for_fill_or_fallback|_cogl_texture_can_hardware_repeat|_cogl_pipeline_prune_to_n_layers|_cogl_primitive_draw|test_|unit_test_|_cogl_winsys_glx_get_vtable|_cogl_winsys_egl_xlib_get_vtable|_cogl_winsys_egl_get_vtable|_cogl_closure_disconnect|_cogl_onscreen_notify_complete|_cogl_onscreen_notify_frame_sync|_cogl_winsys_egl_renderer_connect_common|_cogl_winsys_error_quark|_cogl_set_error|_cogl_poll_renderer_add_fd|_cogl_poll_renderer_add_idle|_cogl_framebuffer_winsys_update_size|_cogl_winsys_egl_make_current|_cogl_winsys_egl_ensure_current|_cogl_pixel_format_get_bytes_per_pixel).*"
456
457libmuffin_cogl_@MUFFIN_PLUGIN_API_VERSION@_la_SOURCES = $(cogl_sources_c)
458nodist_libmuffin_cogl_@MUFFIN_PLUGIN_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
459
460# Cogl installed headers
461cogl_headers = \
462	$(cogl_1_public_h) \
463	cogl-deprecated.h \
464	cogl-pango.h \
465	$(NULL)
466
467cogl_base_includedir = $(includedir)/muffin
468cogldeprecatedincludedir = $(cogl_base_includedir)/cogl/cogl/deprecated
469cogldeprecatedinclude_HEADERS = $(cogl_deprecated_h) $(cogl_deprecated_nonintrospected_h)
470
471coglincludedir = $(cogl_base_includedir)/cogl/cogl
472coglinclude_HEADERS = $(cogl_headers) $(cogl_nonintrospected_h)
473nodist_coglinclude_HEADERS = $(cogl_nodist_h) cogl-defines.h
474
475cogl_proto_includedir = $(cogl_base_includedir)/cogl/cogl/gl-prototypes
476cogl_proto_include_HEADERS = $(cogl_gl_prototypes_h)
477
478EXTRA_DIST += \
479	cogl.symbols
480
481-include $(INTROSPECTION_MAKEFILE)
482
483INTROSPECTION_GIRS =
484
485if HAVE_INTROSPECTION
486Cogl-@MUFFIN_PLUGIN_API_VERSION@.gir: libmuffin-cogl-$(MUFFIN_PLUGIN_API_VERSION).la Makefile
487
488Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_NAMESPACE = Cogl
489Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_VERSION = $(MUFFIN_PLUGIN_API_VERSION)
490Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_LIBS = libmuffin-cogl-$(MUFFIN_PLUGIN_API_VERSION).la
491if UNIT_TESTS
492Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
493endif
494Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_FILES = $(cogl_1_public_h)
495
496Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -D__COGL_EGL_H_INSIDE__ -D__COGL_GLX_H_INSIDE__ -DCOGL_GIR_SCANNING
497Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0
498Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_EXPORT_PACKAGES = muffin-cogl-@MUFFIN_PLUGIN_API_VERSION@
499Cogl_@MUFFIN_PLUGIN_API_VERSION@_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
500
501INTROSPECTION_GIRS += Cogl-@MUFFIN_PLUGIN_API_VERSION@.gir
502
503girdir = $(muffinlibdir)
504gir_DATA = $(INTROSPECTION_GIRS)
505
506typelibdir = $(muffinlibdir)
507typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
508
509CLEANFILES += $(gir_DATA) $(typelib_DATA)
510endif
511