From 4be2d14bbe9541b91ce960e264494b7a9760d32a Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 17 May 2009 20:20:23 +0000 Subject: [PATCH] Update build infrastructure for Mesa 7.4. --- lib/libGL/Makefile | 52 ++++--------- lib/libGL/dri/Makefile | 5 +- lib/libGL/dri/Makefile.inc | 6 +- lib/libGL/dri/i915/Makefile | 12 +-- lib/libGL/dri/i965/Makefile | 14 ++-- lib/libGL/dri/r300/Makefile | 2 +- lib/libGL/dri/s3v/Makefile | 2 +- lib/libGL/dri/trident/Makefile | 2 +- lib/libGL/libmesa/Makefile | 137 ++++++++++++++++++--------------- lib/libGL/shlib_version | 2 +- 10 files changed, 112 insertions(+), 122 deletions(-) diff --git a/lib/libGL/Makefile b/lib/libGL/Makefile index 0254cb982..005983daf 100644 --- a/lib/libGL/Makefile +++ b/lib/libGL/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.23 2009/01/10 16:06:51 oga Exp $ +# $OpenBSD: Makefile,v 1.24 2009/05/17 20:20:23 matthieu Exp $ .include .if ${XENOCARA_BUILD_DRI:L} == "yes" @@ -14,7 +14,7 @@ MESA_INCLUDE= ${.CURDIR}/../../dist/Mesa/include MESA_DRI= ${.CURDIR}/../../dist/Mesa/src/mesa/drivers/dri MESA_MAJOR= 7 -MESA_MINOR= 2 +MESA_MINOR= 4 MESA_TINY= 0 DRI_DRIVER_INSTALL_DIR= ${X11BASE}/lib/modules/dri @@ -37,13 +37,7 @@ CPPFLAGS+= \ -I${MESA_INCLUDE} \ -I${MESA_INCLUDE}/GL/internal \ -I${MESA} \ - -I${MESA}/main \ - -I${MESA}/math \ -I${MESA}/glapi \ - -I${MESA}/tnl \ - -I${MESA}/shader \ - -I${MESA}/shader/grammar \ - -I${MESA}/shader/slang \ -I${GLX} \ -I${X11BASE}/include \ -I/usr/include/dev/pci/drm \ @@ -77,6 +71,7 @@ INCS= \ GLAPI_SOURCES= \ dispatch.c \ glapi.c \ + glapi_getproc.c \ glthread.c \ $(ASM_API) @@ -92,18 +87,6 @@ ASM_API = glapi_x86-64.S SPARC_API = glapi_sparc.S .endif -X11_DRIVER_SOURCES = \ - glxapi.c \ - fakeglx.c \ - xfonts.c \ - xm_api.c \ - xm_buffer.c \ - xm_dd.c \ - xm_glide.c \ - xm_line.c \ - xm_span.c \ - xm_tri.c - GLX_SOURCES= \ glcontextmodes.c \ clientattrib.c \ @@ -122,7 +105,7 @@ GLX_SOURCES= \ indirect_vertex_array.c \ indirect_vertex_program.c \ glxpixel.c \ - pixelstore.c \ + glxpixelstore.c \ render2.c \ renderpix.c \ single2.c \ @@ -136,6 +119,8 @@ GLX_SOURCES= \ dri_glx.c \ XF86dri.c \ glxhash.c \ + dri2_glx.c \ + dri2.c SRCS = $(GLX_SOURCES) \ $(GLAPI_SOURCES) @@ -167,12 +152,18 @@ glxeval.c: ${GLX}/eval.c glxpixel.c: ${GLX}/pixel.c ln -s ${GLX}/pixel.c $@ -CLEANFILES+= glxeval.c glxpixel.c +glxpixelstore.c: ${GLX}/pixelstore.c + ln -s ${GLX}/pixelstore.c $@ + +CLEANFILES+= glxeval.c glxpixel.c glxpixelstore.c gl.pc: ${MESA}/gl.pc.in Makefile sed -e 's,@INSTALL_DIR@,$(X11BASE),' \ -e 's,@INSTALL_LIB_DIR@,${LIBDIR},' \ -e 's,@INSTALL_INC_DIR@,${INCSDIR},' \ + -e 's,@GL_PC_REQ_PRIV@,libdrm >= 2.4.3 dri2proto >= 1.99.3 x11 xext xxf86vm xdamage xfixes,' \ + -e 's,@GL_PC_LIB_PRIV@,-L${LIBDIR} -lXxf86vm -lXext -lXdamage -lXfixes -lX11 -lXau -lXdmcp,' \ + -e 's,@GL_PC_CFLAGS@,-I${INCSDIR},' \ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ < ${MESA}/gl.pc.in > gl.pc @@ -185,6 +176,7 @@ dri.pc: ${MESA_DRI}/dri.pc.in Makefile -e 's,@INSTALL_INC_DIR@,${INCSDIR},' \ -e 's,@DRI_DRIVER_DIR@,${DRI_DRIVER_INSTALL_DIR},' \ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ + -e 's,@DRI_PC_REQ_PRIV@,,' \ < ${MESA_DRI}/dri.pc.in > dri.pc .endif @@ -211,22 +203,8 @@ CLEANFILES+= gl.pc ${DRI_PC} .if ${MACHINE_ARCH} == amd64 .PATH: ${MESA}/x86-64 .endif -.PATH: ${MESA}/glapi .PATH: ${MESA}/main -.PATH: ${MESA}/math -.PATH: ${MESA}/swrast -.PATH: ${MESA}/swrast_setup -.PATH: ${MESA}/tnl -.PATH: ${MESA}/shader -.PATH: ${MESA}/shader/grammar -.PATH: ${MESA}/shader/slang -.PATH: ${MESA}/shader/slang/MachineIndependent -.PATH: ${MESA}/shader/slang/MachineIndependent/preprocessor -.PATH: ${MESA}/shader/slang/OGLCompilersDLL -.PATH: ${MESA}/shader/slang/OSDependent/Linux -.PATH: ${MESA}/vbo -.PATH: ${MESA}/drivers/common -.PATH: ${MESA}/drivers/x11 +.PATH: ${MESA}/glapi .PATH: ${GLX} .include diff --git a/lib/libGL/dri/Makefile b/lib/libGL/dri/Makefile index 7ed3c016c..1c89792e5 100644 --- a/lib/libGL/dri/Makefile +++ b/lib/libGL/dri/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2009/01/28 16:10:44 matthieu Exp $ +# $OpenBSD: Makefile,v 1.7 2009/05/17 20:20:23 matthieu Exp $ SUBDIR= swrast @@ -15,8 +15,7 @@ build depend all install clean cleandir: _SUBDIRUSE MESA_INCLUDE= ${.CURDIR}/../../../dist/Mesa/include INCS = \ - dri_interface.h \ - dri_sarea.h + dri_interface.h includes: cd ${MESA_INCLUDE}/GL/internal; for i in ${INCS}; do \ diff --git a/lib/libGL/dri/Makefile.inc b/lib/libGL/dri/Makefile.inc index ea5fec1db..a64c46053 100644 --- a/lib/libGL/dri/Makefile.inc +++ b/lib/libGL/dri/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.8 2009/01/10 16:06:51 oga Exp $ +# $OpenBSD: Makefile.inc,v 1.9 2009/05/17 20:20:23 matthieu Exp $ .include MESA= ${.CURDIR}/../../../../dist/Mesa/src/mesa @@ -14,10 +14,6 @@ COMMON_SOURCES = \ xmlconfig.c \ drirenderbuffer.c -COMMON_BM_SOURCES = \ - dri_bufmgr.c \ - dri_bufmgr_fake.c - CFLAGS+= -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DPTHREADS $(INCLUDES) $(DRIVER_DEFINES) INCLUDES = \ diff --git a/lib/libGL/dri/i915/Makefile b/lib/libGL/dri/i915/Makefile index 63c631e11..ab43b3fb8 100644 --- a/lib/libGL/dri/i915/Makefile +++ b/lib/libGL/dri/i915/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2009/01/10 16:02:04 oga Exp $ +# $OpenBSD: Makefile,v 1.5 2009/05/17 20:20:23 matthieu Exp $ LIB= i915_dri.so @@ -14,6 +14,7 @@ DRIVER_SOURCES = \ intel_regions.c \ intel_buffer_objects.c \ intel_batchbuffer.c \ + intel_clear.c \ intel_mipmap_tree.c \ i915_tex_layout.c \ intel_tex_layout.c \ @@ -26,10 +27,11 @@ DRIVER_SOURCES = \ intel_pixel.c \ intel_pixel_bitmap.c \ intel_pixel_copy.c \ - intel_pixel_read.c \ intel_pixel_draw.c \ + intel_pixel_read.c \ intel_buffers.c \ intel_blit.c \ + intel_swapbuffers.c \ i915_tex.c \ i915_texstate.c \ i915_context.c \ @@ -42,7 +44,6 @@ DRIVER_SOURCES = \ i915_vtbl.c \ intel_context.c \ intel_decode.c \ - intel_ioctl.c \ intel_screen.c \ intel_span.c \ intel_state.c \ @@ -52,16 +53,17 @@ DRIVER_SOURCES = \ SRCS= \ $(COMMON_SOURCES) \ - $(COMMON_BM_SOURCES) \ $(DRIVER_SOURCES) DRIVER_DEFINES= \ -I$(MESA)/drivers/dri/i915 \ -I$(MESA)/drivers/dri/intel \ -I$(MESA)/drivers/dri/intel/server \ - -DI915 -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP + -DI915 .include +LDADD+= -ldrm_intel + .PATH: ${MESA}/drivers/dri/i915 .PATH: ${MESA}/drivers/dri/intel diff --git a/lib/libGL/dri/i965/Makefile b/lib/libGL/dri/i965/Makefile index 22fc18ca2..0d39eb277 100644 --- a/lib/libGL/dri/i965/Makefile +++ b/lib/libGL/dri/i965/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2009/01/10 16:02:04 oga Exp $ +# $OpenBSD: Makefile,v 1.4 2009/05/17 20:20:23 matthieu Exp $ LIB= i965_dri.so @@ -7,19 +7,21 @@ DRIVER_SOURCES = \ intel_blit.c \ intel_buffer_objects.c \ intel_buffers.c \ + intel_clear.c \ intel_context.c \ intel_decode.c \ intel_depthstencil.c \ intel_fbo.c \ - intel_ioctl.c \ intel_mipmap_tree.c \ intel_regions.c \ intel_screen.c \ intel_span.c \ intel_pixel.c \ - intel_pixel_copy.c \ intel_pixel_bitmap.c \ + intel_pixel_copy.c \ + intel_pixel_draw.c \ intel_state.c \ + intel_swapbuffers.c \ intel_tex.c \ intel_tex_copy.c \ intel_tex_format.c \ @@ -47,9 +49,9 @@ DRIVER_SOURCES = \ brw_gs.c \ brw_gs_emit.c \ brw_gs_state.c \ - brw_metaops.c \ brw_misc_state.c \ brw_program.c \ + brw_queryobj.c \ brw_sf.c \ brw_sf_emit.c \ brw_sf_state.c \ @@ -65,7 +67,6 @@ DRIVER_SOURCES = \ brw_vs_constval.c \ brw_vs_emit.c \ brw_vs_state.c \ - brw_vs_tnl.c \ brw_vtbl.c \ brw_wm.c \ brw_wm_debug.c \ @@ -82,7 +83,6 @@ DRIVER_SOURCES = \ SRCS = \ $(COMMON_SOURCES) \ - $(COMMON_BM_SOURCES) \ $(MINIGLX_SOURCES) \ $(DRIVER_SOURCES) @@ -94,5 +94,7 @@ DRIVER_DEFINES = \ .include +LDADD+= -ldrm_intel + .PATH: $(MESA)/drivers/dri/i965 .PATH: $(MESA)/drivers/dri/intel diff --git a/lib/libGL/dri/r300/Makefile b/lib/libGL/dri/r300/Makefile index c66d4ae01..e7f92a647 100644 --- a/lib/libGL/dri/r300/Makefile +++ b/lib/libGL/dri/r300/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2008/11/02 15:01:32 matthieu Exp $ +# $OpenBSD: Makefile,v 1.3 2009/05/17 20:20:23 matthieu Exp $ LIB= r300_dri.so diff --git a/lib/libGL/dri/s3v/Makefile b/lib/libGL/dri/s3v/Makefile index 46cacba41..ab5a175e1 100644 --- a/lib/libGL/dri/s3v/Makefile +++ b/lib/libGL/dri/s3v/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2008/11/02 15:01:32 matthieu Exp $ +# $OpenBSD: Makefile,v 1.2 2009/05/17 20:20:23 matthieu Exp $ LIB= s3v_dri.so diff --git a/lib/libGL/dri/trident/Makefile b/lib/libGL/dri/trident/Makefile index 56b78ff5f..8c6df7780 100644 --- a/lib/libGL/dri/trident/Makefile +++ b/lib/libGL/dri/trident/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2008/11/02 15:01:32 matthieu Exp $ +# $OpenBSD: Makefile,v 1.2 2009/05/17 20:20:23 matthieu Exp $ LIB= trident_dri.so diff --git a/lib/libGL/libmesa/Makefile b/lib/libGL/libmesa/Makefile index 34d9aa408..73a7bf608 100644 --- a/lib/libGL/libmesa/Makefile +++ b/lib/libGL/libmesa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2009/01/10 16:06:51 oga Exp $ +# $OpenBSD: Makefile,v 1.8 2009/05/17 20:20:24 matthieu Exp $ MESA= ${.CURDIR}/../../../dist/Mesa/src/mesa MESA_INCLUDE= ${.CURDIR}/../../../dist/Mesa/include @@ -43,6 +43,7 @@ CPPFLAGS += \ # main MAIN_SOURCES= \ api_arrayelt.c \ + api_exec.c \ api_loopback.c \ api_noop.c \ api_validate.c \ @@ -52,6 +53,7 @@ MAIN_SOURCES= \ blend.c \ bufferobj.c \ buffers.c \ + clear.c \ clip.c \ colortab.c \ context.c \ @@ -60,6 +62,7 @@ MAIN_SOURCES= \ depth.c \ depthstencil.c \ dlist.c \ + dlopen.c \ drawpix.c \ enable.c \ enums.c \ @@ -68,6 +71,7 @@ MAIN_SOURCES= \ extensions.c \ fbobject.c \ feedback.c \ + ffvertex_prog.c \ fog.c \ framebuffer.c \ get.c \ @@ -82,23 +86,30 @@ MAIN_SOURCES= \ matrix.c \ mipmap.c \ mm.c \ + multisample.c \ pixel.c \ + pixelstore.c \ points.c \ polygon.c \ queryobj.c \ rastpos.c \ rbadaptors.c \ + readpix.c \ renderbuffer.c \ + scissor.c \ shaders.c \ state.c \ stencil.c \ texcompress.c \ texcompress_s3tc.c \ texcompress_fxt1.c \ + texenv.c \ texenvprogram.c \ texformat.c \ + texgen.c \ teximage.c \ texobj.c \ + texparam.c \ texrender.c \ texstate.c \ texstore.c \ @@ -116,62 +127,6 @@ MATH_SOURCES= \ m_vector.c \ m_xform.c -VBO_SOURCES = \ - vbo_context.c \ - vbo_exec.c \ - vbo_exec_api.c \ - vbo_exec_array.c \ - vbo_exec_draw.c \ - vbo_exec_eval.c \ - vbo_rebase.c \ - vbo_split.c \ - vbo_split_copy.c \ - vbo_split_inplace.c \ - vbo_save.c \ - vbo_save_api.c \ - vbo_save_draw.c \ - vbo_save_loopback.c - -# tnl -TNL_SOURCES= \ - t_context.c \ - t_pipeline.c \ - t_draw.c \ - t_vb_program.c \ - t_vb_render.c \ - t_vb_texgen.c \ - t_vb_texmat.c \ - t_vb_vertex.c \ - t_vb_cull.c \ - t_vb_fog.c \ - t_vb_light.c \ - t_vb_normals.c \ - t_vb_points.c \ - t_vp_build.c \ - t_vertex.c \ - t_vertex_sse.c \ - t_vertex_generic.c \ - -# shader -SHADER_SOURCES= \ - arbprogparse.c \ - arbprogram.c \ - atifragshader.c \ - grammar_mesa.c \ - nvfragparse.c \ - nvprogram.c \ - nvvertparse.c \ - program.c \ - prog_debug.c \ - prog_execute.c \ - prog_instruction.c \ - prog_parameter.c \ - prog_print.c \ - prog_statevars.c \ - prog_uniform.c \ - programopt.c \ - shader_api.c \ - # swrast SWRAST_SOURCES= \ s_aaline.c \ @@ -209,8 +164,64 @@ SWRAST_SETUP_SOURCES= \ ss_context.c \ ss_triangle.c -COMMON_DRIVER_SOURCES = \ - driverfuncs.c +# tnl +TNL_SOURCES= \ + t_context.c \ + t_pipeline.c \ + t_draw.c \ + t_rasterpos.c \ + t_vb_program.c \ + t_vb_render.c \ + t_vb_texgen.c \ + t_vb_texmat.c \ + t_vb_vertex.c \ + t_vb_cull.c \ + t_vb_fog.c \ + t_vb_light.c \ + t_vb_normals.c \ + t_vb_points.c \ + t_vp_build.c \ + t_vertex.c \ + t_vertex_sse.c \ + t_vertex_generic.c + +VBO_SOURCES = \ + vbo_context.c \ + vbo_exec.c \ + vbo_exec_api.c \ + vbo_exec_array.c \ + vbo_exec_draw.c \ + vbo_exec_eval.c \ + vbo_rebase.c \ + vbo_split.c \ + vbo_split_copy.c \ + vbo_split_inplace.c \ + vbo_save.c \ + vbo_save_api.c \ + vbo_save_draw.c \ + vbo_save_loopback.c + +# shader +SHADER_SOURCES= \ + arbprogparse.c \ + arbprogram.c \ + atifragshader.c \ + grammar_mesa.c \ + nvfragparse.c \ + nvprogram.c \ + nvvertparse.c \ + program.c \ + prog_cache.c \ + prog_debug.c \ + prog_execute.c \ + prog_instruction.c \ + prog_noise.c \ + prog_parameter.c \ + prog_print.c \ + prog_statevars.c \ + prog_uniform.c \ + programopt.c \ + shader_api.c # shader/slang SLANG_SOURCES= \ @@ -224,7 +235,6 @@ SLANG_SOURCES= \ slang_emit.c \ slang_ir.c \ slang_label.c \ - slang_library_noise.c \ slang_link.c \ slang_log.c \ slang_mem.c \ @@ -283,7 +293,10 @@ ASM_C_SOURCES= \ common_ppc.c .endif -SOLO_SOURCES = \ +COMMON_DRIVER_SOURCES = \ + driverfuncs.c + +MESA_SOURCES = \ $(MAIN_SOURCES) \ $(MATH_SOURCES) \ $(VBO_SOURCES) \ @@ -295,7 +308,7 @@ SOLO_SOURCES = \ $(ASM_C_SOURCES) \ $(SLANG_SOURCES) -SRCS= ${SOLO_SOURCES} \ +SRCS= ${MESA_SOURCES} \ ${ASM_SOURCES} OBJS+= ${SRCS:N*.h:R:S/$/.so/g} diff --git a/lib/libGL/shlib_version b/lib/libGL/shlib_version index d0f0988b4..1c5d96eb2 100644 --- a/lib/libGL/shlib_version +++ b/lib/libGL/shlib_version @@ -1,2 +1,2 @@ -major=8 +major=9 minor=0