Re: [Mesa-dev] [PATCHv2 automake] gallium/auxiliary: Add possibility to build libgallium shared.

2012-12-04 Thread Michel Dänzer
On Die, 2012-12-04 at 02:45 +0100, Johannes Obermayr wrote: 
 
 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

This should probably be something like libgallium-major-minor.la, so
binaries from different versions can be used in parallel.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCHv2 automake] gallium/auxiliary: Add possibility to build libgallium shared.

2012-12-03 Thread Johannes Obermayr
---
 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

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev