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 -I$(top_srcdir)/include \
37 -I$(top_srcdir)/src/gallium/drivers \
38 -I$(top_srcdir)/src/gallium/winsys \
39 -I$(top_srcdir)/src/gallium/include \
40 -I$(top_srcdir)/src/gallium/auxiliary \
41 -I$(top_srcdir)/src/gallium/state_trackers/egl \
42 -I$(top_srcdir)/src/egl/main \
45 egldir = $(EGL_DRIVER_INSTALL_DIR)
46 egl_LTLIBRARIES = egl_gallium.la
48 nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
49 egl_gallium_la_SOURCES = \
54 egl_gallium_la_LIBADD = \
55 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
56 $(top_builddir)/src/gallium/drivers/identity/libidentity.la \
57 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
58 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
59 $(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
60 $(top_builddir)/src/egl/main/libEGL.la \
67 egl_gallium_la_LDFLAGS = -Wl,--no-undefined -Wl,--allow-multiple-definition -avoid-version -module
69 if HAVE_EGL_PLATFORM_X11
70 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
71 egl_gallium_la_LIBADD += \
72 $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
73 -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
76 if HAVE_EGL_PLATFORM_WAYLAND
77 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
78 egl_gallium_la_LIBADD += \
79 $(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
80 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
85 if HAVE_EGL_PLATFORM_DRM
86 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
87 egl_gallium_la_LIBADD += \
88 $(top_builddir)/src/gbm/libgbm.la \
92 if HAVE_EGL_PLATFORM_FBDEV
93 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/fbdev/libfbdev.la
96 if HAVE_EGL_PLATFORM_NULL
97 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
102 -I$(top_srcdir)/src/mesa \
105 egl_gallium_la_LIBADD += \
106 $(top_builddir)/src/mesa/libmesagallium.la
107 # make st/mesa built-in when there is a single glapi provider
109 egl_gallium_la_LIBADD += \
110 $(top_builddir)/src/mapi/shared-glapi/libglapi.la
112 egl_gallium_la_LIBADD += \
113 $(top_builddir)/src/mapi/glapi/libglapi.la
115 AM_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
116 egl_LTLIBRARIES += st_GL.la
118 nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
119 st_GL_la_SOURCES = st_GL.c
120 st_GL_la_LDFLAGS = -Wl,--no-undefined -avoid-version -module
122 # st_GL, built only when shared glapi is not enabled
124 $(top_builddir)/src/mesa/libmesagallium.la \
125 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
126 $(top_builddir)/src/mapi/glapi/libglapi.la \
146 -I$(top_srcdir)/src/gallium/state_trackers/vega \
148 egl_gallium_la_LIBADD += \
149 $(top_builddir)/src/gallium/state_trackers/vega/libvega.la \
150 $(top_builddir)/src/mapi/vgapi/libOpenVG.la
154 AM_CPPFLAGS += -D_EGL_PIPE_I915=1
155 egl_gallium_la_LIBADD += \
156 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
157 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
162 AM_CPPFLAGS += -D_EGL_PIPE_ILO=1
163 egl_gallium_la_LIBADD += \
164 $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
165 $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
169 if HAVE_GALLIUM_NOUVEAU
170 AM_CPPFLAGS += -D_EGL_PIPE_NOUVEAU=1
171 egl_gallium_la_LIBADD += \
172 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
173 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
178 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
179 egl_gallium_la_LIBADD += \
180 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
181 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
186 AM_CPPFLAGS += -D_EGL_PIPE_R600=1
187 egl_gallium_la_LIBADD += \
188 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
189 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
193 if HAVE_GALLIUM_RADEONSI
194 AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
195 egl_gallium_la_LIBADD += \
196 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
197 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
202 AM_CPPFLAGS += -D_EGL_PIPE_VMWGFX=1
203 egl_gallium_la_LIBADD += \
204 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
205 $(top_builddir)/src/gallium/drivers/svga/libsvga.la
208 if HAVE_GALLIUM_FREEDRENO
209 AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1
210 egl_gallium_la_LIBADD += \
211 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
212 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
217 if HAVE_GALLIUM_SOFTPIPE
218 AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE
219 egl_gallium_la_LIBADD += \
220 $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
223 if HAVE_GALLIUM_LLVMPIPE
224 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
225 egl_gallium_la_LIBADD += \
226 $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
230 egl_gallium_la_LIBADD += $(LLVM_LIBS)
231 egl_gallium_la_LDFLAGS += $(LLVM_LDFLAGS)
234 if !HAVE_SHARED_GLAPI
235 st_GL_la_LIBADD += $(LLVM_LIBS)
236 st_GL_la_LDFLAGS += $(LLVM_LDFLAGS)
241 # Provide compatibility with scripts for the old Mesa build system for
242 # a while by putting a link to the driver into /lib of the build tree.
244 if !HAVE_SHARED_GLAPI
245 all-local: egl_gallium.la st_GL.la
246 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
247 ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
248 ln -f .libs/st_GL.so $(top_builddir)/$(LIB_DIR)/egl/st_GL.so
250 all-local: egl_gallium.la
251 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
252 ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
256 all-local: egl_gallium.la
257 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
258 ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so