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 LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.link
35 AM_CFLAGS = $(PTHREAD_CFLAGS)
38 -I$(top_srcdir)/include \
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 \
47 egldir = $(EGL_DRIVER_INSTALL_DIR)
48 egl_LTLIBRARIES = egl_gallium.la
50 nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
51 egl_gallium_la_SOURCES = \
56 egl_gallium_la_LIBADD = \
57 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
58 $(top_builddir)/src/gallium/drivers/identity/libidentity.la \
59 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
60 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
61 $(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
62 $(top_builddir)/src/egl/main/libEGL.la \
69 egl_gallium_la_LDFLAGS = -Wl,--no-undefined -Wl,--allow-multiple-definition -avoid-version -module
71 if HAVE_EGL_PLATFORM_X11
72 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
73 egl_gallium_la_LIBADD += \
74 $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
75 -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
78 if HAVE_EGL_PLATFORM_WAYLAND
79 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
80 egl_gallium_la_LIBADD += \
81 $(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
82 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
87 if HAVE_EGL_PLATFORM_DRM
88 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
89 egl_gallium_la_LIBADD += \
90 $(top_builddir)/src/gbm/libgbm.la \
94 if HAVE_EGL_PLATFORM_FBDEV
95 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/fbdev/libfbdev.la
98 if HAVE_EGL_PLATFORM_NULL
99 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
104 -I$(top_srcdir)/src/mesa \
107 egl_gallium_la_LIBADD += \
108 $(top_builddir)/src/mesa/libmesagallium.la
109 # make st/mesa built-in when there is a single glapi provider
111 egl_gallium_la_LIBADD += \
112 $(top_builddir)/src/mapi/shared-glapi/libglapi.la
114 egl_gallium_la_LIBADD += \
115 $(top_builddir)/src/mapi/glapi/libglapi.la
117 AM_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
118 egl_LTLIBRARIES += st_GL.la
120 nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
121 st_GL_la_SOURCES = st_GL.c
122 st_GL_la_LDFLAGS = -Wl,--no-undefined -avoid-version -module
124 # st_GL, built only when shared glapi is not enabled
126 $(top_builddir)/src/mesa/libmesagallium.la \
127 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
128 $(top_builddir)/src/mapi/glapi/libglapi.la \
148 -I$(top_srcdir)/src/gallium/state_trackers/vega \
150 egl_gallium_la_LIBADD += \
151 $(top_builddir)/src/gallium/state_trackers/vega/libvega.la \
152 $(top_builddir)/src/mapi/vgapi/libOpenVG.la
156 AM_CPPFLAGS += -D_EGL_PIPE_I915=1
157 egl_gallium_la_LIBADD += \
158 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
159 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
164 AM_CPPFLAGS += -D_EGL_PIPE_ILO=1
165 egl_gallium_la_LIBADD += \
166 $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
167 $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
171 if HAVE_GALLIUM_NOUVEAU
172 AM_CPPFLAGS += -D_EGL_PIPE_NOUVEAU=1
173 egl_gallium_la_LIBADD += \
174 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
175 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
180 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
181 egl_gallium_la_LIBADD += \
182 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
183 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
188 AM_CPPFLAGS += -D_EGL_PIPE_R600=1
189 egl_gallium_la_LIBADD += \
190 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
191 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
195 if HAVE_GALLIUM_RADEONSI
196 AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
197 egl_gallium_la_LIBADD += \
198 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
199 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
204 AM_CPPFLAGS += -D_EGL_PIPE_VMWGFX=1
205 egl_gallium_la_LIBADD += \
206 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
207 $(top_builddir)/src/gallium/drivers/svga/libsvga.la
210 if HAVE_GALLIUM_FREEDRENO
211 AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1
212 egl_gallium_la_LIBADD += \
213 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
214 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
219 if HAVE_GALLIUM_SOFTPIPE
220 AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE
221 egl_gallium_la_LIBADD += \
222 $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
225 if HAVE_GALLIUM_LLVMPIPE
226 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
227 egl_gallium_la_LIBADD += \
228 $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
232 egl_gallium_la_LIBADD += $(LLVM_LIBS)
233 egl_gallium_la_LDFLAGS += $(LLVM_LDFLAGS)
236 if !HAVE_SHARED_GLAPI
237 st_GL_la_LIBADD += $(LLVM_LIBS)
238 st_GL_la_LDFLAGS += $(LLVM_LDFLAGS)
243 # Provide compatibility with scripts for the old Mesa build system for
244 # a while by putting a link to the driver into /lib of the build tree.
246 if !HAVE_SHARED_GLAPI
247 all-local: egl_gallium.la st_GL.la
248 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
249 ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
250 ln -f .libs/st_GL.so $(top_builddir)/$(LIB_DIR)/egl/st_GL.so
252 all-local: egl_gallium.la
253 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
254 ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
258 all-local: egl_gallium.la
259 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
260 ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so