summaryrefslogtreecommitdiffstats
path: root/src/gbm/main
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2011-05-26 15:10:50 +0200
committerBenjamin Franzke <[email protected]>2011-06-23 21:07:17 +0200
commit2ff797060d4ffbe1c1bf5b605ea5d4f9e588da41 (patch)
treeede1ca9d95366dd23dd1a41b9fe627c953d044e8 /src/gbm/main
parenteddcecbf74da26716509c047b95e85b00c12bab4 (diff)
gbm: Add dri backend
Diffstat (limited to 'src/gbm/main')
-rw-r--r--src/gbm/main/Makefile5
-rw-r--r--src/gbm/main/backend.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gbm/main/Makefile b/src/gbm/main/Makefile
index 277fba18eee..5130b9b5df2 100644
--- a/src/gbm/main/Makefile
+++ b/src/gbm/main/Makefile
@@ -23,6 +23,11 @@ LOCAL_CFLAGS = $(LIBUDEV_CFLAGS) $(DLOPEN_CFLAGS) \
-D_OS_UNIX=1 -DMODULEDIR='"$(GBM_BACKEND_INSTALL_DIR)"'
LOCAL_LIBS =
+# Builtin backends
+ifeq ($(filter dri, $(GBM_BACKEND_DIRS)),dri)
+LOCAL_LIBS += $(TOP)/src/gbm/backends/dri/libgbm_dri.a
+endif
+
.c.o:
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
index 2079bbb710d..84db9e847a9 100644
--- a/src/gbm/main/backend.c
+++ b/src/gbm/main/backend.c
@@ -36,12 +36,15 @@
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
+extern const struct gbm_backend gbm_dri_backend;
+
struct backend_desc {
const char *name;
const struct gbm_backend *builtin;
};
static const struct backend_desc backends[] = {
+ { "gbm_dri.so", &gbm_dri_backend },
};
static const void *