[Mesa-dev] [PATCHv2 automake] gallium/auxiliary: Add possibility to build libgallium shared.
Johannes Obermayr
johannesobermayr at gmx.de
Mon Dec 3 17:45:48 PST 2012
---
configure.ac | 7 +++++++
src/gallium/auxiliary/Makefile.am | 8 ++++++++
src/gallium/targets/opencl/Makefile.am | 2 +-
3 Dateien geändert, 16 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/configure.ac b/configure.ac
index 02aaa64..316d200 100644
--- a/configure.ac
+++ b/configure.ac
@@ -729,6 +729,13 @@ fi
AC_SUBST([SHARED_GLAPI])
AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
+AC_ARG_ENABLE([shared-gallium],
+ [AS_HELP_STRING([--enable-shared-gallium],
+ [Enable shared gallium core @<:@default=no@:>@])],
+ [enable_shared_gallium="$enableval"],
+ [enable_shared_gallium=no])
+AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test x$enable_shared_gallium = xyes)
+
dnl
dnl Driver specific build directories
dnl
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index a4eee47..0e34bee 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -3,8 +3,16 @@ AUTOMAKE_OPTIONS = subdir-objects
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
+if HAVE_SHARED_GALLIUM
+
+lib_LTLIBRARIES = libgallium.la
+
+else
+
noinst_LTLIBRARIES = libgallium.la
+endif
+
AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
$(GALLIUM_CFLAGS)
diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
index 596a83a..b8cae2b 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -8,7 +8,7 @@ libOpenCL_la_LDFLAGS = \
libOpenCL_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/clover/libclover.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.a \
+ $(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(GALLIUM_PIPE_LOADER_LIBS) $(LIBUDEV_LIBS) \
-ldl \
-lclangCodeGen \
--
1.7.10.4
More information about the mesa-dev
mailing list