build: Make COGL pass distcheck

Some changes to make COGL pass distcheck with Automake 1.11 and
anal-retentiveness turned up to 11.

The "major" change is the flattening of the winsys/ part of COGL,
which is built directly inside libclutter-cogl.la instead of an
intermediate libclutter-cogl-winsys.la object.

Ideally, the whole COGL should be flattened out using a
quasi-non-recursive Automake layout; unfortunately, the driver/
sub-section ships with identical targets and Automake cannot
distinguish GL and GLES objects.
This commit is contained in:
Emmanuele Bassi 2009-10-23 12:15:25 +01:00
parent 6cff24f437
commit fcce833606
2 changed files with 98 additions and 141 deletions

View File

@ -2,12 +2,14 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent
NULL = NULL =
SUBDIRS = winsys driver SUBDIRS = driver
BUILT_SOURCES = cogl.h BUILT_SOURCES = cogl.h
EXTRA_DIST = cogl.h.in cogl.pc.in EXTRA_DIST = cogl.h.in cogl.pc.in
CLEANFILES =
DISTCLEANFILES =
# pkg-config ==================================================================
pc_files = \ pc_files = \
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc \ cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc \
cogl-$(CLUTTER_API_VERSION).pc cogl-$(CLUTTER_API_VERSION).pc
@ -21,116 +23,114 @@ cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc: cogl.pc
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files) pkgconfig_DATA = $(pc_files)
CLEANFILES = $(pc_files) CLEANFILES += $(pc_files)
INCLUDES = \ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(srcdir) \ -I$(top_srcdir)/clutter/cogl \
-I$(srcdir)/.. \ -I$(srcdir)/winsys \
-I$(srcdir)/winsys \ -I$(srcdir)/driver/$(COGL_DRIVER) \
-I$(srcdir)/driver/$(COGL_DRIVER) \
-I. \
-I.. \
-DG_DISABLE_SINGLE_INCLUDES \
-DG_LOG_DOMAIN=\"Cogl-Core\" \
-DCLUTTER_COMPILATION
cogl_public_h = \
$(srcdir)/cogl-bitmap.h \
$(srcdir)/cogl-color.h \
$(srcdir)/cogl-debug.h \
$(srcdir)/cogl-fixed.h \
$(srcdir)/cogl-material.h \
$(srcdir)/cogl-matrix.h \
$(srcdir)/cogl-offscreen.h \
$(srcdir)/cogl-path.h \
$(srcdir)/cogl-shader.h \
$(srcdir)/cogl-texture.h \
$(srcdir)/cogl-types.h \
$(srcdir)/cogl-vertex-buffer.h \
cogl.h \
$(NULL) $(NULL)
cogl-enum-types.h: stamp-cogl-enum-types.h # public headers
@true cogl_public_h = \
stamp-cogl-enum-types.h: $(cogl_public_h) Makefile $(srcdir)/cogl-bitmap.h \
$(QUIET_GEN)( $(GLIB_MKENUMS) \ $(srcdir)/cogl-color.h \
--template $(srcdir)/cogl-enum-types.h.in \ $(srcdir)/cogl-debug.h \
$(cogl_public_h) ) > xgen-ceth \ $(srcdir)/cogl-fixed.h \
&& (cmp -s xgen-ceth cogl-enum-types.h || cp -f xgen-ceth cogl-enum-types.h) \ $(srcdir)/cogl-material.h \
&& rm -f xgen-ceth \ $(srcdir)/cogl-matrix.h \
&& echo timestamp > $(@F) $(srcdir)/cogl-offscreen.h \
$(srcdir)/cogl-path.h \
$(srcdir)/cogl-shader.h \
$(srcdir)/cogl-texture.h \
$(srcdir)/cogl-types.h \
$(srcdir)/cogl-vertex-buffer.h \
$(top_builddir)/clutter/cogl/cogl/cogl.h \
$(NULL)
cogl-enum-types.c: cogl-enum-types.h # windowing system; all sources have to be distributed, but we'll
$(QUIET_GEN)( $(GLIB_MKENUMS) \ # compile just the one we need
--template $(srcdir)/cogl-enum-types.c.in \ cogl_winsys_sources = \
$(cogl_public_h) ) > xgen-cetc \ $(srcdir)/winsys/cogl-eglnative.c \
&& cp -f xgen-cetc cogl-enum-types.c \ $(srcdir)/winsys/cogl-eglx.c \
&& rm -f xgen-cetc $(srcdir)/winsys/cogl-glx.c \
$(srcdir)/winsys/cogl-osx.c \
$(srcdir)/winsys/cogl-sdl.c \
$(srcdir)/winsys/cogl-win32.c \
$(NULL)
BUILT_SOURCES += cogl-enum-types.h cogl-enum-types.c # glib-mkenums rules
glib_enum_h = cogl-enum-types.h
glib_enum_c = cogl-enum-types.c
glib_enum_headers = $(cogl_public_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
noinst_LTLIBRARIES = libclutter-cogl.la noinst_LTLIBRARIES = libclutter-cogl.la
libclutter_cogl_la_CPPFLAGS = \ libclutter_cogl_la_CPPFLAGS = \
$(CLUTTER_CFLAGS) \ $(COGL_DEBUG_CFLAGS) \
$(COGL_DEBUG_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \ $(MAINTAINER_CFLAGS) \
$(MAINTAINER_CFLAGS) -DG_DISABLE_SINGLE_INCLUDES \
libclutter_cogl_la_LIBADD = \ -DG_LOG_DOMAIN=\"Cogl-$(COGL_WINSYS)\" \
-lm $(CLUTTER_LIBS) \ -DCLUTTER_COMPILATION
winsys/libclutter-cogl-winsys.la \
driver/$(COGL_DRIVER)/libclutter-cogl-driver.la libclutter_cogl_la_CFLAGS = $(CLUTTER_CFLAGS)
# os/$(COGL_DRIVER)/libclutter-cogl-os.la
libclutter_cogl_la_SOURCES = \ libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) \
cogl-enum-types.h \ $(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/libclutter-cogl-driver.la
cogl-enum-types.c \
cogl-handle.h \ libclutter_cogl_la_SOURCES = \
cogl-context.h \ $(srcdir)/winsys/cogl-winsys.h \
cogl-context.c \ $(srcdir)/winsys/cogl-@COGL_WINSYS@.c \
cogl-internal.h \ $(srcdir)/cogl-handle.h \
cogl.c \ $(srcdir)/cogl-context.h \
cogl-util.h \ $(srcdir)/cogl-context.c \
cogl-util.c \ $(srcdir)/cogl-internal.h \
cogl-bitmap-private.h \ $(srcdir)/cogl.c \
cogl-bitmap.c \ $(srcdir)/cogl-util.h \
cogl-bitmap-fallback.c \ $(srcdir)/cogl-util.c \
cogl-primitives.h \ $(srcdir)/cogl-bitmap-private.h \
cogl-primitives.c \ $(srcdir)/cogl-bitmap.c \
cogl-bitmap-pixbuf.c \ $(srcdir)/cogl-bitmap-fallback.c \
cogl-clip-stack.h \ $(srcdir)/cogl-primitives.h \
cogl-clip-stack.c \ $(srcdir)/cogl-primitives.c \
cogl-fixed.c \ $(srcdir)/cogl-bitmap-pixbuf.c \
cogl-color.c \ $(srcdir)/cogl-clip-stack.h \
cogl-vertex-buffer-private.h \ $(srcdir)/cogl-clip-stack.c \
cogl-vertex-buffer.c \ $(srcdir)/cogl-fixed.c \
cogl-matrix.c \ $(srcdir)/cogl-color.c \
cogl-matrix-stack.c \ $(srcdir)/cogl-vertex-buffer-private.h \
cogl-matrix-stack.h \ $(srcdir)/cogl-vertex-buffer.c \
cogl-material.c \ $(srcdir)/cogl-matrix.c \
cogl-material-private.h \ $(srcdir)/cogl-matrix-stack.c \
cogl-blend-string.c \ $(srcdir)/cogl-matrix-stack.h \
cogl-blend-string.h \ $(srcdir)/cogl-material.c \
cogl-debug.c \ $(srcdir)/cogl-material-private.h \
cogl-texture-private.h \ $(srcdir)/cogl-blend-string.c \
cogl-texture-2d-sliced-private.h \ $(srcdir)/cogl-blend-string.h \
cogl-texture-driver.h \ $(srcdir)/cogl-debug.c \
cogl-texture.c \ $(srcdir)/cogl-texture-private.h \
cogl-texture-2d-sliced.c \ $(srcdir)/cogl-texture-2d-sliced-private.h \
cogl-spans.h \ $(srcdir)/cogl-texture-driver.h \
cogl-spans.c \ $(srcdir)/cogl-texture.c \
cogl-journal-private.h \ $(srcdir)/cogl-texture-2d-sliced.c \
cogl-journal.c \ $(srcdir)/cogl-spans.h \
$(srcdir)/cogl-spans.c \
$(srcdir)/cogl-journal-private.h \
$(srcdir)/cogl-journal.c \
$(BUILT_SOURCES) \
$(NULL) $(NULL)
EXTRA_DIST += stb_image.c cogl-enum-types.h.in cogl-enum-types.c.in EXTRA_DIST += $(cogl_winsys_sources)
CLEANFILES += stamp-cogl-enum-types.h
DISTCLEANFILES = cogl-enum-types.h cogl-enum-types.c EXTRA_DIST += stb_image.c
# COGL installed headers # COGL installed headers
cogl_headers = \ cogl_headers = \
$(cogl_public_h) \ $(cogl_public_h) \
cogl-deprecated.h \ $(srcdir)/cogl-deprecated.h \
cogl-defines-@COGL_DRIVER@.h \ cogl-defines-$(COGL_DRIVER).h \
cogl-enum-types.h \ cogl-enum-types.h \
$(NULL) $(NULL)

View File

@ -1,43 +0,0 @@
include $(top_srcdir)/build/autotools/Makefile.am.silent
NULL =
INCLUDES = \
-I$(top_srcdir) \
-I$(srcdir) \
-I$(srcdir)/.. \
-I$(srcdir)/../driver/$(COGL_DRIVER) \
-I$(srcdir)/../.. \
-I.. \
-I../.. \
-DG_DISABLE_SINGLE_INCLUDES \
-DG_LOG_DOMAIN=\"Cogl-Winsys\" \
-DCLUTTER_COMPILATION
noinst_LTLIBRARIES = libclutter-cogl-winsys.la
# Automake can't determine the full list if we are using autoconf substitutions
# to specify the files required for libclutter-cogl-winsys
all_winsys_sources = \
cogl-glx.c \
cogl-eglx.c \
cogl-eglnative.c \
cogl-sdl.c \
cogl-win32.c \
cogl-osx.c \
cogl-winsys.h
$(NULL)
libclutter_cogl_winsys_la_CPPFLAGS = \
$(CLUTTER_CFLAGS) \
$(COGL_DEBUG_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \
$(MAINTAINER_CFLAGS)
libclutter_cogl_winsys_la_LIBADD = -lm $(CLUTTER_LIBS)
libclutter_cogl_winsys_la_SOURCES = \
cogl-@COGL_WINSYS@.h \
cogl-@COGL_WINSYS@.c \
$(NULL)
EXTRA_DIST=$(all_winsys_sources)