summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-05-12 10:17:06 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-05-23 15:24:04 +0100
commit45f9aae004f7bd723c3f313ee3dd8a25aa420ffa (patch)
tree1dc94055f8be1c6bfbc8671c914cea2f0c5d1681 /src/glx
parentff90a8784cf22ada7bba75f90460b063818abda7 (diff)
Make DRI dependencies and build depend on the target
- Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. v2: Place xfont.c and drisw_glx.c into correct categories. Update 'make check' as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/Makefile.am28
-rw-r--r--src/glx/tests/Makefile.am6
2 files changed, 27 insertions, 7 deletions
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index 0cf65e50732..4553de01a17 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -82,24 +82,40 @@ libglx_la_SOURCES = \
single2.c \
singlepix.c \
vertarr.c \
- xfont.c \
glx_pbuffer.c \
glx_query.c \
- drisw_glx.c \
- dri_common.c \
+ glxhash.c
+
+if HAVE_DRISW
+libglx_la_SOURCES += \
+ drisw_glx.c
+endif
+
+if HAVE_DRICOMMON
+libglx_la_SOURCES += \
+ xfont.c \
+ dri_common.c
+endif
+
+if HAVE_DRI2
+libglx_la_SOURCES += \
dri_glx.c \
XF86dri.c \
- glxhash.c \
dri2_glx.c \
dri2.c \
- dri2_query_renderer.c \
- applegl_glx.c
+ dri2_query_renderer.c
+endif
if HAVE_DRI3
libglx_la_SOURCES += \
dri3_glx.c
endif
+if HAVE_APPLEDRI
+libglx_la_SOURCES += \
+ applegl_glx.c
+endif
+
libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
GL_LIBS = \
diff --git a/src/glx/tests/Makefile.am b/src/glx/tests/Makefile.am
index 4dc358c3261..3599b3d55e8 100644
--- a/src/glx/tests/Makefile.am
+++ b/src/glx/tests/Makefile.am
@@ -20,9 +20,13 @@ glx_test_SOURCES = \
enum_sizes.cpp \
fake_glx_screen.cpp \
indirect_api.cpp \
- query_renderer_implementation_unittest.cpp \
query_renderer_unittest.cpp
+if HAVE_DRI2
+glx_test_SOURCES += \
+ query_renderer_implementation_unittest.cpp
+endif
+
glx_test_LDADD = \
$(top_builddir)/src/glx/libglx.la \
$(top_builddir)/src/gtest/libgtest.la \