diff options
author | Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | 2011-02-03 11:19:32 +1100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-02-11 18:31:05 -0800 |
commit | d1e28b22673777fe1290cda899abf73aad02e4aa (patch) | |
tree | 27333db1d1d37900f19c63c5754e966ad2a0624a /configs | |
parent | b5dc40710d0e5edffb9f673dfbf26df4d0043eef (diff) | |
download | external_mesa3d-d1e28b22673777fe1290cda899abf73aad02e4aa.zip external_mesa3d-d1e28b22673777fe1290cda899abf73aad02e4aa.tar.gz external_mesa3d-d1e28b22673777fe1290cda899abf73aad02e4aa.tar.bz2 |
mesa: Optionally build a dricore support library (v3)
This an adds --enable-shared-dricore option to configure. When enabled,
DRI modules will link against a shared copy of the common mesa routines
rather than statically linking these.
This saves about 30MB on disc with a full complement of classic DRI
drivers.
v2: Only enable with a gcc-compatible compiler that handles rpath
Handle DRI_CFLAGS without filter-out magic
Build shared libraries with the full mklib voodoo
Fix typos
v3: Resolve conflicts with talloc removal patches
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Diffstat (limited to 'configs')
-rw-r--r-- | configs/autoconf.in | 14 | ||||
-rw-r--r-- | configs/default | 3 | ||||
-rw-r--r-- | configs/freebsd-dri | 4 | ||||
-rw-r--r-- | configs/linux-dri | 4 | ||||
-rw-r--r-- | configs/linux-dri-xcb | 4 | ||||
-rw-r--r-- | configs/linux-egl | 4 | ||||
-rw-r--r-- | configs/linux-indirect | 3 |
7 files changed, 28 insertions, 8 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in index 2ab1850..a3c69e1 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -16,10 +16,12 @@ PIC_FLAGS = @PIC_FLAGS@ DEFINES = @DEFINES@ API_DEFINES = @API_DEFINES@ SHARED_GLAPI = @SHARED_GLAPI@ -CFLAGS = @CPPFLAGS@ @CFLAGS@ \ +CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) -CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \ +CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) +CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@ +CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@ LDFLAGS = @LDFLAGS@ EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ RADEON_CFLAGS = @RADEON_CFLAGS@ @@ -34,6 +36,8 @@ LLVM_LIBS = @LLVM_LIBS@ GLW_CFLAGS = @GLW_CFLAGS@ GLUT_CFLAGS = @GLUT_CFLAGS@ GLX_TLS = @GLX_TLS@ +DRI_CFLAGS = @DRI_CFLAGS@ +DRI_CXXFLAGS = @DRI_CXXFLAGS@ # dlopen DLOPEN_LIBS = @DLOPEN_LIBS@ @@ -107,7 +111,10 @@ GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) # Driver specific build vars -DRI_DIRS = @DRI_DIRS@ +DRI_DIRS = @DRI_DIRS@ +DRICORE_GLSL_LIBS = @DRICORE_GLSL_LIBS@ +DRICORE_LIBS = @DRICORE_LIBS@ +DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@ EGL_PLATFORMS = @EGL_PLATFORMS@ EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ @@ -137,6 +144,7 @@ GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIBPATH) @WAYLAND_EGL_LIB_DEPS@ # DRI dependencies +MESA_MODULES = @MESA_MODULES@ DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIB = @LIBDRM_LIBS@ diff --git a/configs/default b/configs/default index 442eb84..0582a02 100644 --- a/configs/default +++ b/configs/default @@ -89,6 +89,9 @@ VG_LIB_GLOB = $(VG_LIB_NAME)* GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)* WAYLAND_EGL_LIB_GLOB = $(WAYLAND_EGL_LIB_NAME)* +DRI_CFLAGS = $(CFLAGS) +DRI_CXXFLAGS = $(CXXFLAGS) + # Optional assembly language optimization files for libGL MESA_ASM_SOURCES = diff --git a/configs/freebsd-dri b/configs/freebsd-dri index a4aa82e..23cf58a 100644 --- a/configs/freebsd-dri +++ b/configs/freebsd-dri @@ -30,9 +30,11 @@ ASM_SOURCES = MESA_ASM_SOURCES = # Library/program dependencies +MESA_MODULES = $(TOP)/src/mesa/libmesa.a + LIBDRM_CFLAGS = `pkg-config --cflags libdrm` LIBDRM_LIB = `pkg-config --libs libdrm` -DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB) +DRI_LIB_DEPS = $(MESA_MODULES) -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB) GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ -lm -pthread $(LIBDRM_LIB) diff --git a/configs/linux-dri b/configs/linux-dri index 1c94ed0..22190bf 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -43,9 +43,11 @@ MESA_ASM_SOURCES = # Library/program dependencies EXTRA_LIB_PATH=-L/usr/X11R6/lib +MESA_MODULES = $(TOP)/src/mesa/libmesa.a + LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) LIBDRM_LIB = $(shell pkg-config --libs libdrm) -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) +DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ -lm -lpthread -ldl $(LIBDRM_LIB) diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb index 8092a04..7518080 100644 --- a/configs/linux-dri-xcb +++ b/configs/linux-dri-xcb @@ -41,9 +41,11 @@ MESA_ASM_SOURCES = # Library/program dependencies EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11) +MESA_MODULES = $(TOP)/src/mesa/libmesa.a + LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) LIBDRM_LIB = $(shell pkg-config --libs libdrm) -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) +DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx) diff --git a/configs/linux-egl b/configs/linux-egl index 6393e94..216bcba 100644 --- a/configs/linux-egl +++ b/configs/linux-egl @@ -38,9 +38,11 @@ MESA_ASM_SOURCES = # Library/program dependencies EXTRA_LIB_PATH=-L/usr/X11R6/lib +MESA_MODULES = $(TOP)/src/mesa/libmesa.a + LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) LIBDRM_LIB = $(shell pkg-config --libs libdrm) -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) +DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ -lm -lpthread -ldl \ $(LIBDRM_LIB) diff --git a/configs/linux-indirect b/configs/linux-indirect index 272d34e..507382a 100644 --- a/configs/linux-indirect +++ b/configs/linux-indirect @@ -42,7 +42,8 @@ MESA_ASM_SOURCES = # Library/program dependencies EXTRA_LIB_PATH=-L/usr/X11R6/lib -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl +MESA_MODULES = $(TOP)/src/mesa/libmesa.a +DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl |