egl_dri2: Use external driver pci list
[profile/ivi/mesa.git] / src / egl / drivers / dri2 / Makefile
1 # src/egl/drivers/dri2/Makefile
2
3 TOP = ../../../..
4 include $(TOP)/configs/current
5
6 EGL_DRIVER = egl_dri2
7 EGL_SOURCES = egl_dri2.c platform_drm.c common.c
8
9 EGL_INCLUDES = \
10         -I$(TOP)/include \
11         -I$(TOP)/src/egl/main \
12         -I$(TOP)/src/mapi \
13         -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
14         $(LIBUDEV_CFLAGS) \
15         $(LIBDRM_CFLAGS)
16
17 EGL_LIBS = $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
18
19 EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2
20 EGL_BUILTIN = true
21
22 ifeq ($(SHARED_GLAPI),1)
23 EGL_CFLAGS += -DHAVE_SHARED_GLAPI
24 endif
25
26 ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
27 EGL_SOURCES += platform_x11.c
28 EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS)
29 EGL_LIBS +=  $(XCB_DRI2_LIBS)
30 endif
31
32 ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
33 EGL_SOURCES += platform_wayland.c
34 EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
35                 -I$(TOP)/src/egl/wayland/wayland-egl \
36                 -I$(TOP)/src/egl/wayland/wayland-drm
37 EGL_LIBS += $(WAYLAND_LIBS) \
38             $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
39 endif
40
41 include ../Makefile.template