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 22include Makefile.sources 23 24AM_CFLAGS = \ 25 -I$(top_srcdir)/include \ 26 -I$(top_srcdir)/src/egl/main \ 27 -I$(top_srcdir)/src/gbm/main \ 28 -I$(top_srcdir)/src \ 29 $(DEFINES) \ 30 $(VISIBILITY_CFLAGS) \ 31 $(LIBDRM_CFLAGS) \ 32 $(EGL_CFLAGS) \ 33 -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) 34 35lib_LTLIBRARIES = libEGL.la 36 37libEGL_la_SOURCES = \ 38 $(LIBEGL_C_FILES) 39 40libEGL_la_LIBADD = \ 41 $(EGL_LIB_DEPS) 42libEGL_la_LDFLAGS = \ 43 -no-undefined \ 44 -version-number 1:0 \ 45 $(BSYMBOLIC) \ 46 $(GC_SECTIONS) \ 47 $(LD_NO_UNDEFINED) 48 49dri2_backend_FILES = 50dri3_backend_FILES = 51 52if HAVE_PLATFORM_X11 53AM_CFLAGS += -DHAVE_X11_PLATFORM 54AM_CFLAGS += $(XCB_DRI2_CFLAGS) 55libEGL_la_LIBADD += $(XCB_DRI2_LIBS) 56dri2_backend_FILES += drivers/dri2/platform_x11.c 57 58if HAVE_DRI3 59dri3_backend_FILES += \ 60 drivers/dri2/platform_x11_dri3.c \ 61 drivers/dri2/platform_x11_dri3.h 62 63libEGL_la_LIBADD += $(top_builddir)/src/loader/libloader_dri3_helper.la 64endif 65endif 66 67if HAVE_PLATFORM_WAYLAND 68AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM 69AM_CFLAGS += $(WAYLAND_CFLAGS) 70libEGL_la_LIBADD += $(WAYLAND_LIBS) 71libEGL_la_LIBADD += $(LIBDRM_LIBS) 72libEGL_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la 73dri2_backend_FILES += drivers/dri2/platform_wayland.c 74endif 75 76if HAVE_EGL_PLATFORM_DRM 77AM_CFLAGS += -DHAVE_DRM_PLATFORM 78libEGL_la_LIBADD += $(top_builddir)/src/gbm/libgbm.la 79dri2_backend_FILES += drivers/dri2/platform_drm.c 80endif 81 82if HAVE_EGL_PLATFORM_SURFACELESS 83AM_CFLAGS += -DHAVE_SURFACELESS_PLATFORM 84dri2_backend_FILES += drivers/dri2/platform_surfaceless.c 85endif 86 87if HAVE_EGL_PLATFORM_ANDROID 88AM_CFLAGS += -DHAVE_ANDROID_PLATFORM 89AM_CFLAGS += $(ANDROID_CFLAGS) 90libEGL_la_LIBADD += $(ANDROID_LIBS) 91dri2_backend_FILES += drivers/dri2/platform_android.c 92endif 93 94AM_CFLAGS += \ 95 -I$(top_srcdir)/src/loader \ 96 -I$(top_srcdir)/src/egl/drivers/dri2 \ 97 -I$(top_srcdir)/src/gbm/backends/dri \ 98 -I$(top_srcdir)/src/egl/wayland/wayland-egl \ 99 -I$(top_builddir)/src/egl/wayland/wayland-drm \ 100 -I$(top_srcdir)/src/egl/wayland/wayland-drm \ 101 -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \ 102 -D_EGL_BUILT_IN_DRIVER_DRI2 103 104libEGL_la_SOURCES += \ 105 $(dri2_backend_core_FILES) \ 106 $(dri2_backend_FILES) \ 107 $(dri3_backend_FILES) 108 109libEGL_la_LIBADD += $(top_builddir)/src/loader/libloader.la 110libEGL_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB) 111 112include $(top_srcdir)/install-lib-links.mk 113 114pkgconfigdir = $(libdir)/pkgconfig 115 116pkgconfig_DATA = main/egl.pc 117 118khrdir = $(includedir)/KHR 119khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h 120 121egldir = $(includedir)/EGL 122egl_HEADERS = \ 123 $(top_srcdir)/include/EGL/eglext.h \ 124 $(top_srcdir)/include/EGL/egl.h \ 125 $(top_srcdir)/include/EGL/eglextchromium.h \ 126 $(top_srcdir)/include/EGL/eglmesaext.h \ 127 $(top_srcdir)/include/EGL/eglplatform.h 128 129TESTS = egl-symbols-check 130 131EXTRA_DIST = \ 132 egl-symbols-check \ 133 SConscript \ 134 drivers/haiku \ 135 main/egl.def \ 136 main/README.txt 137