aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
diff options
context:
space:
mode:
authorEmil Velikov2014-09-07 11:54:39 -0500
committerEmil Velikov2014-09-28 11:09:34 -0500
commitf3fd11beaa70b0624ab1d6c7d8e25c65eea942ac (patch)
tree45ba3d2286daac712e1e55e72585c0037ddd64c8 /libkms
parentbe7d29717239f1b5230dffecf7060b57fcbab20a (diff)
downloadexternal-libdrm-f3fd11beaa70b0624ab1d6c7d8e25c65eea942ac.tar.gz
external-libdrm-f3fd11beaa70b0624ab1d6c7d8e25c65eea942ac.tar.xz
external-libdrm-f3fd11beaa70b0624ab1d6c7d8e25c65eea942ac.zip
libkms: build the intel backend only when needed
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'libkms')
-rw-r--r--libkms/Makefile.am5
-rw-r--r--libkms/linux.c16
2 files changed, 15 insertions, 6 deletions
diff --git a/libkms/Makefile.am b/libkms/Makefile.am
index 449a73ba..dae44e96 100644
--- a/libkms/Makefile.am
+++ b/libkms/Makefile.am
@@ -15,7 +15,6 @@ libkms_la_LIBADD = ../libdrm.la
15libkms_la_SOURCES = \ 15libkms_la_SOURCES = \
16 internal.h \ 16 internal.h \
17 linux.c \ 17 linux.c \
18 intel.c \
19 dumb.c \ 18 dumb.c \
20 api.c 19 api.c
21 20
@@ -23,6 +22,10 @@ if HAVE_VMWGFX
23libkms_la_SOURCES += vmwgfx.c 22libkms_la_SOURCES += vmwgfx.c
24endif 23endif
25 24
25if HAVE_INTEL
26libkms_la_SOURCES += intel.c
27endif
28
26if HAVE_NOUVEAU 29if HAVE_NOUVEAU
27libkms_la_SOURCES += nouveau.c 30libkms_la_SOURCES += nouveau.c
28endif 31endif
diff --git a/libkms/linux.c b/libkms/linux.c
index 17e1d588..77a0bbe9 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -103,25 +103,31 @@ linux_from_sysfs(int fd, struct kms_driver **out)
103 if (ret) 103 if (ret)
104 return ret; 104 return ret;
105 105
106#ifdef HAVE_INTEL
106 if (!strcmp(name, "intel")) 107 if (!strcmp(name, "intel"))
107 ret = intel_create(fd, out); 108 ret = intel_create(fd, out);
109 else
110#endif
108#ifdef HAVE_VMWGFX 111#ifdef HAVE_VMWGFX
109 else if (!strcmp(name, "vmwgfx")) 112 if (!strcmp(name, "vmwgfx"))
110 ret = vmwgfx_create(fd, out); 113 ret = vmwgfx_create(fd, out);
114 else
111#endif 115#endif
112#ifdef HAVE_NOUVEAU 116#ifdef HAVE_NOUVEAU
113 else if (!strcmp(name, "nouveau")) 117 if (!strcmp(name, "nouveau"))
114 ret = nouveau_create(fd, out); 118 ret = nouveau_create(fd, out);
119 else
115#endif 120#endif
116#ifdef HAVE_RADEON 121#ifdef HAVE_RADEON
117 else if (!strcmp(name, "radeon")) 122 if (!strcmp(name, "radeon"))
118 ret = radeon_create(fd, out); 123 ret = radeon_create(fd, out);
124 else
119#endif 125#endif
120#ifdef HAVE_EXYNOS 126#ifdef HAVE_EXYNOS
121 else if (!strcmp(name, "exynos")) 127 if (!strcmp(name, "exynos"))
122 ret = exynos_create(fd, out); 128 ret = exynos_create(fd, out);
123#endif
124 else 129 else
130#endif
125 ret = -ENOSYS; 131 ret = -ENOSYS;
126 132
127 free(name); 133 free(name);