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