Home | History | Annotate | Download | only in main
      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 
     22 GLAPI_LIB = ../mapi/glapi/libglapi.la
     23 
     24 if HAVE_XF86VIDMODE
     25 EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
     26 endif
     27 
     28 AM_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 
     37 lib_LTLIBRARIES = libEGL.la
     38 
     39 libEGL_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 
     75 libEGL_la_LIBADD = \
     76 	$(EGL_LIB_DEPS)
     77 libEGL_la_LDFLAGS = -version-number 1:0 -no-undefined
     78 
     79 if HAVE_EGL_PLATFORM_X11
     80 AM_CFLAGS += -DHAVE_X11_PLATFORM
     81 AM_CFLAGS += $(XCB_DRI2_CFLAGS)
     82 libEGL_la_LIBADD += $(XCB_DRI2_LIBS)
     83 endif
     84 
     85 if HAVE_EGL_PLATFORM_WAYLAND
     86 AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM
     87 AM_CFLAGS += $(WAYLAND_CFLAGS)
     88 libEGL_la_LIBADD += $(WAYLAND_LIBS)
     89 libEGL_la_LIBADD += $(LIBDRM_LIBS)
     90 libEGL_la_LIBADD += ../wayland/wayland-drm/libwayland-drm.la
     91 endif
     92 
     93 if HAVE_EGL_PLATFORM_DRM
     94 AM_CFLAGS += -DHAVE_DRM_PLATFORM
     95 libEGL_la_LIBADD += ../../gbm/libgbm.la
     96 endif
     97 
     98 if HAVE_EGL_PLATFORM_FBDEV
     99 AM_CFLAGS += -DHAVE_FBDEV_PLATFORM
    100 endif
    101 
    102 if HAVE_EGL_PLATFORM_NULL
    103 AM_CFLAGS += -DHAVE_NULL_PLATFORM
    104 endif
    105 
    106 if HAVE_EGL_DRIVER_GLX
    107 AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
    108 libEGL_la_LIBADD += ../drivers/glx/libegl_glx.la
    109 libEGL_la_LIBADD += $(X11_LIBS) $(DLOPEN_LIBS)
    110 endif
    111 
    112 if HAVE_EGL_DRIVER_DRI2
    113 AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
    114 AM_CFLAGS += -DHAVE_XCB_DRI2
    115 libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
    116 libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS)
    117 endif
    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.
    121 all-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 
    126 pkgconfigdir = $(libdir)/pkgconfig
    127 
    128 pkgconfig_DATA = egl.pc
    129 
    130 khrdir = $(includedir)/KHR
    131 khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
    132 
    133 egldir = $(includedir)/EGL
    134 egl_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