aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-06-12 13:37:58 -0700
committerEric Anholt <[email protected]>2012-06-21 10:10:46 -0700
commit37c3cbe053809c7d615f86cde0599175c6d83545 (patch)
tree8b0c8dfa29ab3879474ebc7fd8b061399bb344f2
parent4113ac6a0f13338ee5f9c5fa0be13f37b515108d (diff)
dricore: Turn it into a normal library.
Our intention is still that it's not abi stable, so make the package version number get included in the library name. Now you can parallel install dricore-using drivers from multiple mesa versions. We can put it into lib now that we're following library versioning rules (assuming that ABIs don't change within a single Mesa point release). LD_LIBRARY_PATH still doesn't work with a non-/, non-/usr prefix because libtool uses rpath instead of runpath for nonstandard prefixes.
-rw-r--r--configs/current.in4
-rw-r--r--configs/default3
-rw-r--r--configure.ac14
-rw-r--r--src/mesa/libdricore/Makefile.am18
4 files changed, 11 insertions, 28 deletions
diff --git a/configs/current.in b/configs/current.in
index 6deedaa5e5a..f4858bdfa60 100644
--- a/configs/current.in
+++ b/configs/current.in
@@ -41,8 +41,6 @@ LLVM_LIBS = @LLVM_LIBS@
LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
GLW_CFLAGS = @GLW_CFLAGS@
GLX_TLS = @GLX_TLS@
-DRI_CFLAGS = @DRI_CFLAGS@
-DRI_CXXFLAGS = @DRI_CXXFLAGS@
# dlopen
DLOPEN_LIBS = @DLOPEN_LIBS@
@@ -124,8 +122,6 @@ GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drive
# Driver specific build vars
DRI_DIRS = @DRI_DIRS@
-DRICORE_LIBS = @DRICORE_LIBS@
-DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@
EGL_PLATFORMS = @EGL_PLATFORMS@
EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
diff --git a/configs/default b/configs/default
index bf67d347fe4..734b2f62e89 100644
--- a/configs/default
+++ b/configs/default
@@ -83,9 +83,6 @@ GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
VG_LIB_GLOB = $(VG_LIB_NAME)*
GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)*
-DRI_CFLAGS = $(CFLAGS)
-DRI_CXXFLAGS = $(CXXFLAGS)
-
# Optional assembly language optimization files for libGL
MESA_ASM_FILES =
diff --git a/configure.ac b/configure.ac
index 879a50702b4..b78eb155557 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1085,25 +1085,15 @@ AC_SUBST([GLAPI_LIB_DEPS])
dnl Setup default DRI CFLAGS
-DRI_CFLAGS='$(CFLAGS)'
-DRI_CXXFLAGS='$(CXXFLAGS)'
DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
MESA_MODULES='$(TOP)/src/mesa/libmesa.a'
if test "x$enable_dri" = xyes && test "x$driglx_direct" = xyes ; then
- DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so'
- DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR)'
- DRI_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore'
- DRI_CFLAGS='$(CFLAGS_NOVISIBILITY) -DUSE_DRICORE'
- DRI_CXXFLAGS='$(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE'
- MESA_MODULES='$(DRICORE_LIBS)'
+ DRI_LIB_DEPS="-L\$(TOP)/\$(LIB_DIR) -ldricore$VERSION"
+ MESA_MODULES="\$(TOP)/\$(LIB_DIR)/libdricore$VERSION.so"
HAVE_DRICORE=yes
fi
AM_CONDITIONAL(HAVE_DRICORE, test x$HAVE_DRICORE = xyes)
-AC_SUBST([DRICORE_LIBS])
-AC_SUBST([DRICORE_LIB_DEPS])
-AC_SUBST([DRI_CXXFLAGS])
-AC_SUBST([DRI_CFLAGS])
AC_SUBST([MESA_MODULES])
AC_SUBST([HAVE_XF86VIDMODE])
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
index 866f8f153b6..26d8a88fddc 100644
--- a/src/mesa/libdricore/Makefile.am
+++ b/src/mesa/libdricore/Makefile.am
@@ -32,13 +32,11 @@ AM_CPPFLAGS = \
$(API_DEFINES) \
$(DEFINES)
-dridir = $(libdir)/dri
-
AM_CFLAGS = $(CFLAGS_NOVISIBILITY) -DUSE_DRICORE
AM_CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE
AM_CCASFLAGS = $(CFLAGS_NOVISIBILITY) -DUSE_DRICORE
-libdricore_la_SOURCES = \
+libdricore@VERSION@_la_SOURCES = \
$(MESA_FILES) \
$(MESA_CXX_FILES) \
$(LIBGLCPP_GENERATED_FILES) \
@@ -47,8 +45,8 @@ libdricore_la_SOURCES = \
$(LIBGLSL_CXX_FILES) \
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
$(top_srcdir)/src/glsl/builtin_function.cpp
-libdricore_la_LDFLAGS = -module -avoid-version -shared
-libdricore_la_LIBADD = libdricore-asm.la
+libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
+libdricore@VERSION@_la_LIBADD = libdricore-asm.la
# This is separated from libdricore to avoid conflics in object
# outputs between main/clip.c and sparc/clip.c. The documented way to
@@ -72,16 +70,18 @@ endif
if HAVE_DRICORE
noinst_LTLIBRARIES = libdricore-asm.la
-dri_LTLIBRARIES = libdricore.la
+lib_LTLIBRARIES = libdricore@[email protected]
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree.
-all-local: libdricore.la
+all-local: libdricore@[email protected]
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
- ln -f .libs/libdricore.so $(top_builddir)/$(LIB_DIR)/libdricore.so;
+ ln -f .libs/libdricore@[email protected] $(top_builddir)/$(LIB_DIR)/libdricore@[email protected];
+ ln -sf libdricore@[email protected] $(top_builddir)/$(LIB_DIR)/libdricore@[email protected]
endif
CLEANFILES = \
- $(top_builddir)/$(LIB_DIR)/libdricore.so
+ $(top_builddir)/$(LIB_DIR)/libdricore@[email protected] \
+ $(top_builddir)/$(LIB_DIR)/libdricore@[email protected]
-include $(DEPENDS)