1 # Copyright © 2012 Intel Corporation
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:
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
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
23 # This is Makefile for egl_gallium.so. It is static in that all state trackers
24 # and pipe drivers are linked statically when possible.
26 # The following variables are examined
28 # EGL_CLIENT_APIS - state trackers to support
29 # GALLIUM_WINSYS_DIRS - pipe drivers to support
31 include $(top_srcdir)/src/gallium/Automake.inc
33 AM_CFLAGS = $(PTHREAD_CFLAGS)
36 $(VISIBILITY_CFLAGS) \
37 -I$(top_srcdir)/include \
38 -I$(top_srcdir)/src/loader \
39 -I$(top_srcdir)/src/gallium/drivers \
40 -I$(top_srcdir)/src/gallium/winsys \
41 -I$(top_srcdir)/src/gallium/include \
42 -I$(top_srcdir)/src/gallium/auxiliary \
43 -I$(top_srcdir)/src/gallium/state_trackers/egl \
44 -I$(top_srcdir)/src/egl/main \
52 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.link
54 egldir = $(EGL_DRIVER_INSTALL_DIR)
55 egl_LTLIBRARIES = egl_gallium.la
57 nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
58 egl_gallium_la_SOURCES = \
63 egl_gallium_la_LIBADD = \
64 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
65 $(top_builddir)/src/gallium/drivers/identity/libidentity.la \
66 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
67 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
68 $(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
69 $(top_builddir)/src/egl/main/libEGL.la \
70 $(top_builddir)/src/loader/libloader.la \
77 AM_LDFLAGS += $(LLVM_LDFLAGS)
80 egl_gallium_la_LDFLAGS = \
82 -Wl,--allow-multiple-definition
84 if HAVE_EGL_PLATFORM_X11
85 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
86 egl_gallium_la_LIBADD += \
87 $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
88 -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
91 if HAVE_EGL_PLATFORM_WAYLAND
92 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
93 egl_gallium_la_LIBADD += \
94 $(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
95 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
100 if HAVE_EGL_PLATFORM_DRM
101 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
102 egl_gallium_la_LIBADD += \
103 $(top_builddir)/src/gbm/libgbm.la \
107 if HAVE_EGL_PLATFORM_FBDEV
108 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/fbdev/libfbdev.la
111 if HAVE_EGL_PLATFORM_NULL
112 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
117 -I$(top_srcdir)/src/mesa \
120 egl_gallium_la_LIBADD += \
121 $(top_builddir)/src/mesa/libmesagallium.la
122 # make st/mesa built-in when there is a single glapi provider
124 egl_gallium_la_LIBADD += \
125 $(top_builddir)/src/mapi/shared-glapi/libglapi.la
127 egl_gallium_la_LIBADD += \
128 $(top_builddir)/src/mapi/glapi/libglapi.la
130 AM_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
131 egl_LTLIBRARIES += st_GL.la
133 nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
134 st_GL_la_SOURCES = st_GL.c
136 # st_GL, built only when shared glapi is not enabled
138 $(top_builddir)/src/mesa/libmesagallium.la \
139 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
140 $(top_builddir)/src/mapi/glapi/libglapi.la \
160 -I$(top_srcdir)/src/gallium/state_trackers/vega \
162 egl_gallium_la_LIBADD += \
163 $(top_builddir)/src/gallium/state_trackers/vega/libvega.la \
164 $(top_builddir)/src/mapi/vgapi/libOpenVG.la
168 AM_CPPFLAGS += -D_EGL_PIPE_I915=1
169 egl_gallium_la_LIBADD += \
170 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
171 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
176 AM_CPPFLAGS += -D_EGL_PIPE_ILO=1
177 egl_gallium_la_LIBADD += \
178 $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
179 $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
183 if HAVE_GALLIUM_NOUVEAU
184 AM_CPPFLAGS += -D_EGL_PIPE_NOUVEAU=1
185 egl_gallium_la_LIBADD += \
186 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
187 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
192 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
193 egl_gallium_la_LIBADD += \
194 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
195 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
200 AM_CPPFLAGS += -D_EGL_PIPE_R600=1
201 egl_gallium_la_LIBADD += \
202 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
203 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
207 if HAVE_GALLIUM_RADEONSI
208 AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
209 egl_gallium_la_LIBADD += \
210 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
211 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
216 AM_CPPFLAGS += -D_EGL_PIPE_VMWGFX=1
217 egl_gallium_la_LIBADD += \
218 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
219 $(top_builddir)/src/gallium/drivers/svga/libsvga.la
222 if HAVE_GALLIUM_FREEDRENO
223 AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1
224 egl_gallium_la_LIBADD += \
225 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
226 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
231 if HAVE_GALLIUM_SOFTPIPE
232 AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE
233 egl_gallium_la_LIBADD += \
234 $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
237 if HAVE_GALLIUM_LLVMPIPE
238 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
239 egl_gallium_la_LIBADD += \
240 $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
244 egl_gallium_la_LIBADD += $(LLVM_LIBS)
247 if !HAVE_SHARED_GLAPI
248 st_GL_la_LIBADD += $(LLVM_LIBS)
253 include $(top_srcdir)/install-gallium-links.mk