Update build infrastructure for libGL after Mesa 7.2 update.

This commit is contained in:
matthieu 2008-11-02 15:01:32 +00:00
parent 895907f0b2
commit 8baeee737f
11 changed files with 282 additions and 110 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.19 2008/07/16 20:24:39 brad Exp $
# $OpenBSD: Makefile,v 1.20 2008/11/02 15:01:32 matthieu Exp $
.include <bsd.xconf.mk>
.if ${XENOCARA_BUILD_DRI:L} == "yes"
@ -11,10 +11,11 @@ MESA= ${.CURDIR}/../../dist/Mesa/src/mesa
GL= ${.CURDIR}/../../dist/Mesa/src/GL
GLX= ${.CURDIR}/../../dist/Mesa/src/glx/x11
MESA_INCLUDE= ${.CURDIR}/../../dist/Mesa/include
MESA_DRI= ${.CURDIR}/../../dist/Mesa/src/mesa/drivers/dri
MESA_MAJOR= 7
MESA_MINOR= 0
MESA_TINY= 3
MESA_MINOR= 1
MESA_TINY= 0
DRI_DRIVER_INSTALL_DIR= ${X11BASE}/lib/modules/dri
@ -52,7 +53,8 @@ CPPFLAGS+= \
-D_REENTRANT
.if ${XENOCARA_BUILD_DRI:L} == "yes"
CPPFLAGS+= -DGLX_DIRECT_RENDERING
CPPFLAGS+= -DGLX_DIRECT_RENDERING -DXF86VIDMODE \
-DDEFAULT_DRIVER_DIR=\"${DRI_DRIVER_INSTALL_DIR}\"
.endif
.if ${MACHINE_ARCH} == "i386"
@ -90,9 +92,6 @@ ASM_API = glapi_x86-64.S
SPARC_API = glapi_sparc.S
.endif
COMMON_DRIVER_SOURCES = \
driverfuncs.c
X11_DRIVER_SOURCES = \
glxapi.c \
fakeglx.c \
@ -111,12 +110,14 @@ GLX_SOURCES= \
compsize.c \
glxeval.c \
glxcmds.c \
glxcurrent.c \
glxext.c \
glxextensions.c \
indirect.c \
indirect_init.c \
indirect_size.c \
indirect_window_pos.c \
indirect_texture_compression.c \
indirect_transpose_matrix.c \
indirect_vertex_array.c \
indirect_vertex_program.c \
@ -130,14 +131,16 @@ GLX_SOURCES= \
xfont.c \
glx_pbuffer.c \
glx_query.c \
glx_texture_compression.c \
drisw_glx.c \
dri_common.c \
dri_glx.c \
XF86dri.c
XF86dri.c \
glxhash.c \
SRCS = $(GLX_SOURCES) \
$(GLAPI_SOURCES)
includes:
includes: _SUBDIRUSE
cd ${MESA_INCLUDE}/GL; for i in ${INCS}; do \
j="cmp -s $$i ${DESTDIR}${INCSDIR}/GL/$$i || \
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
@ -172,9 +175,27 @@ gl.pc: ${MESA}/gl.pc.in Makefile
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
< ${MESA}/gl.pc.in > gl.pc
afterinstall: gl.pc
.if ${XENOCARA_BUILD_DRI:L} == "yes"
DRI_PC=dri.pc
dri.pc: ${MESA_DRI}/dri.pc.in
sed -e 's,@INSTALL_DIR@,${X11BASE},' \
-e 's,@INSTALL_LIB_DIR@,${LIBDIR},' \
-e 's,@INSTALL_INC_DIR@,${INCDIR},' \
-e 's,@DRI_DRIVER_DIR@,${DRI_DRIVER_INSTALL_DIR},' \
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
< ${MESA_DRI}/dri.pc.in > dri.pc
.endif
afterinstall: gl.pc ${DRI_PC}
$(INSTALL) -c -m 644 -o root -g wheel gl.pc \
${DESTDIR}${LIBDIR}/pkgconfig
.if ${XENOCARA_BUILD_DRI:L} == "yes"
$(INSTALL) -c -m 644 -o root -g wheel dri.pc \
${DESTDIR}${LIBDIR}/pkgconfig
.endif
CLEANFILES+= gl.pc ${DRI_PC}
.if ${MACHINE_ARCH} == i386
.PATH: ${MESA}/x86

View File

@ -1,8 +1,30 @@
SUBDIR= i810 i915 i965 mach64 mga r128 \
r200 r300 radeon savage sis tdfx unichrome
SUBDIR= swrast
.if ${MACHINE} == i386 || ${MACHINE} == amd64
SUBDIR+= i810 i915 i965 mach64 mga r128 \
r200 r300 radeon s3v savage sis tdfx trident unichrome
.endif
.if ${MACHINE} == sparc64
SUBDIR+= mach64 r128 r200 r300 radeon
.endif
build depend all install clean cleandir: _SUBDIRUSE
MESA_INCLUDE= ${.CURDIR}/../../../dist/Mesa/include
INCS = \
dri_interface.h \
dri_sarea.h
includes:
cd ${MESA_INCLUDE}/GL/internal; for i in ${INCS}; do \
j="cmp -s $$i ${DESTDIR}${INCSDIR}/GL/internal/$$i || \
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
$$i ${DESTDIR}${INCSDIR}/GL/internal"; \
echo "\tinstalling $$i"; \
eval "$$j"; \
done
.include <bsd.xorg.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.6 2008/04/19 07:15:17 matthieu Exp $
# $OpenBSD: Makefile.inc,v 1.7 2008/11/02 15:01:32 matthieu Exp $
.include <bsd.xconf.mk>
MESA= ${.CURDIR}/../../../../dist/Mesa/src/mesa
@ -7,7 +7,6 @@ TOP= ${.CURDIR}/../../../../dist/Mesa
DRI_DRIVER_INSTALL_DIR= ${X11BASE}/lib/modules/dri
COMMON_SOURCES = \
driverfuncs.c \
utils.c \
texmem.c \
vblank.c \
@ -17,7 +16,7 @@ COMMON_SOURCES = \
COMMON_BM_SOURCES = \
dri_bufmgr.c \
dri_drmpool.c
dri_bufmgr_fake.c
CFLAGS+= -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DPTHREADS $(INCLUDES) $(DRIVER_DEFINES)
@ -38,6 +37,16 @@ INCLUDES = \
-I$(X11BASE)/include \
-I$(X11BASE)/include/drm
.if ${MACHINE_ARCH} == "i386"
CPPFLAGS += \
-DUSE_X86_ASM \
-DUSE_MMX_ASM \
-DUSE_3DNOW_ASM \
-DUSE_SSE_ASM
.elif ${MACHINE_ARCH} == "amd64"
CPPFLAGS += -DUSE_X86_64_ASM
.endif
LDADD= ../../libmesa/libmesa_pic.a -L${X11BASE}/lib -lX11 -lexpat -ldrm -lm
DPADD= ../../libmesa/libmesa_pic.a

View File

@ -1,18 +1,8 @@
# $OpenBSD: Makefile,v 1.1 2007/12/04 22:00:27 matthieu Exp $
# $OpenBSD: Makefile,v 1.2 2008/11/02 15:01:32 matthieu Exp $
LIB= i915_dri.so
DRIVER_SOURCES = \
i915_context.c \
i915_debug.c \
i915_fragprog.c \
i915_metaops.c \
i915_program.c \
i915_state.c \
i915_tex.c \
i915_texprog.c \
i915_texstate.c \
i915_vtbl.c \
i830_context.c \
i830_metaops.c \
i830_state.c \
@ -20,22 +10,57 @@ DRIVER_SOURCES = \
i830_tex.c \
i830_texstate.c \
i830_vtbl.c \
intel_batchbuffer.c \
intel_context.c \
intel_ioctl.c \
intel_pixel.c \
intel_render.c \
intel_rotate.c \
intel_regions.c \
intel_buffer_objects.c \
intel_batchbuffer.c \
intel_mipmap_tree.c \
i915_tex_layout.c \
intel_tex_layout.c \
intel_tex_image.c \
intel_tex_subimage.c \
intel_tex_copy.c \
intel_tex_validate.c \
intel_tex_format.c \
intel_tex.c \
intel_pixel.c \
intel_pixel_bitmap.c \
intel_pixel_copy.c \
intel_pixel_read.c \
intel_pixel_draw.c \
intel_buffers.c \
intel_blit.c \
i915_tex.c \
i915_texstate.c \
i915_context.c \
i915_debug.c \
i915_debug_fp.c \
i915_fragprog.c \
i915_metaops.c \
i915_program.c \
i915_state.c \
i915_vtbl.c \
intel_context.c \
intel_decode.c \
intel_ioctl.c \
intel_screen.c \
intel_span.c \
intel_state.c \
intel_tex.c \
intel_texmem.c \
intel_tris.c
intel_tris.c \
intel_fbo.c \
intel_depthstencil.c \
intel_bufmgr_ttm.c
SRCS= ${DRIVER_SOURCES} ${COMMON_SOURCES}
SRCS= \
$(COMMON_SOURCES) \
$(COMMON_BM_SOURCES) \
$(DRIVER_SOURCES)
DRIVER_DEFINES= -I$(MESA)/drivers/dri/i915/server
DRIVER_DEFINES= \
-I$(MESA)/drivers/dri/i915/server \
-I$(MESA)/drivers/dri/intel \
-I$(MESA)/drivers/dri/intel/server \
-DI915 -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP
.include <bsd.xorg.mk>

View File

@ -1,27 +1,33 @@
# $OpenBSD: Makefile,v 1.1 2007/12/04 22:00:27 matthieu Exp $
# $OpenBSD: Makefile,v 1.2 2008/11/02 15:01:32 matthieu Exp $
LIB= i965_dri.so
DRIVER_SOURCES = \
bufmgr_fake.c \
intel_batchbuffer.c \
intel_blit.c \
intel_buffer_objects.c \
intel_buffers.c \
intel_bufmgr_ttm.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_state.c \
intel_tex.c \
intel_tex_copy.c \
intel_tex_format.c \
intel_tex_image.c \
intel_tex_layout.c \
intel_tex_subimage.c \
intel_tex_validate.c \
brw_aub.c \
brw_aub_playback.c \
brw_cc.c \
brw_clip.c \
brw_clip_line.c \
@ -42,7 +48,6 @@ DRIVER_SOURCES = \
brw_gs.c \
brw_gs_emit.c \
brw_gs_state.c \
brw_hal.c \
brw_metaops.c \
brw_misc_state.c \
brw_program.c \
@ -51,7 +56,7 @@ DRIVER_SOURCES = \
brw_sf_state.c \
brw_state_batch.c \
brw_state_cache.c \
brw_state_pool.c \
brw_state_dump.c \
brw_state_upload.c \
brw_tex.c \
brw_tex_layout.c \
@ -68,6 +73,7 @@ DRIVER_SOURCES = \
brw_wm_emit.c \
brw_wm_fp.c \
brw_wm_iz.c \
brw_wm_glsl.c \
brw_wm_pass0.c \
brw_wm_pass1.c \
brw_wm_pass2.c \
@ -77,13 +83,15 @@ DRIVER_SOURCES = \
SRCS = \
$(COMMON_SOURCES) \
$(COMMON_BM_SOURCES) \
$(MINIGLX_SOURCES) \
$(DRIVER_SOURCES)
DRIVER_DEFINES = \
-I$(MESA)/drivers/dri/i965 \
-I$(MESA)/drivers/dri/i965/server \
-I$(MESA)/drivers/dri/intel
-I$(MESA)/drivers/dri/intel \
-I$(MESA)/drivers/dri/intel/server
.include <bsd.xorg.mk>

View File

@ -1,15 +1,14 @@
# $OpenBSD: Makefile,v 1.1 2007/12/04 22:00:27 matthieu Exp $
# $OpenBSD: Makefile,v 1.2 2008/11/02 15:01:32 matthieu Exp $
LIB= r300_dri.so
COMMON_SOURCES = \
../../common/driverfuncs.c \
../common/mm.c \
../common/utils.c \
../common/texmem.c \
../common/vblank.c \
../common/xmlconfig.c \
../common/dri_util.c
utils.c \
texmem.c \
vblank.c \
dri_util.c \
xmlconfig.c \
drirenderbuffer.c
DRIVER_SOURCES = \
radeon_screen.c \
@ -28,10 +27,19 @@ DRIVER_SOURCES = \
r300_texmem.c \
r300_tex.c \
r300_texstate.c \
radeon_program.c \
radeon_program_alu.c \
radeon_program_pair.c \
radeon_nqssadce.c \
r300_vertprog.c \
r300_fragprog.c \
r300_fragprog_swizzle.c \
r300_fragprog_emit.c \
r500_fragprog.c \
r500_fragprog_emit.c \
r300_shader.c \
r300_emit.c \
r300_swtcl.c
SRCS = $(COMMON_SOURCES) $(DRIVER_SOURCES)

View File

@ -0,0 +1,29 @@
# $OpenBSD: Makefile,v 1.1 2008/11/02 15:01:32 matthieu Exp $
LIB= s3v_dri.so
DRIVER_SOURCES = \
s3v_context.c \
s3v_dd.c \
s3v_inithw.c \
s3v_lock.c \
s3v_render.c \
s3v_screen.c \
s3v_span.c \
s3v_state.c \
s3v_tex.c \
s3v_texmem.c \
s3v_texstate.c \
s3v_tris.c \
s3v_vb.c \
s3v_xmesa.c
SRCS = \
$(COMMON_SOURCES) \
$(DRIVER_SOURCES)
DRIVER_DEFINES = -I$(MESA)/drivers/dri/s3v/server
.include <bsd.xorg.mk>
.PATH: $(MESA)/drivers/dri/s3v

View File

@ -0,0 +1,19 @@
# $OpenBSD: Makefile,v 1.1 2008/11/02 15:01:32 matthieu Exp $
LIB= swrast_dri.so
SWRAST_COMMON_SOURCES = \
driverfuncs.c \
utils.c
DRIVER_SOURCES = \
swrast.c \
swrast_span.c
SRCS = \
$(SWRAST_COMMON_SOURCES) \
$(DRIVER_SOURCES)
.include <bsd.xorg.mk>
.PATH: $(MESA)/drivers/dri/swrast

View File

@ -0,0 +1,19 @@
# $OpenBSD: Makefile,v 1.1 2008/11/02 15:01:32 matthieu Exp $
LIB= trident_dri.so
DRIVER_SOURCES = \
trident_context.c \
trident_state.c \
trident_vb.c \
trident_tris.c
SRCS = \
$(COMMON_SOURCES) \
$(DRIVER_SOURCES)
DRIVER_DEFINES = -I$(MESA)/drivers/dri/trident/server
.include <bsd.xorg.mk>
.PATH: $(MESA)/drivers/dri/trident

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 2008/09/14 19:47:42 matthieu Exp $
# $OpenBSD: Makefile,v 1.5 2008/11/02 15:01:32 matthieu Exp $
MESA= ${.CURDIR}/../../../dist/Mesa/src/mesa
MESA_INCLUDE= ${.CURDIR}/../../../dist/Mesa/include
@ -116,6 +116,62 @@ 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 \
@ -153,60 +209,8 @@ SWRAST_SETUP_SOURCES= \
ss_context.c \
ss_triangle.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 \
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_debug.c \
prog_execute.c \
prog_instruction.c \
prog_parameter.c \
prog_print.c \
prog_statevars.c \
programopt.c \
shader_api.c \
COMMON_DRIVER_SOURCES = \
driverfuncs.c
# shader/slang
SLANG_SOURCES= \
@ -287,6 +291,7 @@ SOLO_SOURCES = \
$(SHADER_SOURCES) \
$(SWRAST_SOURCES) \
$(SWRAST_SETUP_SOURCES) \
$(COMMON_DRIVER_SOURCES) \
$(ASM_C_SOURCES) \
$(SLANG_SOURCES)
@ -305,7 +310,7 @@ install:
@echo "Not installing libmesa"
clean:
rm -f ${LIB}_pic.a ${OBJS} ${CLEANFILES}
rm -f ${LIB}_pic.a ${OBJS} $(CLEANFILES)
cleandir: clean
@ -392,3 +397,10 @@ x86_xform4.so: matypes.h
.PATH: ${MESA}/drivers/common
.include <bsd.xorg.mk>
# Prevent a gcc ICE
.if ${MACHINE_ARCH} == mips64
s_copypix.so: s_copypix.c
${CC} -c -O0 ${CPPFLAGS} -fpic -DPIC $<
.endif

View File

@ -1,2 +1,2 @@
major=7
minor=3
major=8
minor=0