summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/targets/egl-static/Makefile7
-rw-r--r--src/gallium/targets/libgl-xlib/Makefile2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/Makefile b/src/gallium/targets/egl-static/Makefile
index 9e8777402cb..79a098af448 100644
--- a/src/gallium/targets/egl-static/Makefile
+++ b/src/gallium/targets/egl-static/Makefile
@@ -8,6 +8,7 @@
# 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
#
TOP = ../../../..
@@ -69,8 +70,14 @@ endif
# st/mesa
ifneq ($(filter $(GL_LIB), $(EGL_CLIENT_APIS)),)
egl_CPPFLAGS += -I$(TOP)/src/mesa $(API_DEFINES)
+# make st/mesa built-in when there is a single glapi provider
+ifeq ($(SHARED_GLAPI),1)
egl_LIBS += $(TOP)/src/mesa/libmesagallium.a
egl_SYS += -lm -lpthread $(DLOPEN_LIBS) -l$(GLAPI_LIB)
+else
+egl_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
+OUTPUTS += st_GL
+endif # SHARED_GLAPI
endif
# st/vega
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index 479e0855985..867b2da323b 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -58,7 +58,9 @@ GL_LIB_DEPS += $(LLVM_LIBS)
LDFLAGS += $(LLVM_LDFLAGS)
endif
+ifeq ($(SHARED_GLAPI),1)
GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
+endif
.SUFFIXES : .cpp