1# Copyright © 2012 Intel Corporation 2# 3# Permission is hereby granted, free of charge, to any person obtaining a 4# copy of this software and associated documentation files (the "Software"), 5# to deal in the Software without restriction, including without limitation 6# the rights to use, copy, modify, merge, publish, distribute, sublicense, 7# and/or sell copies of the Software, and to permit persons to whom the 8# Software is furnished to do so, subject to the following conditions: 9# 10# The above copyright notice and this permission notice (including the next 11# paragraph) shall be included in all copies or substantial portions of the 12# Software. 13# 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20# IN THE SOFTWARE. 21 22GLAPI_LIB = ../mapi/glapi/libglapi.la 23 24if HAVE_XF86VIDMODE 25EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE 26endif 27 28AM_CFLAGS = \ 29 -I$(top_srcdir)/include \ 30 -I$(top_srcdir)/src/gbm/main \ 31 $(DEFINES) \ 32 $(EGL_CFLAGS) \ 33 -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \ 34 -D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \ 35 -D_EGL_OS_UNIX=1 36 37lib_LTLIBRARIES = libEGL.la 38 39libEGL_la_SOURCES = \ 40 eglapi.c \ 41 eglarray.c \ 42 eglconfig.c \ 43 eglcontext.c \ 44 eglcurrent.c \ 45 egldisplay.c \ 46 egldriver.c \ 47 eglfallbacks.c \ 48 eglglobals.c \ 49 eglimage.c \ 50 egllog.c \ 51 eglmisc.c \ 52 eglmode.c \ 53 eglscreen.c \ 54 eglstring.c \ 55 eglsurface.c \ 56 eglsync.c \ 57 eglcompiler.h \ 58 eglconfig.h \ 59 eglcontext.h \ 60 eglcurrent.h \ 61 egldefines.h \ 62 egldisplay.h \ 63 egldriver.h \ 64 eglglobals.h \ 65 eglimage.h \ 66 egllog.h \ 67 eglmisc.h \ 68 eglmode.h \ 69 eglmutex.h \ 70 eglscreen.h \ 71 eglstring.h \ 72 eglsurface.h \ 73 eglsync.h 74 75libEGL_la_LIBADD = \ 76 $(EGL_LIB_DEPS) 77libEGL_la_LDFLAGS = -version-number 1:0 -no-undefined 78 79if HAVE_EGL_PLATFORM_X11 80AM_CFLAGS += -DHAVE_X11_PLATFORM 81AM_CFLAGS += $(XCB_DRI2_CFLAGS) 82libEGL_la_LIBADD += $(XCB_DRI2_LIBS) 83endif 84 85if HAVE_EGL_PLATFORM_WAYLAND 86AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM 87AM_CFLAGS += $(WAYLAND_CFLAGS) 88libEGL_la_LIBADD += $(WAYLAND_LIBS) 89libEGL_la_LIBADD += $(LIBDRM_LIBS) 90libEGL_la_LIBADD += ../wayland/wayland-drm/libwayland-drm.la 91endif 92 93if HAVE_EGL_PLATFORM_DRM 94AM_CFLAGS += -DHAVE_DRM_PLATFORM 95libEGL_la_LIBADD += ../../gbm/libgbm.la 96endif 97 98if HAVE_EGL_PLATFORM_FBDEV 99AM_CFLAGS += -DHAVE_FBDEV_PLATFORM 100endif 101 102if HAVE_EGL_PLATFORM_NULL 103AM_CFLAGS += -DHAVE_NULL_PLATFORM 104endif 105 106if HAVE_EGL_DRIVER_GLX 107AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX 108libEGL_la_LIBADD += ../drivers/glx/libegl_glx.la 109libEGL_la_LIBADD += $(X11_LIBS) $(DLOPEN_LIBS) 110endif 111 112if HAVE_EGL_DRIVER_DRI2 113AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2 114AM_CFLAGS += -DHAVE_XCB_DRI2 115libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la 116libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS) 117endif 118 119# Provide compatibility with scripts for the old Mesa build system for 120# a while by putting a link to the driver into /lib of the build tree. 121all-local: libEGL.la 122 $(MKDIR_P) $(top_builddir)/$(LIB_DIR); 123 ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1 124 ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so 125 126pkgconfigdir = $(libdir)/pkgconfig 127 128pkgconfig_DATA = egl.pc 129 130khrdir = $(includedir)/KHR 131khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h 132 133egldir = $(includedir)/EGL 134egl_HEADERS = \ 135 $(top_srcdir)/include/EGL/eglext.h \ 136 $(top_srcdir)/include/EGL/egl.h \ 137 $(top_srcdir)/include/EGL/eglmesaext.h \ 138 $(top_srcdir)/include/EGL/eglplatform.h 139