From 1ed1d4fc6a3faa0a26ea06d0e741549c20010ef2 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 8 Oct 2009 12:08:21 +0100 Subject: [PATCH] build: expose automake conditionals for cogl winsys Expose the ./configured window system/backend options to the Cogl automake files via some new SUPPORT_XYZ conditionals. --- cogl/Makefile.am | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/cogl/Makefile.am b/cogl/Makefile.am index 058551d77..43934ad33 100644 --- a/cogl/Makefile.am +++ b/cogl/Makefile.am @@ -71,20 +71,8 @@ cogl_public_h = \ $(srcdir)/cogl.h \ $(NULL) -# windowing system; all sources have to be distributed, but we'll -# compile just the one we need -cogl_winsys_sources = \ - $(srcdir)/winsys/cogl-eglnative.c \ - $(srcdir)/winsys/cogl-eglx.c \ - $(srcdir)/winsys/cogl-glx.c \ - $(srcdir)/winsys/cogl-osx.c \ - $(srcdir)/winsys/cogl-sdl.c \ - $(srcdir)/winsys/cogl-win32.c \ - $(NULL) - cogl_sources_c = \ $(srcdir)/winsys/cogl-winsys.h \ - $(srcdir)/winsys/cogl-@COGL_WINSYS@.c \ $(srcdir)/cogl-handle.h \ $(srcdir)/cogl-context.h \ $(srcdir)/cogl-context.c \ @@ -161,7 +149,31 @@ libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) $(top_builddir)/clutter/cogl/cog libclutter_cogl_la_SOURCES = $(BUILT_SOURCES) $(cogl_sources_c) -EXTRA_DIST += $(cogl_winsys_sources) +if SUPPORT_GLX +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-glx.c +endif +if SUPPORT_EGL_PLATFORM_POWERVR_X11 +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-eglx.c +endif +if SUPPORT_EGL_PLATFORM_POWERVR_NULL +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-eglnative.c +endif +if SUPPORT_EGL_PLATFORM_FRUITY +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-fruity.c +endif +if SUPPORT_WIN32 +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-win32.c +endif +if SUPPORT_OSX +libclutter_cogl_la_SOURCES += \ + $(srcdir)/winsys/cogl-osx.c +endif + EXTRA_DIST += stb_image.c # COGL installed headers