#
# The following variables are examined
#
-# EGL_PLATFORMS - platforms to support
# EGL_CLIENT_APIS - state trackers to support
# GALLIUM_WINSYS_DIRS - pipe drivers to support
-# SHARED_GLAPI - st/mesa can be statically linked or not
#
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_CPPFLAGS = \
$(GALLIUM_CFLAGS) \
+ $(VISIBILITY_CFLAGS) \
-I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/loader \
-I$(top_srcdir)/src/gallium/drivers \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/egl/main \
-D_EGL_MAIN=_eglMain
+AM_LDFLAGS = \
+ -module \
+ -no-undefined \
+ -avoid-version \
+ $(GC_SECTIONS) \
+ -Wl,--no-undefined \
+ -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.link
+
egldir = $(EGL_DRIVER_INSTALL_DIR)
egl_LTLIBRARIES = egl_gallium.la
$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
$(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
$(top_builddir)/src/egl/main/libEGL.la \
+ $(top_builddir)/src/loader/libloader.la \
$(CLOCK_LIB) \
- $(LIBUDEV_LIBS) \
$(DLOPEN_LIBS) \
$(PTHREAD_LIBS) \
-lm
-egl_gallium_la_LDFLAGS = -Wl,--no-undefined -Wl,--allow-multiple-definition -avoid-version -module
+if HAVE_MESA_LLVM
+AM_LDFLAGS += $(LLVM_LDFLAGS)
+endif
+
+egl_gallium_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -Wl,--allow-multiple-definition
if HAVE_EGL_PLATFORM_X11
AM_CPPFLAGS += $(LIBDRM_CFLAGS)
AM_CPPFLAGS += $(LIBDRM_CFLAGS)
egl_gallium_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
- $(top_builddir)/src/egl/wayland/wayland-drm/.libs/libwayland-drm.la \
+ $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
$(LIBDRM_LIBS) \
$(WAYLAND_LIBS)
endif
if HAVE_OPENGL
AM_CPPFLAGS += \
-I$(top_srcdir)/src/mesa \
- $(API_DEFINES)
+ -DFEATURE_GL=1
egl_gallium_la_LIBADD += \
$(top_builddir)/src/mesa/libmesagallium.la
nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
st_GL_la_SOURCES = st_GL.c
-st_GL_la_LDFLAGS = -Wl,--no-undefined -avoid-version -module
# st_GL, built only when shared glapi is not enabled
st_GL_la_LIBADD = \
endif
endif
+if HAVE_OPENGL_ES1
+AM_CPPFLAGS += \
+ -DFEATURE_ES1=1
+endif
+
+if HAVE_OPENGL_ES2
+AM_CPPFLAGS += \
+ -DFEATURE_ES2=1
+endif
+
if HAVE_OPENVG
AM_CPPFLAGS += \
-I$(top_srcdir)/src/gallium/state_trackers/vega \
$(INTEL_LIBS)
endif
+if HAVE_GALLIUM_ILO
+AM_CPPFLAGS += -D_EGL_PIPE_ILO=1
+egl_gallium_la_LIBADD += \
+ $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
+ $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
+ $(INTEL_LIBS)
+endif
+
if HAVE_GALLIUM_NOUVEAU
AM_CPPFLAGS += -D_EGL_PIPE_NOUVEAU=1
egl_gallium_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
- $(top_builddir)/src/gallium/drivers/nv30/libnv30.la \
- $(top_builddir)/src/gallium/drivers/nv50/libnv50.la \
- $(top_builddir)/src/gallium/drivers/nvc0/libnvc0.la \
$(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
$(NOUVEAU_LIBS)
endif
$(top_builddir)/src/gallium/drivers/svga/libsvga.la
endif
+if HAVE_GALLIUM_FREEDRENO
+AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1
+egl_gallium_la_LIBADD += \
+ $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
+ $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+ $(FREEDRENO_LIBS)
+
+endif
+
if HAVE_GALLIUM_SOFTPIPE
AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE
egl_gallium_la_LIBADD += \
if HAVE_MESA_LLVM
egl_gallium_la_LIBADD += $(LLVM_LIBS)
-egl_gallium_la_LDFLAGS += $(LLVM_LDFLAGS)
if HAVE_OPENGL
if !HAVE_SHARED_GLAPI
st_GL_la_LIBADD += $(LLVM_LIBS)
-st_GL_la_LDFLAGS += $(LLVM_LDFLAGS)
endif
endif
endif
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-if HAVE_OPENGL
-if !HAVE_SHARED_GLAPI
-all-local: egl_gallium.la st_GL.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
- ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
- ln -f .libs/st_GL.so $(top_builddir)/$(LIB_DIR)/egl/st_GL.so
-else
-all-local: egl_gallium.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
- ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
-
-endif
-else
-all-local: egl_gallium.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
- ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
-endif
+include $(top_srcdir)/install-gallium-links.mk