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