mutter/common/Makefile.am
Emmanuele Bassi 9e9c615e49 Add runtime debug messages for COGL
Clutter is able to show debug messages written using the CLUTTER_NOTE()
macro at runtime, either by using an environment variable:

  CLUTTER_DEBUG=...

or by using a command line switch:

  --clutter-debug=...
  --clutter-no-debug=...

Both are parsed during the initialization process by using the
GOption API.

COGL would benefit from having the same support.

In order to do this, we need a cogl_get_option_group() function in
COGL that sets up a GOptionGroup for COGL and adds a pre-parse hook
that will check the COGL_DEBUG environment variable. The OptionGroup
will also install two command line switches:

  --cogl-debug
  --cogl-no-debug

With the same semantics of the Clutter ones.

During Clutter initialization, the COGL option group will be attached
to the GOptionContext used to parse the command line options passed
to a Clutter application.

Every debug message written using:

  COGL_NOTE (SECTION, "message format", arguments);

Will then be printed only if SECTION was enabled at runtime.

This whole machinery, like the equivalent one in Clutter, depends on
a compile time switch, COGL_ENABLE_DEBUG, which is enabled at the same
time as CLUTTER_ENABLE_DEBUG. Having two different symbols allows
greater granularity.
2009-02-23 13:00:52 +00:00

40 lines
960 B
Makefile

INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/clutter \
-I$(top_srcdir)/clutter/cogl \
-I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \
-I$(top_builddir)/clutter \
-I$(top_builddir)/clutter/cogl \
-DG_LOG_DOMAIN=\"Cogl-Common\" \
-DCLUTTER_COMPILATION \
$(CLUTTER_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \
$(MAINTAINER_CFLAGS) \
$(GCC_FLAGS)
LDADD = $(CLUTTER_LIBS)
noinst_LTLIBRARIES = libclutter-cogl-common.la
EXTRA_DIST = stb_image.c
libclutter_cogl_common_la_SOURCES = \
cogl-handle.h \
cogl-util.h \
cogl-util.c \
cogl-bitmap.h \
cogl-bitmap.c \
cogl-bitmap-fallback.c \
cogl-primitives.h \
cogl-primitives.c \
cogl-bitmap-pixbuf.c \
cogl-clip-stack.h \
cogl-clip-stack.c \
cogl-fixed.c \
cogl-color.c \
cogl-vertex-buffer-private.h \
cogl-vertex-buffer.c \
cogl-matrix.c \
cogl-material.c \
cogl-material-private.h \
cogl-debug.c