[Mesa-dev] [PATCH v2] gbm: fix linking
Armin K
krejzi at email.com
Sun Aug 11 08:27:23 PDT 2013
Link to internal libwayland-drm library if Wayland
EGL platform is enabled. The library needs to be
built before gbm.
Link to libdrm if gbm_dri is enabled, otherwise
library will report undefined references to
libdrm symbols when using libgbm without
libdrm.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67962
---
src/Makefile.am | 4 ++++
src/egl/Makefile.am | 4 ----
src/gbm/Makefile.am | 3 ++-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b3dc44d..76280a0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,6 +29,10 @@ if HAVE_DRI_GLX
SUBDIRS += glx
endif
+if HAVE_EGL_PLATFORM_WAYLAND
+SUBDIRS += egl/wayland
+endif
+
if HAVE_GBM
SUBDIRS += gbm
endif
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index e6380ec..cff943f 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -21,8 +21,4 @@
SUBDIRS=
-if HAVE_EGL_PLATFORM_WAYLAND
-SUBDIRS += wayland
-endif
-
SUBDIRS += drivers main
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index e22c55c..1282b14 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -24,6 +24,7 @@ libgbm_la_LIBADD = $(LIBUDEV_LIBS) $(LIBKMS_LIBS) $(DLOPEN_LIBS)
if HAVE_EGL_PLATFORM_WAYLAND
AM_CPPFLAGS = -DHAVE_WAYLAND_PLATFORM
AM_CFLAGS += $(WAYLAND_CFLAGS)
+libgbm_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la $(WAYLAND_LIBS)
endif
if HAVE_DRI
@@ -38,7 +39,7 @@ libgbm_dri_la_CFLAGS = \
$(LIBDRM_CFLAGS)
libgbm_la_LIBADD += \
- libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la
+ libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la $(LIBDRM_LIBS)
endif
all-local: libgbm.la
--
1.8.3.4
More information about the mesa-dev
mailing list