build: distinguish CLUTTER_WINSYS and CLUTTER_SONAME_INFIX
This adds a separate variable name "CLUTTER_SONAME_INFIX" to define the infix for the clutter library that gets linked. Currently the WINSYS corresponds to the directory we enter when building to compile the window system and input support, but it is desirable to be able to define multiple flavours that use the same WINSYS but should result in different library names. For example we are planning to combine the eglx and eglnative window systems into one "egl" winsys but we will need to preserve the current library names for the eglx and eglnative flavours.
This commit is contained in:
parent
4bd44738fd
commit
bf9d5f3949
@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I build/autotools
|
||||
|
||||
pcfiles = \
|
||||
clutter-$(CLUTTER_API_VERSION).pc \
|
||||
clutter-$(CLUTTER_WINSYS)-$(CLUTTER_API_VERSION).pc \
|
||||
clutter-$(CLUTTER_SONAME_INFIX)-$(CLUTTER_API_VERSION).pc \
|
||||
$(NULL)
|
||||
|
||||
# clutter-<major>.<minor>.pc - for generic dependencies
|
||||
@ -16,7 +16,7 @@ clutter-$(CLUTTER_API_VERSION).pc: clutter.pc
|
||||
$(QUIET_GEN)cp $< $@
|
||||
|
||||
# clutter-<winsys>-<major>.<minor>.pc - for backend-specific dependencies
|
||||
clutter-$(CLUTTER_WINSYS)-$(CLUTTER_API_VERSION).pc: clutter.pc
|
||||
clutter-$(CLUTTER_SONAME_INFIX)-$(CLUTTER_API_VERSION).pc: clutter.pc
|
||||
$(QUIET_GEN)cp $< $@
|
||||
|
||||
.PHONY: test-report full-report
|
||||
|
@ -6,12 +6,13 @@ apiversion=@CLUTTER_API_VERSION@
|
||||
requires=@CLUTTER_REQUIRES@
|
||||
backend=@CLUTTER_WINSYS@ #only kept for backward compatability
|
||||
winsys=@CLUTTER_WINSYS@
|
||||
soname_infix=@CLUTTER_SONAME_INFIX@
|
||||
cogl=@COGL_DRIVER@ #only kept for backward compatability
|
||||
cogl_driver=@COGL_DRIVER@
|
||||
|
||||
Name: Clutter
|
||||
Description: Clutter Core Library (${winsys}/${cogl_driver} backend)
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lclutter-${winsys}-${apiversion}
|
||||
Libs: -L${libdir} -lclutter-${soname_infix}-${apiversion}
|
||||
Cflags: -I${includedir}/clutter-${apiversion}
|
||||
Requires: ${requires}
|
||||
|
@ -256,7 +256,7 @@ source_h_priv = \
|
||||
$(srcdir)/clutter-timeout-interval.h \
|
||||
$(NULL)
|
||||
|
||||
libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
||||
$(CLUTTER_LIBS) \
|
||||
$(top_builddir)/clutter/cogl/cogl/libclutter-cogl.la \
|
||||
$(top_builddir)/clutter/cogl/pango/libcoglpango.la \
|
||||
@ -264,7 +264,7 @@ libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
||||
$(clutter_json_libadd) \
|
||||
$(CLUTTER_WINSYS_BASE_LIB)
|
||||
|
||||
libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
||||
$(top_builddir)/clutter/cogl/cogl/libclutter-cogl.la \
|
||||
$(top_builddir)/clutter/cogl/pango/libcoglpango.la \
|
||||
$(top_builddir)/clutter/$(CLUTTER_WINSYS)/libclutter-$(CLUTTER_WINSYS).la \
|
||||
@ -272,17 +272,17 @@ libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
||||
$(CLUTTER_WINSYS_BASE_LIB) \
|
||||
$(win32_resources)
|
||||
|
||||
libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_SOURCES = \
|
||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \
|
||||
$(source_c) \
|
||||
$(source_h) \
|
||||
$(source_c_priv) \
|
||||
$(source_h_priv)
|
||||
|
||||
nodist_libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_SOURCES = \
|
||||
nodist_libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \
|
||||
$(built_source_c) \
|
||||
$(built_source_h)
|
||||
|
||||
libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
$(CLUTTER_LT_LDFLAGS) \
|
||||
$(GCOV_LDFLAGS) \
|
||||
-export-dynamic \
|
||||
@ -293,7 +293,7 @@ libclutter_@CLUTTER_WINSYS@_@CLUTTER_API_VERSION@_la_LDFLAGS = \
|
||||
|
||||
lib_LTLIBRARIES = $(CLUTTER_WINSYS_LIB)
|
||||
|
||||
EXTRA_LTLIBRARIES = libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la
|
||||
EXTRA_LTLIBRARIES = libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
||||
|
||||
clutterdir = $(includedir)/clutter-$(CLUTTER_API_VERSION)/clutter
|
||||
clutter_HEADERS = \
|
||||
@ -333,7 +333,7 @@ if HAVE_INTROSPECTION
|
||||
# subdir Makefile.am, so just extract them from cogl.h instead. The doc
|
||||
# comments for COGL are in the headers, so we don't need the source files.
|
||||
|
||||
Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la
|
||||
Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
||||
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
|
||||
--namespace Clutter --nsversion=@CLUTTER_API_VERSION@ \
|
||||
$(INCLUDES) \
|
||||
@ -348,7 +348,7 @@ Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_
|
||||
--include=PangoCairo-1.0 \
|
||||
--include=Cogl-@CLUTTER_API_VERSION@ \
|
||||
$(json_gir_include) \
|
||||
--library=libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la \
|
||||
--library=libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la \
|
||||
--libtool="$(top_builddir)/libtool" \
|
||||
--pkg gobject-2.0 \
|
||||
$(json_gir_pkg) \
|
||||
|
@ -158,6 +158,7 @@ AS_CASE([$CLUTTER_FLAVOUR],
|
||||
CLUTTER_WINSYS=glx
|
||||
CLUTTER_WINSYS_BASE=x11
|
||||
CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
|
||||
CLUTTER_SONAME_INFIX=glx
|
||||
|
||||
# Mesa 7.3 added a GL pkg-config file, finally
|
||||
PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
|
||||
@ -178,6 +179,7 @@ AS_CASE([$CLUTTER_FLAVOUR],
|
||||
CLUTTER_WINSYS=eglx
|
||||
CLUTTER_WINSYS_BASE=x11
|
||||
CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
|
||||
CLUTTER_SONAME_INFIX=eglx
|
||||
],
|
||||
|
||||
[eglnative],
|
||||
@ -199,6 +201,7 @@ AS_CASE([$CLUTTER_FLAVOUR],
|
||||
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS"
|
||||
|
||||
CLUTTER_WINSYS=eglnative
|
||||
CLUTTER_SONAME_INFIX=eglnative
|
||||
],
|
||||
|
||||
[fruity],
|
||||
@ -217,6 +220,7 @@ AS_CASE([$CLUTTER_FLAVOUR],
|
||||
FLAVOUR_LIBS="$FLAVOUR_LIBS -ObjC -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework CoreSurface -framework GraphicsServices -framework OpenGLES -framework LayerKit -framework UIKit"
|
||||
|
||||
CLUTTER_WINSYS=fruity
|
||||
CLUTTER_SONAME_INFIX=fruity
|
||||
],
|
||||
|
||||
[osx],
|
||||
@ -234,6 +238,7 @@ AS_CASE([$CLUTTER_FLAVOUR],
|
||||
FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
|
||||
|
||||
CLUTTER_WINSYS=osx
|
||||
CLUTTER_SONAME_INFIX=osx
|
||||
],
|
||||
|
||||
[win32],
|
||||
@ -257,6 +262,7 @@ AS_CASE([$CLUTTER_FLAVOUR],
|
||||
fi
|
||||
|
||||
CLUTTER_WINSYS=win32
|
||||
CLUTTER_SONAME_INFIX=win32
|
||||
],
|
||||
|
||||
[AC_MSG_ERROR([Invalid backend for Clutter: use glx, osx, win32, eglx, eglnative or fruity])]
|
||||
@ -415,8 +421,9 @@ AC_SUBST([CLUTTER_WINSYS_BASE])
|
||||
AC_SUBST([CLUTTER_WINSYS_BASE_LIB])
|
||||
AC_SUBST(CLUTTER_GL_HEADER)
|
||||
AC_SUBST(CLUTTER_STAGE_TYPE)
|
||||
AC_SUBST(CLUTTER_SONAME_INFIX)
|
||||
|
||||
CLUTTER_WINSYS_LIB=libclutter-$CLUTTER_WINSYS-$CLUTTER_API_VERSION.la
|
||||
CLUTTER_WINSYS_LIB=libclutter-$CLUTTER_SONAME_INFIX-$CLUTTER_API_VERSION.la
|
||||
AC_SUBST([CLUTTER_WINSYS_LIB])
|
||||
|
||||
dnl === Clutter substitutions kept for backwards compatibility ================
|
||||
|
@ -147,7 +147,7 @@ expand_content_files= \
|
||||
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/clutter -I$(top_srcdir)/clutter/cogl -I$(top_builddir) -I$(top_builddir)/clutter -I$(top_builddir)/clutter/cogl $(CLUTTER_CFLAGS)
|
||||
GTKDOC_LIBS=$(top_builddir)/clutter/libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
|
||||
GTKDOC_LIBS=$(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
|
||||
|
||||
# This includes the standard gtk-doc make rules, copied by gtkdocize.
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
@ -107,7 +107,7 @@ test_conformance_CPPFLAGS = \
|
||||
|
||||
test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
|
||||
test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
|
||||
|
||||
test_conformance_LDFLAGS = -rdynamic
|
||||
|
||||
|
@ -94,7 +94,7 @@ INCLUDES = \
|
||||
-I$(top_builddir)/clutter \
|
||||
-I$(top_builddir)/clutter/cogl
|
||||
|
||||
common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la
|
||||
common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
||||
|
||||
noinst_PROGRAMS = test-interactive
|
||||
|
||||
|
@ -11,7 +11,7 @@ INCLUDES = \
|
||||
-I$(top_srcdir)/clutter/cogl \
|
||||
-I$(top_builddir)/clutter \
|
||||
-I$(top_builddir)/clutter/cogl
|
||||
LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la
|
||||
LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
||||
AM_CFLAGS = \
|
||||
$(CLUTTER_CFLAGS) \
|
||||
$(MAINTAINER_CFLAGS) \
|
||||
|
Loading…
Reference in New Issue
Block a user