summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2010-03-16 03:33:24 +0100
committerLuc Verhaegen <libv@skynet.be>2010-03-16 03:33:24 +0100
commit2b14b942ff67970b54b748b7b335619c4c210412 (patch)
tree434a7b8a02698632c6e35fd6a6e9815256b7563f
parent7e210b93376ab6fef63995c48d7b1766c4335ad8 (diff)
Provide dri shared library building and SDK installation.HEADmasterdri-sdk-7.7.0
-rw-r--r--Makefile13
-rw-r--r--src/mesa/Makefile49
-rw-r--r--src/mesa/drivers/dri/common/Makefile80
-rw-r--r--src/mesa/drivers/dri/common/libmesadricommon.pc.in9
-rw-r--r--src/mesa/drivers/dri/swrast/Makefile10
-rw-r--r--src/mesa/libmesadri.pc.in9
-rw-r--r--src/mesa/sources.mak108
7 files changed, 277 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e927cb9685..bb776350a0 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,19 @@ default: $(TOP)/configs/current
all: default
+dri-sdk:
+ cd src/mesa/ && $(MAKE) dri-sdk
+
+dri-sdk-install:
+ cd src/mesa/ && $(MAKE) dri-sdk-install
+
+dri-swrast:
+ cd src/mesa/drivers/dri/swrast && $(MAKE) dri-swrast
+
+dri-swrast-install:
+ cd src/mesa/drivers/dri/swrast && $(MAKE) dri-swrast-install
+
+
doxygen:
cd doxygen && $(MAKE)
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 6f58ad6161..77d5b6795a 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -37,6 +37,17 @@ libmesa.a: $(MESA_OBJECTS)
libmesagallium.a: $(MESA_GALLIUM_OBJECTS)
@ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS)
+libmesadri.so.$(MESA_VERSION): asm_subdirs $(MESA_OBJECTS)
+ $(MKLIB) -major $(MESA_MAJOR) -minor $(MESA_MINOR) \
+ -patch $(MESA_TINY) -o mesadri $(MESA_OBJECTS)
+
+libmesadri: libmesadri.so.$(MESA_VERSION)
+
+libmesadricommon:
+ (cd drivers/dri/common && $(MAKE)) || exit 1
+
+dri-sdk: libmesadri libmesadricommon
+
# Make archive of gl* API dispatcher functions only
libglapi.a: $(GLAPI_OBJECTS)
$(MKLIB) -o glapi -static $(GLAPI_OBJECTS)
@@ -140,13 +151,49 @@ install-dri: default
cd drivers/dri && $(MAKE) install
+libmesadri_pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),'
+
+libmesadri.pc: libmesadri.pc.in
+ $(libmesadri_pcedit) $< > $@
+
+install-libmesadricommon:
+ cd drivers/dri/common && $(MAKE) install
+
+$(DESTDIR)$(INSTALL_INC_DIR)/mesa/%: $(subst $(DESTDIR)$(INSTALL_INC_DIR)/mesa/,,$@)
+ $(INSTALL) -d $(dir $@)
+ $(INSTALL) -m 644 $(subst $(DESTDIR)$(INSTALL_INC_DIR)/mesa/,,$(dir $@))$(notdir $@) $(dir $@)
+
+install-libmesadri-headers: $(addprefix $(DESTDIR)$(INSTALL_INC_DIR)/mesa/,$(LIBMESADRI_HEADERS))
+ # since glproto's internal/glcore.h is vastly out of sync anyway.
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
+ $(INSTALL) -m 644 $(TOP)/include/GL/internal/glcore.h $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
+
+install-libmesadri: libmesadri.so libmesadri.pc install-libmesadri-headers
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(MINSTALL) libmesadri.so.$(MESA_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) libmesadri.so.$(MESA_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) libmesadri.so $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 libmesadri.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+
+dri-sdk-install: install-libmesadri install-libmesadricommon
# Emacs tags
tags:
etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
-clean:
+libmesadri-clean:
+ -rm -f libmesadri.so*
+ -rm -f libmesadri.pc
+ cd drivers/dri/common && $(MAKE) clean
+
+clean: libmesadri-clean
-rm -f */*.o
-rm -f */*/*.o
-rm -f depend depend.bak libmesa.a libglapi.a
diff --git a/src/mesa/drivers/dri/common/Makefile b/src/mesa/drivers/dri/common/Makefile
new file mode 100644
index 0000000000..c4db042435
--- /dev/null
+++ b/src/mesa/drivers/dri/common/Makefile
@@ -0,0 +1,80 @@
+TOP = ../../../../..
+include $(TOP)/configs/current
+
+DRIVER_DEFINES = -DIN_DRI_DRIVER
+
+COMMON_SOURCES = \
+ utils.c \
+ texmem.c \
+ vblank.c \
+ dri_util.c \
+ xmlconfig.c \
+ drirenderbuffer.c \
+ dri_metaops.c \
+ ../../common/driverfuncs.c
+
+LIBMESADRICOMMON_HEADERS = \
+ drivers/common/driverfuncs.h \
+ drivers/common/meta.h \
+ drivers/dri/common/depthtmp.h \
+ drivers/dri/common/dri_metaops.h \
+ drivers/dri/common/drirenderbuffer.h \
+ drivers/dri/common/dri_util.h \
+ drivers/dri/common/mmio.h \
+ drivers/dri/common/spantmp2.h \
+ drivers/dri/common/spantmp_common.h \
+ drivers/dri/common/spantmp.h \
+ drivers/dri/common/stenciltmp.h \
+ drivers/dri/common/texmem.h \
+ drivers/dri/common/utils.h \
+ drivers/dri/common/vblank.h \
+ drivers/dri/common/xmlconfig.h \
+ drivers/dri/common/xmlpool.h \
+ drivers/dri/common/xmlpool/options.h
+
+COMMON_OBJECTS = $(COMMON_SOURCES:.c=.o)
+
+INCLUDES = \
+ -I. \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mesa \
+ -I/usr/include/drm
+
+.c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+
+libmesadricommon.so: $(COMMON_OBJECTS)
+ $(MKLIB) -major $(MESA_MAJOR) -minor $(MESA_MINOR) \
+ -patch $(MESA_TINY) -o mesadricommon $(COMMON_OBJECTS)
+
+pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
+ -e 's,@DRI_DRIVER_DIR@,$(DRI_DRIVER_INSTALL_DIR),' \
+ -e 's,@DRI_PC_REQ_PRIV@,$(DRI_PC_REQ_PRIV),'
+
+libmesadricommon.pc: libmesadricommon.pc.in
+ $(pcedit) $< > $@
+
+default: libmesadricommon.so
+
+install: libmesadricommon.so libmesadricommon.pc install-libmesadricommon-headers
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(MINSTALL) libmesadricommon.so.$(MESA_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) libmesadricommon.so.$(MESA_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) libmesadricommon.so $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 libmesadricommon.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+
+$(DESTDIR)$(INSTALL_INC_DIR)/mesa/%: $(subst $(DESTDIR)$(INSTALL_INC_DIR)/mesa/drivers/,../../,$@)
+ $(INSTALL) -d $(dir $@)
+ $(INSTALL) -m 644 $(subst $(DESTDIR)$(INSTALL_INC_DIR)/mesa/drivers/,../../,$(dir $@))$(notdir $@) $(dir $@)
+
+install-libmesadricommon-headers: $(addprefix $(DESTDIR)$(INSTALL_INC_DIR)/mesa/,$(LIBMESADRICOMMON_HEADERS))
+
+clean:
+ -rm -f *.o
+ -rm -f libmesadricommon.so*
+ -rm -f libmesadricommon.pc
diff --git a/src/mesa/drivers/dri/common/libmesadricommon.pc.in b/src/mesa/drivers/dri/common/libmesadricommon.pc.in
new file mode 100644
index 0000000000..3a752af644
--- /dev/null
+++ b/src/mesa/drivers/dri/common/libmesadricommon.pc.in
@@ -0,0 +1,9 @@
+prefix=@INSTALL_DIR@
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: libmesadricommon
+Description: Common dri driver infrastructure for Mesa/dri.
+Version: @VERSION@
+Libs: -L${libdir} -lmesadricommon -lexpat
+Cflags: -I${includedir}/mesa -I${includedir}/mesa/drivers/dri/common
diff --git a/src/mesa/drivers/dri/swrast/Makefile b/src/mesa/drivers/dri/swrast/Makefile
index 771169c1ff..bf522501a8 100644
--- a/src/mesa/drivers/dri/swrast/Makefile
+++ b/src/mesa/drivers/dri/swrast/Makefile
@@ -21,3 +21,13 @@ SWRAST_COMMON_SOURCES = \
include ../Makefile.template
+
+dri-swrast: $(OBJECTS)
+ $(MKLIB) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
+ -o swrast_dri.so -noprefix $(OBJECTS) -lmesadri \
+ $(EXTRA_MODULES) $(DRI_LIB_DEPS)
+
+dri-swrast-install: dri-swrast
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/dri
+ $(MINSTALL) swrast_dri.so $(DESTDIR)$(INSTALL_LIB_DIR)/dri
diff --git a/src/mesa/libmesadri.pc.in b/src/mesa/libmesadri.pc.in
new file mode 100644
index 0000000000..0cab4b2104
--- /dev/null
+++ b/src/mesa/libmesadri.pc.in
@@ -0,0 +1,9 @@
+prefix=@INSTALL_DIR@
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: libmesadri
+Description: Core library for Mesa/dri.
+Version: @VERSION@
+Libs: -L${libdir} -lmesadri -lpthread
+Cflags: -I${includedir}/mesa -DPTHREADS
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index a0d7dbbace..62fbf7eba8 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -373,3 +373,111 @@ INCLUDE_DIRS = \
-I$(TOP)/src/mesa \
-I$(TOP)/src/gallium/include \
-I$(TOP)/src/gallium/auxiliary
+
+LIBMESADRI_HEADERS = \
+ glapi/dispatch.h \
+ glapi/glapidispatch.h \
+ glapi/glapi.h \
+ glapi/glapioffsets.h \
+ glapi/glapitable.h \
+ glapi/glthread.h \
+ main/api_arrayelt.h \
+ main/api_noop.h \
+ main/api_validate.h \
+ main/arrayobj.h \
+ main/attrib.h \
+ main/bitset.h \
+ main/blend.h \
+ main/bufferobj.h \
+ main/buffers.h \
+ main/clip.h \
+ main/colormac.h \
+ main/colortab.h \
+ main/compiler.h \
+ main/config.h \
+ main/context.h \
+ main/convolve.h \
+ main/dd.h \
+ main/depth.h \
+ main/enable.h \
+ main/enums.h \
+ main/extensions.h \
+ main/fbobject.h \
+ main/formats.h \
+ main/framebuffer.h \
+ main/glheader.h \
+ main/hash.h \
+ main/image.h \
+ main/imports.h \
+ main/light.h \
+ main/macros.h \
+ main/matrix.h \
+ main/mfeatures.h \
+ main/mipmap.h \
+ main/mm.h \
+ main/mtypes.h \
+ main/pixelstore.h \
+ main/points.h \
+ main/polygon.h \
+ main/remap.h \
+ main/remap_helper.h \
+ main/renderbuffer.h \
+ main/shaders.h \
+ main/simple_list.h \
+ main/state.h \
+ main/stencil.h \
+ main/texcompress.h \
+ main/texenv.h \
+ main/texformat.h \
+ main/texgetimage.h \
+ main/teximage.h \
+ main/texobj.h \
+ main/texparam.h \
+ main/texrender.h \
+ main/texstate.h \
+ main/texstore.h \
+ main/varray.h \
+ main/viewport.h \
+ main/vtxfmt.h \
+ math/m_matrix.h \
+ math/m_translate.h \
+ math/m_vector.h \
+ math/m_xform.h \
+ shader/arbprogram.h \
+ shader/atifragshader.h \
+ shader/prog_execute.h \
+ shader/prog_instruction.h \
+ shader/prog_optimize.h \
+ shader/prog_parameter.h \
+ shader/prog_print.h \
+ shader/program.h \
+ shader/programopt.h \
+ shader/prog_statevars.h \
+ shader/shader_api.h \
+ swrast/s_context.h \
+ swrast_setup/ss_context.h \
+ swrast_setup/swrast_setup.h \
+ swrast/s_fog.h \
+ swrast/s_span.h \
+ swrast/swrast.h \
+ tnl_dd/t_dd_dmatmp2.h \
+ tnl_dd/t_dd_dmatmp.h \
+ tnl_dd/t_dd_rendertmp.h \
+ tnl_dd/t_dd_triemit.h \
+ tnl_dd/t_dd_tritmp.h \
+ tnl_dd/t_dd_unfilled.h \
+ tnl_dd/t_dd_vb.c \
+ tnl_dd/t_dd_vbtmp.h \
+ tnl_dd/t_dd_vertex.h \
+ tnl/t_context.h \
+ tnl/tnl.h \
+ tnl/t_pipeline.h \
+ tnl/t_vb_rendertmp.h \
+ tnl/t_vertex.h \
+ tnl/t_vp_build.h \
+ vbo/vbo_attrib.h \
+ vbo/vbo_context.h \
+ vbo/vbo_exec.h \
+ vbo/vbo.h \
+ vbo/vbo_save.h \
+ vbo/vbo_split.h