Tizen 2.0 Release
[profile/ivi/osmesa.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 common.c
8
9 EGL_INCLUDES = \
10         -I$(TOP)/include \
11         -I$(TOP)/src/egl/main \
12         -I$(TOP)/src/mapi \
13         -I$(TOP)/src/gbm/main \
14         -I$(TOP)/src/gbm/backends/dri \
15         -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
16         $(LIBUDEV_CFLAGS) \
17         $(LIBDRM_CFLAGS)
18
19 EGL_LIBS = $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
20
21 EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2
22 EGL_BUILTIN = true
23
24 ifeq ($(SHARED_GLAPI),1)
25 EGL_CFLAGS += -DHAVE_SHARED_GLAPI
26 endif
27
28 ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
29 EGL_SOURCES += platform_x11.c
30 EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS)
31 EGL_LIBS +=  $(XCB_DRI2_LIBS)
32 endif
33
34 ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
35 EGL_SOURCES += platform_drm.c
36 EGL_INCLUDES += -DHAVE_DRM_PLATFORM
37 endif
38
39 ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
40 EGL_SOURCES += platform_wayland.c
41 EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
42                 -I$(TOP)/src/egl/wayland/wayland-egl \
43                 -I$(TOP)/src/egl/wayland/wayland-drm
44 EGL_LIBS += $(WAYLAND_LIBS) \
45             $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
46 endif
47
48 include ../Makefile.template