diff options
1688 files changed, 715075 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..98344720775 --- /dev/null +++ b/Makefile @@ -0,0 +1,452 @@ +# Top-level Mesa makefile + +TOP = . + +SUBDIRS = src progs + + +default: $(TOP)/configs/current + @for dir in $(SUBDIRS) ; do \ + (cd $$dir ; $(MAKE)) || exit 1 ; \ + done + + +doxygen: + (cd doxygen ; make) ; \ + +clean: + @for dir in $(SUBDIRS) ; do \ + (cd $$dir ; $(MAKE) clean) ; \ + done + + +realclean: + touch $(TOP)/configs/current + $(MAKE) clean + -rm -rf lib* + -rm -f $(TOP)/configs/current + -rm -f `find . -name \*.o` + -rm -f `find . -name \*.a` + -rm -f `find . -name \*.so` + -rm -f `find . -name depend` + + + +install: + @echo "Installing" + $(TOP)/bin/installmesa $(DESTDIR) + +# DirectFBGL module installation +linux-directfb-install: + cd src/mesa/drivers/directfb && $(MAKE) install + +# If there's no current configuration file +$(TOP)/configs/current: + @echo + @echo + @echo "Please choose a configuration from the following list:" + @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS" + @echo + @echo "Then type 'make <config>' (ex: 'make linux-x86')" + @echo "(ignore the following error message)" + @exit 1 + + +# Rules to set/install a specific build configuration +aix \ +aix-64 \ +aix-gcc \ +aix-static \ +beos \ +darwin \ +darwin-static \ +freebsd \ +freebsd-dri \ +freebsd-dri-amd64 \ +freebsd-dri-x86 \ +hpux10 \ +hpux10-gcc \ +hpux10-static \ +hpux11-32 \ +hpux11-32-static \ +hpux11-32-static-nothreads \ +hpux11-64 \ +hpux11-64-static \ +hpux9 \ +hpux9-gcc \ +irix6-64 \ +irix6-64-static \ +irix6-n32 \ +irix6-n32-static \ +irix6-o32 \ +irix6-o32-static \ +linux \ +linux-alpha \ +linux-alpha-static \ +linux-debug \ +linux-directfb \ +linux-dri \ +linux-dri-x86 \ +linux-dri-x86-64 \ +linux-dri-ppc \ +linux-dri-xcb \ +linux-indirect \ +linux-fbdev \ +linux-glide \ +linux-icc \ +linux-icc-static \ +linux-osmesa16 \ +linux-osmesa16-static \ +linux-osmesa32 \ +linux-ppc \ +linux-ppc-static \ +linux-solo \ +linux-solo-x86 \ +linux-solo-ia64 \ +linux-sparc \ +linux-sparc5 \ +linux-static \ +linux-ultrasparc \ +linux-tcc \ +linux-x86 \ +linux-x86-debug \ +linux-x86-32 \ +linux-x86-64 \ +linux-x86-64-debug \ +linux-x86-64-static \ +linux-x86-glide \ +linux-x86-static \ +netbsd \ +openbsd \ +osf1 \ +solaris-x86 \ +solaris-x86-gcc \ +sunos4 \ +sunos4-gcc \ +sunos4-static \ +sunos5 \ +sunos5-gcc \ +sunos5-smp \ +ultrix-gcc: + (cd configs && rm -f current && ln -s $@ current) + $(MAKE) default + + +# Rules for making release tarballs + +DIRECTORY = Mesa-6.5 +LIB_NAME = MesaLib-6.5 +DEMO_NAME = MesaDemos-6.5 +GLUT_NAME = MesaGLUT-6.5 + +MAIN_FILES = \ + $(DIRECTORY)/Makefile* \ + $(DIRECTORY)/descrip.mms \ + $(DIRECTORY)/mms-config. \ + $(DIRECTORY)/bin/mklib \ + $(DIRECTORY)/bin/installmesa \ + $(DIRECTORY)/configs/[a-z]* \ + $(DIRECTORY)/docs/*.html \ + $(DIRECTORY)/docs/COPYING \ + $(DIRECTORY)/docs/README.* \ + $(DIRECTORY)/docs/RELNOTES* \ + $(DIRECTORY)/docs/VERSIONS \ + $(DIRECTORY)/docs/*.spec \ + $(DIRECTORY)/include/GL/internal/glcore.h \ + $(DIRECTORY)/include/GL/amesa.h \ + $(DIRECTORY)/include/GL/dmesa.h \ + $(DIRECTORY)/include/GL/directfbgl.h \ + $(DIRECTORY)/include/GL/fxmesa.h \ + $(DIRECTORY)/include/GL/ggimesa.h \ + $(DIRECTORY)/include/GL/gl.h \ + $(DIRECTORY)/include/GL/glext.h \ + $(DIRECTORY)/include/GL/gl_mangle.h \ + $(DIRECTORY)/include/GL/glu.h \ + $(DIRECTORY)/include/GL/glu_mangle.h \ + $(DIRECTORY)/include/GL/glx.h \ + $(DIRECTORY)/include/GL/glxext.h \ + $(DIRECTORY)/include/GL/glx_mangle.h \ + $(DIRECTORY)/include/GL/glfbdev.h \ + $(DIRECTORY)/include/GL/mesa_wgl.h \ + $(DIRECTORY)/include/GL/mglmesa.h \ + $(DIRECTORY)/include/GL/osmesa.h \ + $(DIRECTORY)/include/GL/svgamesa.h \ + $(DIRECTORY)/include/GL/ugl*.h \ + $(DIRECTORY)/include/GL/vms_x_fix.h \ + $(DIRECTORY)/include/GL/wmesa.h \ + $(DIRECTORY)/include/GL/xmesa.h \ + $(DIRECTORY)/include/GL/xmesa_x.h \ + $(DIRECTORY)/include/GL/xmesa_xf86.h \ + $(DIRECTORY)/include/GLView.h \ + $(DIRECTORY)/src/Makefile \ + $(DIRECTORY)/src/descrip.mms \ + $(DIRECTORY)/src/mesa/Makefile* \ + $(DIRECTORY)/src/mesa/sources \ + $(DIRECTORY)/src/mesa/descrip.mms \ + $(DIRECTORY)/src/mesa/depend \ + $(DIRECTORY)/src/mesa/main/*.[chS] \ + $(DIRECTORY)/src/mesa/main/descrip.mms \ + $(DIRECTORY)/src/mesa/glapi/*.[chS] \ + $(DIRECTORY)/src/mesa/glapi/descrip.mms \ + $(DIRECTORY)/src/mesa/array_cache/*.[ch] \ + $(DIRECTORY)/src/mesa/array_cache/descrip.mms \ + $(DIRECTORY)/src/mesa/math/*.[ch] \ + $(DIRECTORY)/src/mesa/math/descrip.mms \ + $(DIRECTORY)/src/mesa/shader/*.[ch] \ + $(DIRECTORY)/src/mesa/shader/descrip.mms \ + $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \ + $(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \ + $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \ + $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \ + $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \ + $(DIRECTORY)/src/mesa/swrast/*.[ch] \ + $(DIRECTORY)/src/mesa/swrast/descrip.mms \ + $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \ + $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \ + $(DIRECTORY)/src/mesa/tnl/*.[chS] \ + $(DIRECTORY)/src/mesa/tnl/descrip.mms \ + $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \ + $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \ + $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \ + $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \ + $(DIRECTORY)/src/mesa/drivers/beos/Makefile \ + $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \ + $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \ + $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \ + $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \ + $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \ + $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \ + $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \ + $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \ + $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \ + $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \ + $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \ + $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \ + $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \ + $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \ + $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \ + $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \ + $(DIRECTORY)/src/mesa/ppc/*.[ch] \ + $(DIRECTORY)/src/mesa/sparc/*.[chS] \ + $(DIRECTORY)/src/mesa/x86/Makefile \ + $(DIRECTORY)/src/mesa/x86/*.[ch] \ + $(DIRECTORY)/src/mesa/x86/*.S \ + $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \ + $(DIRECTORY)/src/mesa/x86-64/*.[chS] \ + $(DIRECTORY)/src/mesa/x86-64/Makefile \ + $(DIRECTORY)/progs/Makefile \ + $(DIRECTORY)/progs/util/README \ + $(DIRECTORY)/progs/util/*.[ch] \ + $(DIRECTORY)/progs/util/sampleMakefile \ + $(DIRECTORY)/vms/analyze_map.com \ + $(DIRECTORY)/vms/xlib.opt \ + $(DIRECTORY)/vms/xlib_share.opt \ + $(DIRECTORY)/windows/VC6/mesa/gdi/gdi.dsp \ + $(DIRECTORY)/windows/VC6/mesa/glu/*.txt \ + $(DIRECTORY)/windows/VC6/mesa/glu/glu.dsp \ + $(DIRECTORY)/windows/VC6/mesa/mesa.dsw \ + $(DIRECTORY)/windows/VC6/mesa/mesa/mesa.dsp \ + $(DIRECTORY)/windows/VC6/mesa/osmesa/osmesa.dsp \ + $(DIRECTORY)/windows/VC7/mesa/gdi/gdi.vcproj \ + $(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \ + $(DIRECTORY)/windows/VC7/mesa/mesa.sln \ + $(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \ + $(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj + +DRI_FILES = \ + $(DIRECTORY)/include/GL/internal/dri_interface.h \ + $(DIRECTORY)/include/GL/internal/sarea.h \ + $(DIRECTORY)/src/glx/Makefile \ + $(DIRECTORY)/src/glx/x11/Makefile \ + $(DIRECTORY)/src/glx/x11/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/dri/Makefile \ + $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \ + $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \ + $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \ + $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \ + $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \ + $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch] + +SGI_GLU_FILES = \ + $(DIRECTORY)/src/glu/Makefile \ + $(DIRECTORY)/src/glu/descrip.mms \ + $(DIRECTORY)/src/glu/sgi/Makefile \ + $(DIRECTORY)/src/glu/sgi/Makefile.win \ + $(DIRECTORY)/src/glu/sgi/Makefile.DJ \ + $(DIRECTORY)/src/glu/sgi/glu.def \ + $(DIRECTORY)/src/glu/sgi/dummy.cc \ + $(DIRECTORY)/src/glu/sgi/descrip.mms \ + $(DIRECTORY)/src/glu/sgi/mesaglu.opt \ + $(DIRECTORY)/src/glu/sgi/include/gluos.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \ + $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \ + $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \ + $(DIRECTORY)/src/glu/sgi/libtess/README \ + $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \ + $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \ + $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] + +MESA_GLU_FILES = \ + $(DIRECTORY)/src/glu/mesa/README[12] \ + $(DIRECTORY)/src/glu/mesa/Makefile* \ + $(DIRECTORY)/src/glu/mesa/descrip.mms \ + $(DIRECTORY)/src/glu/mesa/mms_depend \ + $(DIRECTORY)/src/glu/mesa/*.def \ + $(DIRECTORY)/src/glu/mesa/depend \ + $(DIRECTORY)/src/glu/mesa/*.[ch] + +GLW_FILES = \ + $(DIRECTORY)/src/glw/*.[ch] \ + $(DIRECTORY)/src/glw/Makefile* \ + $(DIRECTORY)/src/glw/README \ + $(DIRECTORY)/src/glw/depend + +DEMO_FILES = \ + $(DIRECTORY)/progs/beos/*.cpp \ + $(DIRECTORY)/progs/beos/Makefile \ + $(DIRECTORY)/progs/images/*.rgb \ + $(DIRECTORY)/progs/images/*.rgba \ + $(DIRECTORY)/progs/demos/Makefile* \ + $(DIRECTORY)/progs/demos/descrip.mms \ + $(DIRECTORY)/progs/demos/*.[ch] \ + $(DIRECTORY)/progs/demos/*.cxx \ + $(DIRECTORY)/progs/demos/*.dat \ + $(DIRECTORY)/progs/demos/README \ + $(DIRECTORY)/progs/osdemos/Makefile \ + $(DIRECTORY)/progs/osdemos/*.c \ + $(DIRECTORY)/progs/xdemos/Makefile* \ + $(DIRECTORY)/progs/xdemos/descrip.mms \ + $(DIRECTORY)/progs/xdemos/*.[chf] \ + $(DIRECTORY)/progs/redbook/Makefile* \ + $(DIRECTORY)/progs/redbook/README \ + $(DIRECTORY)/progs/redbook/*.[ch] \ + $(DIRECTORY)/progs/samples/Makefile* \ + $(DIRECTORY)/progs/samples/README \ + $(DIRECTORY)/progs/samples/*.c \ + $(DIRECTORY)/progs/windml/Makefile.ugl \ + $(DIRECTORY)/progs/windml/*.c \ + $(DIRECTORY)/progs/windml/*.bmp \ + $(DIRECTORY)/progs/ggi/*.c \ + $(DIRECTORY)/windows/VC6/progs/demos/*.dsp \ + $(DIRECTORY)/windows/VC6/progs/progs.dsw \ + $(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \ + $(DIRECTORY)/windows/VC7/progs/progs.sln + +GLUT_FILES = \ + $(DIRECTORY)/include/GL/glut.h \ + $(DIRECTORY)/include/GL/glutf90.h \ + $(DIRECTORY)/src/glut/glx/Makefile* \ + $(DIRECTORY)/src/glut/glx/depend \ + $(DIRECTORY)/src/glut/glx/*def \ + $(DIRECTORY)/src/glut/glx/descrip.mms \ + $(DIRECTORY)/src/glut/glx/mms_depend \ + $(DIRECTORY)/src/glut/glx/*.[ch] \ + $(DIRECTORY)/src/glut/beos/*.[ch] \ + $(DIRECTORY)/src/glut/beos/*.cpp \ + $(DIRECTORY)/src/glut/beos/Makefile \ + $(DIRECTORY)/src/glut/dos/*.[ch] \ + $(DIRECTORY)/src/glut/dos/Makefile.DJ \ + $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \ + $(DIRECTORY)/src/glut/ggi/*.[ch] \ + $(DIRECTORY)/src/glut/ggi/Makefile \ + $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \ + $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj + +DEPEND_FILES = \ + $(TOP)/src/mesa/depend \ + $(TOP)/src/glw/depend \ + $(TOP)/src/glut/glx/depend \ + $(TOP)/src/glu/sgi/depend + + +LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES) + + +# Everything for new a Mesa release: +tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5 + + +rm_depend: + @for dep in $(DEPEND_FILES) ; do \ + rm -f $$dep ; \ + touch $$dep ; \ + done + +lib_gz: + rm -f configs/current ; \ + cd .. ; \ + tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \ + gzip $(LIB_NAME).tar ; \ + mv $(LIB_NAME).tar.gz $(DIRECTORY) + +demo_gz: + cd .. ; \ + tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \ + gzip $(DEMO_NAME).tar ; \ + mv $(DEMO_NAME).tar.gz $(DIRECTORY) + +glut_gz: + cd .. ; \ + tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \ + gzip $(GLUT_NAME).tar ; \ + mv $(GLUT_NAME).tar.gz $(DIRECTORY) + +lib_bz2: + rm -f configs/current ; \ + cd .. ; \ + tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \ + bzip2 $(LIB_NAME).tar ; \ + mv $(LIB_NAME).tar.bz2 $(DIRECTORY) + +demo_bz2: + cd .. ; \ + tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \ + bzip2 $(DEMO_NAME).tar ; \ + mv $(DEMO_NAME).tar.bz2 $(DIRECTORY) + +glut_bz2: + cd .. ; \ + tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \ + bzip2 $(GLUT_NAME).tar ; \ + mv $(GLUT_NAME).tar.bz2 $(DIRECTORY) + +lib_zip: + rm -f configs/current ; \ + rm -f $(LIB_NAME).zip ; \ + cd .. ; \ + zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \ + mv $(LIB_NAME).zip $(DIRECTORY) + +demo_zip: + rm -f $(DEMO_NAME).zip ; \ + cd .. ; \ + zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \ + mv $(DEMO_NAME).zip $(DIRECTORY) + +glut_zip: + rm -f $(GLUT_NAME).zip ; \ + cd .. ; \ + zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \ + mv $(GLUT_NAME).zip $(DIRECTORY) + +md5: + @-md5sum $(LIB_NAME).tar.gz + @-md5sum $(LIB_NAME).tar.bz2 + @-md5sum $(LIB_NAME).zip + @-md5sum $(DEMO_NAME).tar.gz + @-md5sum $(DEMO_NAME).tar.bz2 + @-md5sum $(DEMO_NAME).zip + @-md5sum $(GLUT_NAME).tar.gz + @-md5sum $(GLUT_NAME).tar.bz2 + @-md5sum $(GLUT_NAME).zip diff --git a/Makefile.DJ b/Makefile.DJ new file mode 100644 index 00000000000..deaac09d181 --- /dev/null +++ b/Makefile.DJ @@ -0,0 +1,88 @@ +# Mesa 3-D graphics library +# Version: 4.0 +# +# Copyright (C) 1999 Brian Paul All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# DOS/DJGPP makefile for Mesa +# +# Author: Daniel Borca +# Email : dborca@users.sourceforge.net +# Web : http://www.geocities.com/dborca + + +# +# Available options: +# +# Environment variables: +# GLIDE path to Glide3 SDK; used with FX. +# default = $(TOP)/glide3 +# FX=1 build for 3dfx Glide3. Note that this disables +# compilation of most DMesa code and requires fxMesa. +# As a consequence, you'll need the DJGPP Glide3 +# library to build any application. +# default = no +# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). +# default = no +# +# Targets: +# all: build everything +# libgl: build GL +# libglu: build GLU +# libglut: build GLUT +# clean: remove object files +# realclean: remove all generated files +# + + + +.PHONY : all libgl libglu libglut clean realclean + +CFLAGS = -Wall -W -pedantic +CFLAGS += -O2 -ffast-math + +export CFLAGS + +ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) +UNLINK = del $(subst /,\,$(1)) +else +UNLINK = $(RM) $(1) +endif + +all: libgl libglu libglut + +libgl: lib + $(MAKE) -f Makefile.DJ -C src/mesa +libglu: lib + $(MAKE) -f Makefile.DJ -C src/glu/sgi +libglut: lib + $(MAKE) -f Makefile.DJ -C src/glut/dos + +lib: + mkdir lib + +clean: + $(MAKE) -f Makefile.DJ clean -C src/mesa + $(MAKE) -f Makefile.DJ clean -C src/glu/mesa + $(MAKE) -f Makefile.DJ clean -C src/glu/sgi + $(MAKE) -f Makefile.DJ clean -C src/glut/dos + +realclean: clean + -$(call UNLINK,lib/*.a) + -$(call UNLINK,lib/*.dxe) diff --git a/Makefile.mgw b/Makefile.mgw new file mode 100644 index 00000000000..70c264a8d86 --- /dev/null +++ b/Makefile.mgw @@ -0,0 +1,88 @@ +# Mesa 3-D graphics library +# Version: 4.0 +# +# Copyright (C) 1999 Brian Paul All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# MinGW makefile v1.2 for Mesa +# +# Copyright (C) 2002 - Daniel Borca +# Email : dborca@users.sourceforge.net +# Web : http://www.geocities.com/dborca + + +# +# Available options: +# +# Environment variables: +# GLIDE path to Glide3 SDK; used with FX. +# default = $(TOP)/glide3 +# FX=1 build for 3dfx Glide3. Note that this disables +# compilation of most WMesa code and requires fxMesa. +# As a consequence, you'll need the Win32 Glide3 +# library to build any application. +# default = no +# ICD=1 build the installable client driver interface +# (windows opengl driver interface) +# default = no +# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). +# default = no +# +# Targets: +# all: build everything +# libgl: build GL +# clean: remove object files +# realclean: remove all generated files +# + + + +.PHONY : all libgl clean realclean + +ifeq ($(ICD),1) + # when -std=c99 mingw will not define WIN32 + CFLAGS = -Wall -W -Werror +else + # I love c89 + CFLAGS = -Wall -W -pedantic +endif +CFLAGS += -O2 -ffast-math + +export CFLAGS + +ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) +UNLINK = del $(subst /,\,$(1)) +else +UNLINK = $(RM) $(1) +endif + +all: libgl + +libgl: lib + $(MAKE) -f Makefile.mgw -C src/mesa + +lib: + mkdir lib + +clean: + $(MAKE) -f Makefile.mgw clean -C src/mesa + +realclean: clean + -$(call UNLINK,lib/*.a) + -$(call UNLINK,lib/*.dll) diff --git a/bin/installmesa b/bin/installmesa new file mode 100755 index 00000000000..fb68047af8c --- /dev/null +++ b/bin/installmesa @@ -0,0 +1,74 @@ +#!/bin/sh + +# +# Simple shell script for installing Mesa's header and library files. +# If the copy commands below don't work on a particular system (i.e. the +# -f or -d flags), we may need to branch on `uname` to do the right thing. +# + + +TOP=. + +INCLUDE_DIR="/usr/local/include" +LIB_DIR="/usr/local/lib" + +if [ "x$#" = "x0" ] ; then +echo +echo "***** Mesa installation - You may need root privileges to do this *****" +echo +echo "Default directory for header files is:" ${INCLUDE_DIR} +echo "Enter new directory or press <Enter> to accept this default." + +read INPUT +if [ "x${INPUT}" != "x" ] ; then + INCLUDE_DIR=${INPUT} +fi + +echo +echo "Default directory for library files is:" ${LIB_DIR} +echo "Enter new directory or press <Enter> to accept this default." + +read INPUT +if [ "x${INPUT}" != "x" ] ; then + LIB_DIR=${INPUT} +fi + +echo +echo "About to install Mesa header files (GL/*.h) in: " ${INCLUDE_DIR}/GL +echo "and Mesa library files (libGL.*, etc) in: " ${LIB_DIR} +echo "Press <Enter> to continue, or <ctrl>-C to abort." + +read INPUT + +else +INCLUDE_DIR=$1/include +LIB_DIR=$1/lib +fi + +# flags: +# -f = force +# -d = preserve symlinks (does not work on BSD) + +if [ `uname` = "FreeBSD" ] ; then + CP_FLAGS="-f" +elif [ `uname` = "Darwin" ] ; then + CP_FLAGS="-f" +elif [ `uname` = "AIX" ] ; then + CP_FLAGS="-fh" +else + CP_FLAGS="-fd" +fi + + +set -v + +mkdir ${INCLUDE_DIR} +mkdir ${INCLUDE_DIR}/GL +mkdir ${INCLUDE_DIR}/GLES +mkdir ${LIB_DIR} +cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL +cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL +# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES +cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR} + +echo "Done." diff --git a/bin/mklib b/bin/mklib new file mode 100755 index 00000000000..4f30ec91e2d --- /dev/null +++ b/bin/mklib @@ -0,0 +1,700 @@ +#!/bin/sh + +# Make a shared library. +# This script should be useful for projects other than Mesa. +# Improvements/fixes are welcome. + + +# Copyright (C) 1999-2005 Brian Paul All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +# +# Option defaults +# +LIBNAME="" +MAJOR=1 +MINOR=0 +PATCH="" +DEPS="" +LINK="" +CPLUSPLUS=0 +STATIC=0 +INSTALLDIR="." +ARCH="auto" +ARCHOPT="" +NOPREFIX=0 +EXPORTS="" + + +# +# Parse arguments +# +while true +do + case $1 in + '-h' | '--help') + echo 'Usage: mklib [options] objects' + echo 'Create a shared library from object files.' + echo ' -o LIBRARY specifies the name of the resulting library, without' + echo ' the leading "lib" or any suffix.' + echo ' (eg: "-o GL" might result in "libGL.so" being made)' + echo ' -major N specifies major version number (default is 1)' + echo ' -minor N specifies minor version number (default is 0)' + echo ' -patch N specifies patch version number (default is 0)' + echo ' -lLIBRARY specifies a dependency on LIBRARY' + echo ' -LDIR search in DIR for library dependencies' + echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' + echo ' Not observed on all systems at this time.' + echo ' -cplusplus link with C++ runtime' + echo ' -static make a static library (default is dynamic/shared)' + echo ' -install DIR put resulting library file(s) in DIR' + echo ' -arch ARCH override using `uname` to determine host system' + echo ' -archopt OPT specify an extra achitecture-specific option OPT' + echo " -noprefix don't prefix library name with 'lib' nor add any suffix" + echo ' -exports FILE only export the symbols listed in FILE' + echo ' -h, --help display this information and exit' + exit 1 + ;; + '-o') + shift 1; + LIBNAME=$1 + ;; + '-major') + shift 1; + MAJOR=$1 + ;; + '-minor') + shift 1; + MINOR=$1 + ;; + '-patch') + shift 1; + PATCH=$1 + ;; + '-linker') + shift 1; + LINK=$1 + ;; + -l*) + DEPS="$DEPS $1" + ;; + -L*) + DEPS="$DEPS $1" + ;; + '-cplusplus') + CPLUSPLUS=1 + ;; + '-static') + STATIC=1 + ;; + '-install') + shift 1; + INSTALLDIR=$1 + ;; + '-arch') + shift 1; + ARCH=$1 + ;; + '-archopt') + shift 1; + ARCHOPT=$1 + ;; + '-noprefix') + NOPREFIX=1 + ;; + '-exports') + shift 1; + EXPORTS=$1 + ;; + -*) + echo "mklib: Unknown option: " $1 ; + exit 1 + ;; + *) + # This should be the first object file, stop parsing + break + esac + shift 1 +done +OBJECTS=$@ + + +if [ ${ARCH} = "auto" ] ; then + ARCH=`uname` +fi + + +# +# Error checking +# +if [ "x${LIBNAME}" = "x" ] ; then + echo "mklib: Error: no library name specified" + exit 1 +fi +if [ "x${OBJECTS}" = "x" ] ; then + echo "mklib: Error: no object files specified" + exit 1 +fi + + +# +# Debugging info +# +if [ ] ; then + echo "-----------------" + echo ARCH is $ARCH + echo LIBNAME is $LIBNAME + echo MAJOR is $MAJOR + echo MINOR is $MINOR + echo PATCH is $PATCH + echo DEPS are $DEPS + echo "EXPORTS in" $EXPORTS + echo "-----------------" +fi + + +# +# OK, make the library now +# +case $ARCH in + + 'Linux' | 'OpenBSD') + # we assume gcc + + if [ "x$LINK" = "x" ] ; then + # -linker was not specified so set default link command now + if [ $CPLUSPLUS = 1 ] ; then + LINK=g++ + else + LINK=gcc + fi + fi + + if [ $NOPREFIX = 1 ] ; then + # No "lib" or ".so" part + echo "mklib: Making" $ARCH "shared library: " ${LIBNAME} + #OPTS="-shared -Wl,-soname,${LIBNAME}" # soname??? + OPTS="-shared" + + # Check if objects are 32-bit and we're running in 64-bit + # environment. If so, pass -m32 flag to linker. + set ${OBJECTS} + ABI32=`file $1 | grep 32-bit` + if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then + OPTS="-m32 ${OPTS}" + fi + + rm -f ${LIBNAME} + # make lib + ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + # finish up + FINAL_LIBS="${LIBNAME}" + elif [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}" # prefix with "lib" + echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a + rm -f ${LIBNAME}.a + ar -ru ${LIBNAME}.a ${OBJECTS} + ranlib ${LIBNAME}.a + # finish up + FINAL_LIBS=${LIBNAME}.a + else + LIBNAME="lib${LIBNAME}" # prefix with "lib" + if [ $ARCH = 'Linux' ] ; then + OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" + else + OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" + fi + if [ $EXPORTS ] ; then + #OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}" + # Make the 'exptmp' file for --version-script option + echo "VERSION_${MAJOR}.${MINOR} {" > exptmp + echo "global:" >> exptmp + sed 's/$/;/' ${EXPORTS} >> exptmp + echo "local:" >> exptmp + echo "*;" >> exptmp + echo "};" >> exptmp + OPTS="${OPTS} -Xlinker --version-script=exptmp" + # exptmp is removed below + fi + + # Check if objects are 32-bit and we're running in 64-bit + # environment. If so, pass -m32 flag to linker. + set ${OBJECTS} + ABI32=`file $1 | grep 32-bit` + if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then + OPTS="-m32 ${OPTS}" + fi + + if [ x${PATCH} = "x" ] ; then + VERSION="${MAJOR}.${MINOR}" + else + VERSION="${MAJOR}.${MINOR}.${PATCH}" + fi + + echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION} + + # rm any old libs + rm -f ${LIBNAME}.so.${VERSION} + rm -f ${LIBNAME}.so.${MAJOR} + rm -f ${LIBNAME}.so + + # make lib + ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} + # make usual symlinks + ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} + ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so + # finish up + FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so" +# rm -f exptmp + fi + ;; + + 'SunOS') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making SunOS static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar -ruv ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + LIBNAME="lib${LIBNAME}.so" + echo "mklib: Making SunOS shared library: " ${LIBNAME} + # XXX OPTS for gcc should be -shared, but that doesn't work. + # Using -G does work though. + OPTS="-G" + if [ "x$LINK" = "x" ] ; then + # -linker was not specified, choose default linker now + if [ $CPLUSPLUS = 1 ] ; then + # determine linker and options for C++ code + if [ `which c++` ] ; then + # use Sun c++ + LINK="c++" + elif [ `type g++` ] ; then + # use g++ + LINK="g++" + else + echo "mklib: warning: can't find C++ comiler, trying CC." + LINK="CC" + fi + else + # use native Sun linker for C code + LINK="ld" + fi + fi + echo "mklib: linker is" ${LINK} ${OPTS} + rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} + ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} + ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} + FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" + fi + ;; + + 'FreeBSD') + # we assume gcc + + if [ "x$LINK" = "x" ] ; then + # -linker was not specified so set default link command now + if [ $CPLUSPLUS = 1 ] ; then + LINK=g++ + else + LINK=gcc + fi + fi + + if [ $NOPREFIX = 1 ] ; then + # No "lib" or ".so" part + echo "mklib: Making FreeBSD shared library: " ${LIBNAME} + OPTS="-shared" + rm -f ${LIBNAME} + ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + FINAL_LIBS=${LIBNAME} + elif [ $STATIC = 1 ] ; then + STLIB="lib${LIBNAME}.a" + echo "mklib: Making FreeBSD static library: " ${STLIB} + rm -f ${STLIB} + ar cq ${STLIB} ${OBJECTS} + ranlib ${STLIB} + FINAL_LIBS=${STLIB} + else + SHLIB="lib${LIBNAME}.so.${MAJOR}" + OPTS="-shared -Wl,-soname,${SHLIB}" + echo "mklib: Making FreeBSD shared library: " ${SHLIB} + rm -f ${SHLIB} + ${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS} + ln -sf ${SHLIB} "lib${LIBNAME}.so" + FINAL_LIBS="${SHLIB} lib${LIBNAME}.so" + fi + ;; + + 'NetBSD') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}_pic.a" + echo "mklib: Making NetBSD PIC static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar cq ${LIBNAME} ${OBJECTS} + ranlib ${LIBNAME} + FINAL_LIBS=${LIBNAME} + else + LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}" + echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME} + rm -f ${LIBNAME} + ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + fi + ;; + + 'IRIX' | 'IRIX64') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + rm -f ${LIBNAME} + ar rc ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" + # XXX we should run 'file' on the first object file to determine + # if it's o32, n32 or 64 format, as we do for Linux above. + if [ $ARCHOPT = "64" ] ; then + # 64-bit ABI + OPTS="-64 -shared -all" + echo "mklib: Making IRIX 64-bit shared library: " ${LIBNAME} + elif [ $ARCHOPT = "o32" ] ; then + # old 32-bit ABI + OPTS="-32 -shared -all" + echo "mklib: Making IRIX o32-bit shared library: " ${LIBNAME} + else + # new 32-bit ABI + OPTS="-n32 -shared -all" + echo "mklib: Making IRIX n32-bit shared library: " ${LIBNAME} + fi + if [ $CPLUSPLUS = 1 ] ; then + LINK="CC" + else + LINK="ld" + fi + ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + FINAL_LIBS=${LIBNAME} + fi + ;; + + 'linux-cygwin') + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making linux-cygwin library: " ${LIBNAME} + rm -f ${LIBNAME} + gnuwin32ar ruv ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + ;; + + 'HP-UX') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making HP-UX static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar -ruv ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + RUNLIB="lib${LIBNAME}.${MAJOR}" + DEVLIB="lib${LIBNAME}.sl" + echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB} + ld -b -o ${RUNLIB} +b ${RUNLIB} ${OBJECTS} ${DEPS} + ln -s ${RUNLIB} ${DEVLIB} + FINAL_LIBS="${RUNLIB} ${DEVLIB}" + fi + ;; + + 'AIX' | 'AIX64') + if [ $ARCH = "AIX64" ] ; then + X64="-X64" + fi + + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making AIX static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar -ruv ${X64} ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + EXPFILE="lib${LIBNAME}.exp" + OFILE=shr.o #Want to be consistent with the IBM libGL.a + LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries + if [ $ARCH = "AIX64" ] ; then + OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64" + else + OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry" + fi + rm -f ${EXPFILE} ${OFILE} + NM="/bin/nm -eC ${X64}" + echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE} + ${NM} ${OBJECTS} | awk '{ + if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \ + && ( substr($1,1,1) != ".")) { + if (substr ($1, 1, 7) != "__sinit" && + substr ($1, 1, 7) != "__sterm") { + if (substr ($1, 1, 5) == "__tf1") + print (substr ($1, 7)) + else if (substr ($1, 1, 5) == "__tf9") + print (substr ($1, 15)) + else + print $1 + } + } + }' | sort -u >> ${EXPFILE} + cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS} + ar ${X64} -r ${LIBNAME} ${OFILE} + FINAL_LIBS="${LIBNAME}" + fi + ;; + + 'OpenSTEP') + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making OpenSTEP static library: " ${LIBNAME} + libtool -static -o ${LIBNAME} - ${OBJECTS} + FINAL_LIBS=${LIBNAME} + ;; + + 'OSF1') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making OSF/1 static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar -ruv ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + VERSION="${MAJOR}.${MINOR}" + LIBNAME="lib${LIBNAME}.so" + echo "mklib: Making OSF/1 shared library: " ${LIBNAME} + if [ "x$LINK" = "x" ] ; then + if [ $CPLUSPLUS = 1 ] ; then + LINK=cxx + else + LINK=cc + fi + fi + rm -f ${LIBNAME}.${VERSION} + ${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS} + ln -sf ${LIBNAME}.${VERSION} ${LIBNAME} + FINAL_LIBS="${LIBNAME} ${LIBNAME}.${VERSION}" + fi + ;; + + 'Darwin') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making Darwin static library: " ${LIBNAME} + LINK="ar" + OPTS="-ruv" + ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + # may need these: + # CFLAGS += -fno-common + # LDFLAGS += -bundle -flat_namespace -undefined suppress + LIBNAME="lib${LIBNAME}.dylib" + echo "mklib: Making Darwin shared library: " ${LIBNAME} + FLAGS="-dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0" + if [ $CPLUSPLUS = 1 ] ; then + LINK="g++" + else + LINK="cc" + fi + ${LINK} ${FLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + FINAL_LIBS=${LIBNAME} + fi + ;; + + 'LynxOS') + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making LynxOS static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar ru ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + ;; + + 'BeOS') + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making BeOS static library: " ${LIBNAME} + ar -cru "${LIBNAME}" ${OBJECTS} + else + LIBNAME="lib${LIBNAME}.so" + echo "mklib: Making BeOS shared library: " ${LIBNAME} + gcc -nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}" + mimeset -f "${LIBNAME}" + # XXX remove the Mesa3D stuff here since mklib isn't mesa-specific. + setversion "${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D!" -long "Powered by Mesa3D!" + fi + FINAL_LIBS=${LIBNAME} + ;; + + 'QNX') + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making QNX library: " ${LIBNAME} + wlib ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + ;; + + 'MorphOS') + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making MorphOS library: " ${LIBNAME} + ppc-morphos-ar rc ${LIBNAME} ${OBJECTS} + FINAL_LIBS="${LIBNAME}" + ;; + + 'icc') + # Intel C compiler + # This should get merged into the Linux code, above, since this isn't + # really a different architecture. + LIBNAME="lib${LIBNAME}" # prefix with "lib" + + if [ $STATIC = 1 ] ; then + echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a + LINK="ar" + OPTS="-ruv" + # make lib + ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} + # finish up + FINAL_LIBS="${LIBNAME}.a" + else + OPTS="-shared" + VERSION="${MAJOR}.${MINOR}.${PATCH}" + echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION} + + if [ $CPLUSPLUS = 1 ] ; then + LINK="icc" + else + LINK="icc" + fi + # rm any old libs + rm -f ${LIBNAME}.so.${VERSION} + rm -f ${LIBNAME}.so.${MAJOR} + rm -f ${LIBNAME}.so + # make lib + ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} + # make usual symlinks + ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} + ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so + # finish up + FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so" + fi + ;; + + 'aix-gcc') + # AIX with gcc + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making AIX GCC static library: " ${LIBNAME} + rm -f ${LIBNAME} + ar ru ${LIBNAME} ${OBJECTS} + FINAL_LIBS=${LIBNAME} + else + LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" + echo "mklib: Making AIX GCC shared library: " ${LIBNAME} + # remove old lib + rm -f ${LIBNAME} + # make the lib + gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME} + # NOTE: the application linking with this library must specify + # the -Wl,-brtl flags to gcc + FINAL_LIBS=${LIBNAME} + fi + ;; + + 'ultrix') + # XXX untested + if [ $STATIC = 0 ] ; then + echo "mklib: Warning shared libs not supported on Ultrix" + fi + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making static library for Ultrix: " ${LIBNAME} + rm -f ${LIBNAME} + ar ru ${LIBNAME} ${OBJECTS} + FINAL_LIBS="${LIBNAME}" + ;; + + CYGWIN*) + # GCC-based environment + CYGNAME="cyg${LIBNAME}" # prefix with "cyg" + LIBNAME="lib${LIBNAME}" # prefix with "lib" + + if [ $STATIC = 1 ] ; then + echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a + LINK="ar" + OPTS="-ru" + # make lib + ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} + ranlib ${LIBNAME}.a + # finish up + FINAL_LIBS=${LIBNAME}.a + else + OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" + echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll + + if [ $CPLUSPLUS = 1 ] ; then + LINK="g++" + else + LINK="gcc" + fi + + # rm any old libs + rm -f ${LIBNAME}-${MAJOR}.dll + rm -f ${LIBNAME}.dll.a + rm -f ${LIBNAME}.a + + # make lib + ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} + # make usual symlinks + ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a + # finish up + FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a" + # special case for installing in bin + FINAL_BINS="${CYGNAME}-${MAJOR}.dll" + fi + ;; + + 'example') + # If you're adding support for a new architecture, you can + # start with this: + if [ $STATIC = 1 ] ; then + LIBNAME="lib${LIBNAME}.a" + echo "mklib: Making static library for example arch: " ${LIBNAME} + rm -f ${LIBNAME} + ar rv ${LIBNAME} ${OBJECTS} + FINAL_LIBS="${LIBNAME}" + else + LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" + echo "mklib: Making shared library for example arch: " ${LIBNAME} + ld -o ${LIBNAME} ${OBJECTS} ${DEPS} + FINAL_LIBS="${LIBNAME}" + fi + ;; + + *) + echo "mklib: ERROR: Don't know how to make a static/shared library for" ${ARCH} + echo "mklib: Please add necessary commands to mklib script." + ;; +esac + + +# +# Put library files into installation directory if specified. +# +if [ ${INSTALLDIR} != "." ] ; then + echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} + mv ${FINAL_LIBS} ${INSTALLDIR}/ +fi diff --git a/configs/CVS/Entries b/configs/CVS/Entries new file mode 100644 index 00000000000..6f89911d65e --- /dev/null +++ b/configs/CVS/Entries @@ -0,0 +1,77 @@ +/hpux10/1.1/Fri Mar 26 15:16:35 2004// +/hpux10-gcc/1.1/Fri Mar 26 15:16:35 2004// +/hpux11-32-static/1.1/Fri Mar 26 15:16:35 2004// +/hpux11-32-static-nothreads/1.1/Fri Mar 26 15:16:35 2004// +/hpux11-64-static/1.1/Fri Mar 26 15:16:35 2004// +/hpux9/1.1/Fri Mar 26 15:16:35 2004// +/hpux9-gcc/1.1/Fri Mar 26 15:16:35 2004// +/linux-osmesa16/1.1/Fri Mar 26 15:16:35 2004// +/linux-osmesa16-static/1.1/Fri Mar 26 15:16:35 2004// +/linux-osmesa32/1.1/Fri Mar 26 15:16:35 2004// +/netbsd/1.1/Fri Mar 26 15:16:35 2004// +/sunos4/1.1/Fri Mar 26 15:16:35 2004// +/sunos4-gcc/1.1/Fri Mar 26 15:16:35 2004// +/aix-static/1.1/Thu Jul 1 15:32:51 2004// +/aix/1.3/Sat Oct 2 22:34:50 2004// +/aix-64/1.2/Fri Oct 1 16:29:39 2004// +/darwin-static/1.2/Sat Oct 2 22:34:50 2004// +/hpux10-static/1.2/Sat Oct 2 22:34:50 2004// +/hpux11-32/1.1/Fri Oct 1 20:18:42 2004// +/hpux11-64/1.1/Fri Oct 1 20:18:42 2004// +/irix6-64/1.3/Sat Oct 2 22:34:50 2004// +/irix6-64-static/1.3/Sat Oct 2 22:34:50 2004// +/irix6-n32/1.3/Sat Oct 2 22:34:50 2004// +/irix6-n32-static/1.3/Sat Oct 2 22:34:50 2004// +/irix6-o32/1.3/Sat Oct 2 22:34:50 2004// +/irix6-o32-static/1.3/Sat Oct 2 22:34:50 2004// +/linux-alpha/1.2/Sat Oct 2 22:34:50 2004// +/linux-alpha-static/1.2/Sat Oct 2 22:34:50 2004// +/linux-glide/1.3/Sat Oct 2 22:34:50 2004// +/linux-sparc5/1.3/Sat Oct 2 22:34:50 2004// +/linux-ultrasparc/1.2/Sat Oct 2 22:34:50 2004// +/openbsd/1.2/Sat Oct 2 22:34:50 2004// +/solaris-x86-gcc/1.2/Sat Oct 2 22:34:50 2004// +/sunos4-static/1.2/Sat Oct 2 22:34:50 2004// +/sunos5/1.2/Sat Oct 2 22:34:50 2004// +/sunos5-smp/1.2/Sat Oct 2 22:34:50 2004// +/ultrix-gcc/1.2/Sat Oct 2 22:34:50 2004// +/osf1/1.3/Tue Nov 23 16:07:45 2004// +/linux-fbdev/1.2/Sat May 7 16:30:50 2005// +/solaris-x86/1.2/Mon Jun 20 18:26:35 2005// +/linux-ppc/1.3/Fri Jul 15 22:18:52 2005// +/linux-ppc-static/1.3/Fri Jul 15 22:18:52 2005// +/linux-static/1.3/Fri Jul 15 22:18:52 2005// +/linux-x86-32/1.4/Fri Jul 15 22:18:52 2005// +/linux-x86-64-static/1.6/Fri Jul 15 22:18:52 2005// +/linux-x86-static/1.5/Fri Jul 15 22:18:52 2005// +/linux-solo-ia64/1.8/Thu Aug 11 14:15:58 2005// +/linux-sparc/1.3/Thu Aug 11 14:15:58 2005// +/linux-dri-ppc/1.3/Fri Aug 19 22:03:05 2005// +/beos/1.6/Mon Sep 12 15:03:11 2005// +/freebsd-dri-amd64/1.3/Mon Sep 12 15:03:11 2005// +/freebsd-dri-x86/1.2/Mon Sep 12 15:03:11 2005// +/linux-directfb/1.2/Mon Sep 12 15:03:11 2005// +/linux-dri-x86/1.12/Mon Sep 12 15:03:11 2005// +/linux-icc/1.4/Mon Sep 12 15:03:11 2005// +/linux-icc-static/1.4/Mon Sep 12 15:03:11 2005// +/linux-solo-x86/1.9/Mon Sep 12 15:03:11 2005// +/linux-x86-64/1.10/Mon Sep 12 15:03:11 2005// +/linux-x86-glide/1.5/Mon Sep 12 15:03:11 2005// +/sunos5-gcc/1.5/Mon Sep 12 15:03:11 2005// +/default/1.22/Mon Sep 19 20:07:49 2005// +/linux/1.6/Fri Oct 28 14:28:10 2005// +/linux-profile/1.2/Sat Nov 12 17:56:59 2005// +/linux-x86-64-debug/1.4/Sat Nov 12 17:56:59 2005// +/linux-x86-debug/1.4/Sat Nov 12 17:56:59 2005// +/darwin/1.4/Tue Dec 6 15:42:31 2005// +/linux-indirect/1.5/Wed Jan 25 15:09:44 2006// +/linux-dri-x86-64/1.20/Tue Feb 7 00:40:29 2006// +/linux-solo/1.23/Tue Feb 7 00:40:29 2006// +/aix-gcc/1.3/Wed Feb 22 17:22:23 2006// +/freebsd/1.5/Tue Mar 14 15:23:14 2006// +/linux-debug/1.9/Thu Mar 30 14:16:30 2006// +/freebsd-dri/1.17/Fri Mar 31 17:29:46 2006// +/linux-dri/1.39/Fri Mar 31 17:29:46 2006// +/linux-dri-xcb/1.2/Fri Mar 31 17:29:46 2006// +/linux-x86/1.7/Fri Mar 31 23:13:45 2006// +D diff --git a/configs/CVS/Repository b/configs/CVS/Repository new file mode 100644 index 00000000000..467347235d9 --- /dev/null +++ b/configs/CVS/Repository @@ -0,0 +1 @@ +Mesa/configs diff --git a/configs/CVS/Root b/configs/CVS/Root new file mode 100644 index 00000000000..231303aae3e --- /dev/null +++ b/configs/CVS/Root @@ -0,0 +1 @@ +:ext:brianp@cvs.freedesktop.org:/cvs/mesa diff --git a/configs/CVS/Root.bak b/configs/CVS/Root.bak new file mode 100644 index 00000000000..eba07540827 --- /dev/null +++ b/configs/CVS/Root.bak @@ -0,0 +1 @@ +:ext:brianp@pdx.freedesktop.org:/cvs/mesa diff --git a/configs/CVS/Template b/configs/CVS/Template new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/configs/CVS/Template diff --git a/configs/aix b/configs/aix new file mode 100644 index 00000000000..fe8e48cd654 --- /dev/null +++ b/configs/aix @@ -0,0 +1,28 @@ +# Configuration for AIX, dynamic libs + +include $(TOP)/configs/default + +CONFIG_NAME = aix + +# Compiler and flags +CC = cc +CXX = xlC + +CFLAGS = -O -DAIXV3 +CXXFLAGS = -O -DAIXV3 +MKLIB_OPTIONS = + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +GL_LIB_DEPS = -lX11 -lXext -lm +GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC +GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm +GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11 +OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) +APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC + diff --git a/configs/aix-64 b/configs/aix-64 new file mode 100644 index 00000000000..0d98475293c --- /dev/null +++ b/configs/aix-64 @@ -0,0 +1,28 @@ +# Configuration for AIX 64-bit, dynamic libs + +include $(TOP)/configs/default + +CONFIG_NAME = aix-64 + +# Compiler and flags +CC = xlc +CXX = xlC + +CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 +CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 +MKLIB_OPTIONS = -arch AIX64 + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +GL_LIB_DEPS = -lX11 -lXext -lm +GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC +GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm +GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11 +OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) +APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC + diff --git a/configs/aix-gcc b/configs/aix-gcc new file mode 100644 index 00000000000..cc55551050c --- /dev/null +++ b/configs/aix-gcc @@ -0,0 +1,19 @@ +# Configuration for AIX with gcc + +include $(TOP)/configs/default + +CONFIG_NAME = aix-gcc + +# Compiler and flags +CC = gcc +CXX = g++ + +CFLAGS = -O2 -DAIXV3 +CXXFLAGS = -O2 -DAIXV3 + +MKLIB_OPTIONS = -arch aix-gcc +GL_LIB_DEPS = -lX11 -lXext -lm +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu +APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi + diff --git a/configs/aix-static b/configs/aix-static new file mode 100644 index 00000000000..f6f086edb6a --- /dev/null +++ b/configs/aix-static @@ -0,0 +1,23 @@ +# Configuration for AIX, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = aix-static + +# Compiler and flags +CC = cc +CXX = xlC + +CFLAGS = -O -DAIXV3 +CXXFLAGS = -O -DAIXV3 +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lXext -lXmu -lXi -lm + diff --git a/configs/beos b/configs/beos new file mode 100644 index 00000000000..007a929f888 --- /dev/null +++ b/configs/beos @@ -0,0 +1,100 @@ +# Configuration for BeOS +# Written by Philippe Houdoin + +include $(TOP)/configs/default + +CONFIG_NAME = beos + + +DEFINES = \ + -DBEOS_THREADS + +MACHINE=$(shell uname -m) +ifeq ($(MACHINE), BePC) + CPU = x86 +else + CPU = ppc +endif + +ifeq ($(CPU), x86) + # BeOS x86 settings + + DEFINES += \ + -DGNU_ASSEMBLER \ + -DUSE_X86_ASM \ + -DUSE_MMX_ASM \ + -DUSE_3DNOW_ASM \ + -DUSE_SSE_ASM + + ASM_SOURCES = $(X86_SOURCES) + ASM_API = $(X86_API) + + CC = gcc + CXX = g++ + LD = gcc + + CFLAGS = \ + -Wall -Wno-multichar -Wno-ctor-dtor-privacy \ + $(DEFINES) + + CXXFLAGS = $(CFLAGS) + + LDFLAGS += -Xlinker + + ifdef DEBUG + CFLAGS += -g -O0 + LDFLAGS += -g + DEFINES += -DDEBUG + else + CFLAGS += -O3 + endif + + GLUT_CFLAGS = -fexceptions + +else + # BeOS PPC settings + + CC = mwcc + CXX = $(CC) + LD = mwldppc + + CFLAGS = \ + -w on -requireprotos \ + $(DEFINES) + + CXXFLAGS = $(CFLAGS) + + LDFLAGS += \ + -export pragma \ + -init _init_routine_ \ + -term _term_routine_ \ + -lroot \ + /boot/develop/lib/ppc/glue-noinit.a \ + /boot/develop/lib/ppc/init_term_dyn.o \ + /boot/develop/lib/ppc/start_dyn.o + + ifdef DEBUG + CFLAGS += -g -O0 + CXXFLAGS += -g -O0 + LDFLAGS += -g + else + CFLAGS += -O7 + CXXFLAGS += -O7 + endif + + GLUT_CFLAGS = -fexceptions +endif + +# Directories +SRC_DIRS = mesa glu glut/beos +GLU_DIRS = sgi +DRIVER_DIRS = beos +PROGRAM_DIRS = beos samples redbook demos tests + +# Library/program dependencies +GL_LIB_DEPS = +OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) +GLU_LIB_DEPS = +GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -l$(GL_LIB) +APP_LIB_DEPS = -lbe -L$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB) + diff --git a/configs/darwin b/configs/darwin new file mode 100644 index 00000000000..5abd16448be --- /dev/null +++ b/configs/darwin @@ -0,0 +1,31 @@ +# Configuration for Darwin / MacOS X, making dynamic libs + +include $(TOP)/configs/default + +CONFIG_NAME = darwin + +# Compiler and flags +CC = c++ +CXX = c++ +CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin +CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin + +MKLIB_OPTIONS = -cplusplus + +# Library names (actual file names) +GL_LIB_NAME = libGL.dylib +GLU_LIB_NAME = libGLU.dylib +GLUT_LIB_NAME = libglut.dylib +GLW_LIB_NAME = libGLw.dylib +OSMESA_LIB_NAME = libOSMesa.dylib + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL +GLU_LIB_DEPS = -L$(LIB_DIR) -lGL +GLUT_LIB_DEPS = -L$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext +GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib +APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm + +# omit glw lib for now: +SRC_DIRS = mesa glu glut/glx + diff --git a/configs/darwin-static b/configs/darwin-static new file mode 100644 index 00000000000..c7f9c5f06be --- /dev/null +++ b/configs/darwin-static @@ -0,0 +1,24 @@ +# Configuration for Darwin / MacOS X, making static libs + +include $(TOP)/configs/darwin + +CONFIG_NAME = darwin-static + +# Compiler and flags +CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin +CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +OSMESA_LIB_DEPS = +GLU_LIB_DEPS = +GLUT_LIB_DEPS = +GLW_LIB_DEPS = +APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm diff --git a/configs/default b/configs/default new file mode 100644 index 00000000000..d85ce14eaf7 --- /dev/null +++ b/configs/default @@ -0,0 +1,74 @@ +# Default/template configuration + +# This is included by other config files which may override some +# of these variables. + +CONFIG_NAME = default + +# Version info +MESA_MAJOR=6 +MESA_MINOR=5 +MESA_TINY=0 + +# external projects. This should be useless now that we use libdrm. +DRM_SOURCE_PATH=$(TOP)/../drm + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -O +CXXFLAGS = -O +GLU_CFLAGS = + +# Misc tools and flags +MKLIB_OPTIONS = +MKDEP = makedepend +MKDEP_OPTIONS = -fdepend +MAKE = make + +# Python and flags (generally only needed by the developers) +PYTHON2 = python +PYTHON_FLAGS = -t -O -O + +# Library names (base name) +GL_LIB = GL +GLU_LIB = GLU +GLUT_LIB = glut +GLW_LIB = GLw +OSMESA_LIB = OSMesa + + +# Library names (actual file names) +GL_LIB_NAME = lib$(GL_LIB).so +GLU_LIB_NAME = lib$(GLU_LIB).so +GLUT_LIB_NAME = lib$(GLUT_LIB).so +GLW_LIB_NAME = lib$(GLW_LIB).so +OSMESA_LIB_NAME = lib$(OSMESA_LIB).so + + +# Optional assembly language optimization files for libGL +ASM_SOURCES = + +# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in +# order to build the Motif widget too) +GLW_SOURCES = GLwDrawA.c + + +# Directories +LIB_DIR = $(TOP)/lib +INSTALL_PREFIX = /usr/local +SRC_DIRS = mesa glu glut/glx glw +GLU_DIRS = sgi +DRIVER_DIRS = x11 osmesa +# Which subdirs under $(TOP)/progs/ to enter: +PROGRAM_DIRS = demos redbook samples xdemos + + +# Library/program dependencies +EXTRA_LIB_PATH ?= +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread +OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/configs/default-bp b/configs/default-bp new file mode 100644 index 00000000000..29faceed817 --- /dev/null +++ b/configs/default-bp @@ -0,0 +1,75 @@ +# Default/template configuration + +# This is included by other config files which may override some +# of these variables. + +CONFIG_NAME = default + +# Version info +MESA_MAJOR=6 +MESA_MINOR=3 +MESA_TINY=0 + +# external projects +#DRM_SOURCE_PATH=$(TOP)/../drm +DRM_SOURCE_PATH=/home/projects/DRI-freedesktop/drm + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -O +CXXFLAGS = -O +GLU_CFLAGS = + +# Misc tools and flags +MKLIB_OPTIONS = +MKDEP = makedepend +MKDEP_OPTIONS = -fdepend +MAKE = make + +# Library names (base name) +GL_LIB = GL +GLU_LIB = GLU +GLUT_LIB = glut +GLW_LIB = GLw +OSMESA_LIB = OSMesa + + +# Library names (actual file names) +GL_LIB_NAME = lib$(GL_LIB).so +GLU_LIB_NAME = lib$(GLU_LIB).so +GLUT_LIB_NAME = lib$(GLUT_LIB).so +GLW_LIB_NAME = lib$(GLW_LIB).so +OSMESA_LIB_NAME = lib$(OSMesa).so + + +# Optional assembly language optimization files for libGL +ASM_SOURCES = + +# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in +# order to build the Motif widget too) +GLW_SOURCES = GLwDrawA.c + + +# Directories +LIB_DIR = $(TOP)/lib +INSTALL_PREFIX = /usr/local +SRC_DIRS = mesa glu glut/glx glw +GLU_DIRS = sgi +DRIVER_DIRS = x11 osmesa +# Which subdirs under $(TOP)/progs/ to enter: +PROGRAM_DIRS = demos redbook samples xdemos + + +# Library/program dependencies +GL_LIB_DEPS = -lX11 -lXext -lm -lpthread +OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm + + +# Shading language support (set to 0 or 1) +SHADING_LANGUAGE = 0 + diff --git a/configs/freebsd b/configs/freebsd new file mode 100644 index 00000000000..c390b8bf9c9 --- /dev/null +++ b/configs/freebsd @@ -0,0 +1,26 @@ +# Configuration for FreeBSD + +include $(TOP)/configs/default + +CONFIG_NAME = FreeBSD + +# Compiler and flags +CC = cc +CXX = c++ +MAKE = gmake + +OPT_FLAGS = -O2 +PIC_FLAGS = -fPIC + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM -DHZ=100 + +X11_INCLUDES = -I/usr/X11R6/include + +CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) -ffast-math -pedantic + +CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) + +GLUT_CFLAGS = -fexceptions + +EXTRA_LIB_PATH = -L/usr/X11R6/lib +APP_LIB_DEPS = -L$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/freebsd-dri b/configs/freebsd-dri new file mode 100644 index 00000000000..d5bbed50ab7 --- /dev/null +++ b/configs/freebsd-dri @@ -0,0 +1,45 @@ +# -*-makefile-*- +# Configuration for freebsd-dri: FreeBSD DRI hardware drivers + +include $(TOP)/configs/freebsd + +CONFIG_NAME = freebsd-dri + +# Compiler and flags +CC = gcc +CXX = g++ +WARN_FLAGS = -Wall +OPT_FLAGS = -O + +EXPAT_INCLUDES = -I/usr/local/include +X11_INCLUDES = -I/usr/X11R6/include +DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ + -DGLX_DIRECT_RENDERING -DHAVE_ALIAS +CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \ + -ffast-math $(ASM_FLAGS) $(X11_INCLUDES) +CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC + +ASM_SOURCES = + +# Library/program dependencies +LIBDRM_LIB = `pkg-config --libs libdrm` +DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB) +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB) + +GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11 + + +# Directories +SRC_DIRS = glx/x11 mesa glu glut/glx glw +DRIVER_DIRS = dri +PROGRAM_DIRS = +WINDOW_SYSTEM=dri + +DRM_SOURCE_PATH=$(TOP)/../drm + +# ffb and gamma are missing because they have not been converted to use the new +# interface. +DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon tdfx \ + unichrome savage sis + diff --git a/configs/freebsd-dri-amd64 b/configs/freebsd-dri-amd64 new file mode 100644 index 00000000000..39341b9701a --- /dev/null +++ b/configs/freebsd-dri-amd64 @@ -0,0 +1,10 @@ +# -*-makefile-*- +# Configuration for freebsd-dri-amd64: FreeBSD DRI hardware drivers + +include $(TOP)/configs/freebsd-dri + +CONFIG_NAME = freebsd-dri-x86-64 + +ASM_FLAGS = -DUSE_X86_64_ASM +ASM_SOURCES = $(X86-64_SOURCES) +ASM_API = $(X86-64_API) diff --git a/configs/freebsd-dri-x86 b/configs/freebsd-dri-x86 new file mode 100644 index 00000000000..af0d27ff47d --- /dev/null +++ b/configs/freebsd-dri-x86 @@ -0,0 +1,13 @@ +# -*-makefile-*- +# Configuration for freebsd-dri: FreeBSD DRI hardware drivers + +include $(TOP)/configs/freebsd-dri + +CONFIG_NAME = freebsd-dri-x86 + +# Unnecessary on x86, generally. +PIC_FLAGS = + +ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) diff --git a/configs/hpux10 b/configs/hpux10 new file mode 100644 index 00000000000..e17c8b68134 --- /dev/null +++ b/configs/hpux10 @@ -0,0 +1,14 @@ +# Configuration for HPUX v10, shared libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux10 + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM +CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE + +APP_LIB_DEPS = -$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/hpux10-gcc b/configs/hpux10-gcc new file mode 100644 index 00000000000..107a99a85c2 --- /dev/null +++ b/configs/hpux10-gcc @@ -0,0 +1,16 @@ +# Configuration for HPUX v10, with gcc + +include $(TOP)/configs/default + +CONFIG_NAME = hpux10-gcc + +# Compiler and flags +CC = gcc +CXX = g++ + +CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM +CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE +GLUT_CFLAGS = -fexceptions + +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm + diff --git a/configs/hpux10-static b/configs/hpux10-static new file mode 100644 index 00000000000..38a1313e697 --- /dev/null +++ b/configs/hpux10-static @@ -0,0 +1,30 @@ +# Configuration for HPUX v10, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux10-static + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM +CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE + +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies (static libs don't have dependencies) +GL_LIB_DEPS = +OSMESA_LIB_DEPS = +GLU_LIB_DEPS = +GLUT_LIB_DEPS = +GLW_LIB_DEPS = +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++ +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++ diff --git a/configs/hpux11-32 b/configs/hpux11-32 new file mode 100644 index 00000000000..9ff407bd53e --- /dev/null +++ b/configs/hpux11-32 @@ -0,0 +1,26 @@ +# Configuration for HPUX v11 + +include $(TOP)/configs/default + +CONFIG_NAME = hpux11-32 + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS + +CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include + +MKLIB_OPTIONS = + + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies +APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/hpux11-32-static b/configs/hpux11-32-static new file mode 100644 index 00000000000..7507ab0b0b5 --- /dev/null +++ b/configs/hpux11-32-static @@ -0,0 +1,26 @@ +# Configuration for HPUX v11, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux11-32-static + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS + +CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include + +MKLIB_OPTIONS = -static + + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies +APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/hpux11-32-static-nothreads b/configs/hpux11-32-static-nothreads new file mode 100644 index 00000000000..91b365408c9 --- /dev/null +++ b/configs/hpux11-32-static-nothreads @@ -0,0 +1,26 @@ +# Configuration for HPUX v11, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux11-32-static + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM + +CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include + +MKLIB_OPTIONS = -static + + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies +APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/hpux11-64 b/configs/hpux11-64 new file mode 100644 index 00000000000..b0869cf81df --- /dev/null +++ b/configs/hpux11-64 @@ -0,0 +1,27 @@ +# Configuration for HPUX v11, 64-bit + +include $(TOP)/configs/default + +CONFIG_NAME = hpux11-64 + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS + +CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include + +MKLIB_OPTIONS = + +LIBDIR = $(TOP)/lib64 + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies +APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/hpux11-64-static b/configs/hpux11-64-static new file mode 100644 index 00000000000..451dc4208e4 --- /dev/null +++ b/configs/hpux11-64-static @@ -0,0 +1,27 @@ +# Configuration for HPUX v11, 64-bit, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux11-64-static + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS + +CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include + +MKLIB_OPTIONS = -static + +LIBDIR = $(TOP)/lib64 + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies +APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/hpux9 b/configs/hpux9 new file mode 100644 index 00000000000..03738175761 --- /dev/null +++ b/configs/hpux9 @@ -0,0 +1,16 @@ +# Configuration for HPUX v9, shared libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux9 + +# Compiler and flags +CC = cc +# XXX fix this +CXX = c++ + +CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM +CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 + +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm + diff --git a/configs/hpux9-gcc b/configs/hpux9-gcc new file mode 100644 index 00000000000..47d579ea567 --- /dev/null +++ b/configs/hpux9-gcc @@ -0,0 +1,14 @@ +# Configuration for HPUX v10, shared libs + +include $(TOP)/configs/default + +CONFIG_NAME = hpux9-gcc + +# Compiler and flags +CC = cc +CXX = aCC + +CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM +CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE + +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/configs/irix6-64 b/configs/irix6-64 new file mode 100644 index 00000000000..6c33d33ba92 --- /dev/null +++ b/configs/irix6-64 @@ -0,0 +1,18 @@ +# Configuration for IRIX 6.x, make n64 DSOs + +include $(TOP)/configs/default + +CONFIG_NAME = irix6-64 + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM +CXXFLAGS = -64 -O3 -ansi -woff 1174 +MKLIB_OPTIONS = -archopt 64 + +GLW_SOURCES = GLwDrawA.c GLwMDrawA.c + +LIB_DIR = $(TOP)/lib64 + +APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm diff --git a/configs/irix6-64-static b/configs/irix6-64-static new file mode 100644 index 00000000000..d66af5be878 --- /dev/null +++ b/configs/irix6-64-static @@ -0,0 +1,25 @@ +# Configuration for IRIX 6.x, make n64 static libs + +include $(TOP)/configs/default + +CONFIG_NAME = irix6-64-static + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM +CXXFLAGS = -64 -O3 -ansi -woff 1174 +MKLIB_OPTIONS = -archopt 64 -static + +GLW_SOURCES = GLwDrawA.c GLwMDrawA.c + +LIB_DIR = $(TOP)/lib64 + +APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm + +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + diff --git a/configs/irix6-n32 b/configs/irix6-n32 new file mode 100644 index 00000000000..4bf2964014f --- /dev/null +++ b/configs/irix6-n32 @@ -0,0 +1,18 @@ +# Configuration for IRIX 6.x, make n32 DSOs + +include $(TOP)/configs/default + +CONFIG_NAME = irix6-n32 + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1521,1552 -DUSE_XSHM +CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552 +MKLIB_OPTIONS = -archopt n32 + +GLW_SOURCES = GLwDrawA.c GLwMDrawA.c + +LIB_DIR = $(TOP)/lib32 + +APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lm diff --git a/configs/irix6-n32-static b/configs/irix6-n32-static new file mode 100644 index 00000000000..b60de380c62 --- /dev/null +++ b/configs/irix6-n32-static @@ -0,0 +1,25 @@ +# Configuration for IRIX 6.x, make n32 static libs + +include $(TOP)/configs/default + +CONFIG_NAME = irix6-n32-static + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -n32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM +CXXFLAGS = -n32 -mips2 -O2 -ansi -woff 3262,3666 +MKLIB_OPTIONS = -archopt n32 -static + +GLW_SOURCES = GLwDrawA.c GLwMDrawA.c + +LIB_DIR = $(TOP)/lib32 + +APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm + +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + diff --git a/configs/irix6-o32 b/configs/irix6-o32 new file mode 100644 index 00000000000..56a19796031 --- /dev/null +++ b/configs/irix6-o32 @@ -0,0 +1,19 @@ +# Configuration for IRIX 6.x, make o32 DSOs + +include $(TOP)/configs/default + +CONFIG_NAME = irix6-o32 + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM +CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666 +MKLIB_OPTIONS = -archopt o32 + +GLW_SOURCES = GLwDrawA.c GLwMDrawA.c + +LIB_DIR = $(TOP)/lib32 + +APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm + diff --git a/configs/irix6-o32-static b/configs/irix6-o32-static new file mode 100644 index 00000000000..ac3d6ee17a6 --- /dev/null +++ b/configs/irix6-o32-static @@ -0,0 +1,25 @@ +# Configuration for IRIX 6.x, make o32 static libs + +include $(TOP)/configs/default + +CONFIG_NAME = irix6-o32-static + +# Compiler and flags +CC = cc +CXX = CC +CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM +CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666 +MKLIB_OPTIONS = -archopt o32 -static + +GLW_SOURCES = GLwDrawA.c GLwMDrawA.c + +LIB_DIR = $(TOP)/lib32 + +APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm + +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + diff --git a/configs/linux b/configs/linux new file mode 100644 index 00000000000..2526bb7ebc5 --- /dev/null +++ b/configs/linux @@ -0,0 +1,32 @@ +# Configuration for generic Linux + +include $(TOP)/configs/default + +CONFIG_NAME = linux + +# Compiler and flags +CC = gcc +CXX = g++ + +OPT_FLAGS = -O3 -g +PIC_FLAGS = -fPIC + +# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32 +# to build properly on 64-bit platforms. + +ARCH_FLAGS ?= + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ + -D_BSD_SOURCE -DPTHREADS -DUSE_XSHM + +X11_INCLUDES = -I/usr/X11R6/include + +CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ + $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math + +CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + $(X11_INCLUDES) + +GLUT_CFLAGS = -fexceptions + +EXTRA_LIB_PATH = -L/usr/X11R6/lib diff --git a/configs/linux-alpha b/configs/linux-alpha new file mode 100644 index 00000000000..507c8084518 --- /dev/null +++ b/configs/linux-alpha @@ -0,0 +1,18 @@ +# Configuration for Linux on Alpha + +include $(TOP)/configs/default + +CONFIG_NAME = linux-alpha + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DUSE_XSHM +CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE +GLUT_CFLAGS = -fexceptions + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm + diff --git a/configs/linux-alpha-static b/configs/linux-alpha-static new file mode 100644 index 00000000000..7b7ee07ebbd --- /dev/null +++ b/configs/linux-alpha-static @@ -0,0 +1,27 @@ +# Configuration for Linux on Alpha, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = linux-alpha-static + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE -DUSE_XSHM +CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE +GLUT_CFLAGS = -fexceptions +MKLIB_OPTIONS = -static + + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -L/usr/X11R6/lib -lX11 -lm diff --git a/configs/linux-debug b/configs/linux-debug new file mode 100644 index 00000000000..bc6d2336fc3 --- /dev/null +++ b/configs/linux-debug @@ -0,0 +1,8 @@ +# Configuration for debugging on Linux + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-debug + +OPT_FLAGS = -g -ansi -pedantic +DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/configs/linux-directfb b/configs/linux-directfb new file mode 100644 index 00000000000..42f7d29fca0 --- /dev/null +++ b/configs/linux-directfb @@ -0,0 +1,30 @@ +# Configuration for DirectFB + +include $(TOP)/configs/default + +CONFIG_NAME = linux-directfb + +# Compiler and flags +CC = gcc +CXX = g++ + +CFLAGS = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D_SVID_SOURCE \ + -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DPTHREADS + +CXXFLAGS = -Wall -O3 -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE + +HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes) +ifeq ($(HAVE_X86), yes) + CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM + CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM + ASM_SOURCES = $(X86_SOURCES) + ASM_API = $(X86_API) +endif + +# Directories +SRC_DIRS = mesa glu +DRIVER_DIRS = directfb +PROGRAM_DIRS = # disabled + +# Library/program dependencies +GL_LIB_DEPS = -lm -lpthread diff --git a/configs/linux-dri b/configs/linux-dri new file mode 100644 index 00000000000..585eeb61431 --- /dev/null +++ b/configs/linux-dri @@ -0,0 +1,67 @@ +# -*-makefile-*- +# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others + +include $(TOP)/configs/default + +CONFIG_NAME = linux-dri + +# Compiler and flags +CC = gcc +CXX = g++ + +#MKDEP = /usr/X11R6/bin/makedepend +#MKDEP = gcc -M +#MKDEP_OPTIONS = -MF depend + +OPT_FLAGS = -g +PIC_FLAGS = -fPIC + +# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. +ARCH_FLAGS ?= + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ + -D_BSD_SOURCE -D_GNU_SOURCE \ + -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ + -DGLX_DIRECT_RENDERING -DHAVE_ALIAS + +X11_INCLUDES = -I/usr/X11R6/include + +CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ + $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math + +CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) + + +ASM_SOURCES = + +# Library/program dependencies +EXTRA_LIB_PATH=-L/usr/X11R6/lib + +LIBDRM_LIB = `pkg-config --libs libdrm` +DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ + $(LIBDRM_LIB) + + +# This is now 0 by default since it seems to confuse the hell out of people +# and generate a lot of extra noise on bugzilla. If you need to build with +# EGL, do 'make linux-dri USING_EGL=1' + +USING_EGL=0 + +# Directories +ifeq ($(USING_EGL), 1) +SRC_DIRS = egl glx/x11 mesa glu glut/glx glw +PROGRAM_DIRS = egl +else +SRC_DIRS = glx/x11 mesa glu glut/glx glw +PROGRAM_DIRS = +endif + +DRIVER_DIRS = dri +WINDOW_SYSTEM=dri + +# gamma are missing because they have not been converted to use the new +# interface. +DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \ + savage sis tdfx trident unichrome ffb diff --git a/configs/linux-dri-bp b/configs/linux-dri-bp new file mode 100644 index 00000000000..e9db29fc36b --- /dev/null +++ b/configs/linux-dri-bp @@ -0,0 +1,55 @@ +# -*-makefile-*- +# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others + +include $(TOP)/configs/default + +CONFIG_NAME = linux-dri + +# Compiler and flags +CC = gcc +CXX = g++ + +MKDEP = /usr/X11R6/bin/makedepend +#MKDEP = gcc -M +#MKDEP_OPTIONS = -MF depend + +WARN_FLAGS = -Wall +OPT_FLAGS = -g +PIC_FLAGS = -fPIC + +# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. +ARCH_FLAGS ?= + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ + -D_BSD_SOURCE -D_GNU_SOURCE \ + -DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 + +X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions + +CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + $(ASM_FLAGS) -std=c99 -ffast-math + +CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) + + +ASM_SOURCES = + +# Library/program dependencies +EXTRA_LIB_PATH=-L/usr/X11R6/lib + +DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl +GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11 + + +# Directories +SRC_DIRS = glx/x11 mesa glu glut/glx glw +DRIVER_DIRS = dri +PROGRAM_DIRS = +WINDOW_SYSTEM=dri + +# ffb and gamma are missing because they have not been converted to use the new +# interface. +DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon s3v \ + savage sis tdfx trident unichrome fb diff --git a/configs/linux-dri-ppc b/configs/linux-dri-ppc new file mode 100644 index 00000000000..fb87688065f --- /dev/null +++ b/configs/linux-dri-ppc @@ -0,0 +1,17 @@ +# -*-makefile-*- +# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others + +include $(TOP)/configs/linux-dri + +CONFIG_NAME = linux-dri-ppc + +OPT_FLAGS = -Os -mcpu=603 +PIC_FLAGS = -fPIC + +ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM +ASM_SOURCES = $(PPC_SOURCES) + +# Build only the drivers for cards that exist on PowerPC. At some point MGA +# will be added, but not yet. +DRI_DIRS = mach64 r128 r200 r300 radeon tdfx + diff --git a/configs/linux-dri-x86 b/configs/linux-dri-x86 new file mode 100644 index 00000000000..b196004e58f --- /dev/null +++ b/configs/linux-dri-x86 @@ -0,0 +1,17 @@ +# -*-makefile-*- +# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others + +include $(TOP)/configs/linux-dri + +CONFIG_NAME = linux-dri-x86 + +# Unnecessary on x86, generally. +PIC_FLAGS = + +# Add -m32 to CFLAGS: +ARCH_FLAGS = -m32 + +ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) + diff --git a/configs/linux-dri-x86-64 b/configs/linux-dri-x86-64 new file mode 100644 index 00000000000..23a8fc695b3 --- /dev/null +++ b/configs/linux-dri-x86-64 @@ -0,0 +1,24 @@ +# -*-makefile-*- +# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others + +include $(TOP)/configs/linux-dri + +CONFIG_NAME = linux-dri-x86-64 + +ARCH_FLAGS = -m64 + +ASM_FLAGS = -DUSE_X86_64_ASM +ASM_SOURCES = $(X86-64_SOURCES) +ASM_API = $(X86-64_API) + +LIB_DIR = $(TOP)/lib64 + +# Library/program dependencies +EXTRA_LIB_PATH=-L/usr/X11R6/lib64 + +# ffb, gamma, and sis are missing because they have not be converted to use +# the new interface. i810 are missing because there is no x86-64 +# system where they could *ever* be used. +# +DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300 + diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb new file mode 100644 index 00000000000..2e5860abc59 --- /dev/null +++ b/configs/linux-dri-xcb @@ -0,0 +1,67 @@ +# -*-makefile-*- +# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others + +include $(TOP)/configs/default + +CONFIG_NAME = linux-dri-xcb + +# Compiler and flags +CC = gcc +CXX = g++ + +#MKDEP = /usr/X11R6/bin/makedepend +#MKDEP = gcc -M +#MKDEP_OPTIONS = -MF depend + +OPT_FLAGS = -g +PIC_FLAGS = -fPIC + +# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. +ARCH_FLAGS ?= + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ + -D_BSD_SOURCE -D_GNU_SOURCE \ + -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ + -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB + +X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` + +CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ + $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math + +CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) + + +ASM_SOURCES = + +# Library/program dependencies +EXTRA_LIB_PATH=`pkg-config --libs-only-L x11` + +LIBDRM_LIB = `pkg-config --libs libdrm` +DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ + $(LIBDRM_LIB) `pkg-config --libs xcb` + + +# This is now 0 by default since it seems to confuse the hell out of people +# and generate a lot of extra noise on bugzilla. If you need to build with +# EGL, do 'make linux-dri USING_EGL=1' + +USING_EGL=0 + +# Directories +ifeq ($(USING_EGL), 1) +SRC_DIRS = egl glx/x11 mesa glu glut/glx glw +PROGRAM_DIRS = egl +else +SRC_DIRS = glx/x11 mesa glu glut/glx glw +PROGRAM_DIRS = +endif + +DRIVER_DIRS = dri +WINDOW_SYSTEM=dri + +# gamma are missing because they have not been converted to use the new +# interface. +DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \ + savage sis tdfx trident unichrome ffb diff --git a/configs/linux-fbdev b/configs/linux-fbdev new file mode 100644 index 00000000000..c357485ea16 --- /dev/null +++ b/configs/linux-fbdev @@ -0,0 +1,10 @@ +# Configuration for Linux fbdev interface + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-fbdev +DRIVER_DIRS = fbdev + +CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DUSE_GLFBDEV_DRIVER + +PROGRAM_DIRS = fbdev diff --git a/configs/linux-glide b/configs/linux-glide new file mode 100644 index 00000000000..d3e0dc32d53 --- /dev/null +++ b/configs/linux-glide @@ -0,0 +1,20 @@ +# Configuration for generic Linux with 3Dfx Glide driver + +include $(TOP)/configs/default + +CONFIG_NAME = linux-glide + +# Compiler and flags +CC = gcc +CXX = g++ + +CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include +CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE +GLUT_CFLAGS = -fexceptions + + +# Library/program dependencies +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm diff --git a/configs/linux-icc b/configs/linux-icc new file mode 100644 index 00000000000..1d51d6e697f --- /dev/null +++ b/configs/linux-icc @@ -0,0 +1,22 @@ +# Configuration for Linux with Intel C compiler + +include $(TOP)/configs/default + +CONFIG_NAME = linux-icc + +# Compiler and flags +CC = icc +CXX = g++ +CFLAGS = -O3 -tpp6 -axK -KPIC -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include +CXXFLAGS = -O3 +GLUT_CFLAGS = -fexceptions +MKLIB_OPTIONS = -arch icc + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm + +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) + + diff --git a/configs/linux-icc-static b/configs/linux-icc-static new file mode 100644 index 00000000000..ac847a92152 --- /dev/null +++ b/configs/linux-icc-static @@ -0,0 +1,30 @@ +# Configuration for Linux with Intel C compiler, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = linux-icc-static + +# Compiler and flags +CC = icc +CXX = g++ +CFLAGS = -O3 -tpp6 -axK -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include +CXXFLAGS = -O3 +GLUT_CFLAGS = -fexceptions +MKLIB_OPTIONS = -static -arch icc + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +MKLIB_OPTIONS = -arch icc + +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) + + diff --git a/configs/linux-indirect b/configs/linux-indirect new file mode 100644 index 00000000000..21546b68dc8 --- /dev/null +++ b/configs/linux-indirect @@ -0,0 +1,49 @@ +# -*-makefile-*- +# Configuration for linux-indirect: Builds a libGL capable of indirect +# rendering, but *NOT* capable of direct rendering. + +include $(TOP)/configs/default + +CONFIG_NAME = linux-dri + +# Compiler and flags +CC = gcc +CXX = g++ + +#MKDEP = /usr/X11R6/bin/makedepend +#MKDEP = gcc -M +#MKDEP_OPTIONS = -MF depend + +WARN_FLAGS = -Wall +OPT_FLAGS = -O -g +PIC_FLAGS = -fPIC + +# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. +ARCH_FLAGS ?= + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ + -D_BSD_SOURCE -D_GNU_SOURCE \ + -DPTHREADS -DHAVE_ALIAS + +X11_INCLUDES = -I/usr/X11R6/include + +CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + $(ASM_FLAGS) -std=c99 -ffast-math + +CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) + + +ASM_SOURCES = + +# Library/program dependencies +EXTRA_LIB_PATH=-L/usr/X11R6/lib + +DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl + + +# Directories +SRC_DIRS = glx/x11 glu glut/glx glw +DRIVER_DIRS = +PROGRAM_DIRS = +WINDOW_SYSTEM=dri diff --git a/configs/linux-osmesa16 b/configs/linux-osmesa16 new file mode 100644 index 00000000000..16a3b0bbae9 --- /dev/null +++ b/configs/linux-osmesa16 @@ -0,0 +1,27 @@ +# Configuration for 16 bits/channel OSMesa library on Linux + +include $(TOP)/configs/default + +CONFIG_NAME = linux-osmesa16 + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 +CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE + + +# Library names +OSMESA_LIB = OSMesa16 +OSMESA_LIB_NAME = libOSMesa16.so + + +# Directories +SRC_DIRS = mesa glu +DRIVER_DIRS = osmesa +PROGRAM_DIRS = + + +# Dependencies +OSMESA_LIB_DEPS = -lm -lpthread +APP_LIB_DEPS = -lOSMesa16 diff --git a/configs/linux-osmesa16-static b/configs/linux-osmesa16-static new file mode 100644 index 00000000000..6645504478e --- /dev/null +++ b/configs/linux-osmesa16-static @@ -0,0 +1,28 @@ +# Configuration for 16 bits/channel OSMesa library on Linux + +include $(TOP)/configs/default + +CONFIG_NAME = linux-osmesa16-static + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 +CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE +MKLIB_OPTIONS = -static + + +# Library names +OSMESA_LIB = OSMesa16 +OSMESA_LIB_NAME = libOSMesa16.a + + +# Directories +SRC_DIRS = mesa glu +DRIVER_DIRS = osmesa +PROGRAM_DIRS = + + +# Dependencies +OSMESA_LIB_DEPS = -lm -lpthread +APP_LIB_DEPS = -lOSMesa16 diff --git a/configs/linux-osmesa32 b/configs/linux-osmesa32 new file mode 100644 index 00000000000..0ff0a6db9b3 --- /dev/null +++ b/configs/linux-osmesa32 @@ -0,0 +1,27 @@ +# Configuration for 32 bits/channel OSMesa library on Linux + +include $(TOP)/configs/default + +CONFIG_NAME = linux-osmesa32 + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 +CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE + + +# Library names +OSMESA_LIB = OSMesa32 +OSMESA_LIB_NAME = libOSMesa32.so + + +# Directories +SRC_DIRS = mesa glu +DRIVER_DIRS = osmesa +PROGRAM_DIRS = + + +# Dependencies +OSMESA_LIB_DEPS = -lm -lpthread +APP_LIB_DEPS = -lOSMesa32 diff --git a/configs/linux-ppc b/configs/linux-ppc new file mode 100644 index 00000000000..13cfdeb422b --- /dev/null +++ b/configs/linux-ppc @@ -0,0 +1,9 @@ +# Configuration for Linux on PPC + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-ppc + +OPT_FLAGS = -O3 -mcpu=603 -fsigned-char -funroll-loops + +# FIXME: Use of PowerPC assembly should be enabled here.
\ No newline at end of file diff --git a/configs/linux-ppc-static b/configs/linux-ppc-static new file mode 100644 index 00000000000..d0e168811f8 --- /dev/null +++ b/configs/linux-ppc-static @@ -0,0 +1,14 @@ +# Configuration for Linux on PPC, static libs + +include $(TOP)/configs/linux-ppc + +CONFIG_NAME = linux-ppc-static + +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a diff --git a/configs/linux-profile b/configs/linux-profile new file mode 100644 index 00000000000..80788dc39fb --- /dev/null +++ b/configs/linux-profile @@ -0,0 +1,29 @@ +# Configuration for profiling on Linux with gprof + +include $(TOP)/configs/default + +CONFIG_NAME = linux-profile + +# Compiler and flags +CC = gcc +CXX = g++ + +CFLAGS = -pg -O -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG + +CXXFLAGS = -pg -O -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG + +GLUT_CFLAGS = -fexceptions + +# Need to have -L/usr/X11R6/lib in these: +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11 + +# Need to make static libs for profiling: +MKLIB_OPTIONS = -static +GL_LIB_NAME = lib$(GL_LIB).a +GLU_LIB_NAME = lib$(GLU_LIB).a +GLUT_LIB_NAME = lib$(GLUT_LIB).a +GLW_LIB_NAME = lib$(GLW_LIB).a +OSMESA_LIB_NAME = lib$(OSMesa).a +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread diff --git a/configs/linux-solo b/configs/linux-solo new file mode 100644 index 00000000000..dead8a09a58 --- /dev/null +++ b/configs/linux-solo @@ -0,0 +1,43 @@ +# Configuration for linux-solo: Linux DRI hardware drivers for fbdev + +include $(TOP)/configs/default + +CONFIG_NAME = linux-solo + +# Compiler and flags +CC = gcc +CXX = g++ + +WARN_FLAGS = -Wall -Wundef +OPT_FLAGS = -O3 -g +PIC_FLAGS = -fPIC + +# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. +ARCH_FLAGS ?= + +DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ + -D_BSD_SOURCE -D_GNU_SOURCE \ + -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER + +CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + $(ASM_FLAGS) -std=c99 -ffast-math + +CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) + + +ASM_SOURCES = + +# Library/program dependencies +DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR) +GL_LIB_DEPS = -lm -lpthread -ldl +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread + +# Directories +SRC_DIRS = glx/mini mesa glu glut/mini +DRIVER_DIRS = dri +PROGRAM_DIRS = miniglx + +#DRI_DIRS = ffb gamma sis savage +DRI_DIRS = i810 i915 mach64 mga r128 r200 radeon tdfx unichrome fb diff --git a/configs/linux-solo-ia64 b/configs/linux-solo-ia64 new file mode 100644 index 00000000000..b2051fac855 --- /dev/null +++ b/configs/linux-solo-ia64 @@ -0,0 +1,7 @@ +# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev + +include $(TOP)/configs/linux-solo + +CONFIG_NAME = linux-solo-ia64 + +DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome diff --git a/configs/linux-solo-x86 b/configs/linux-solo-x86 new file mode 100644 index 00000000000..13cab376587 --- /dev/null +++ b/configs/linux-solo-x86 @@ -0,0 +1,13 @@ +# -*-makefile-*- +# Configuration for linux-solo-x86: Linux hardware drivers for fbdev for x86 + +include $(TOP)/configs/linux-solo + +CONFIG_NAME = linux-solo-x86 + +# Unnecessary on x86, generally. +PIC_FLAGS = + +ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) diff --git a/configs/linux-sparc b/configs/linux-sparc new file mode 100644 index 00000000000..15e0b6d4bb4 --- /dev/null +++ b/configs/linux-sparc @@ -0,0 +1,30 @@ +# Configuration for Linux on Sparc + +include $(TOP)/configs/default + +CONFIG_NAME = linux-sparc + +# Compiler and flags +CC = gcc +CXX = g++ + +WARN_FLAGS = -Wall +OPT_FLAGS = -O2 +PIC_FLAGS = -fPIC + +DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM + +X11_INCLUDES = -I/usr/X11R6/include + +CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + $(ASM_FLAGS) -std=c99 -ffast-math + +CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) + +GLUT_CFLAGS = -fexceptions + +EXTRA_LIB_PATH=-L/usr/X11R6/lib + +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 diff --git a/configs/linux-sparc5 b/configs/linux-sparc5 new file mode 100644 index 00000000000..aa9461af763 --- /dev/null +++ b/configs/linux-sparc5 @@ -0,0 +1,17 @@ +# Configuration for Linux on Sparc5 + +include $(TOP)/configs/default + +CONFIG_NAME = linux-sparc5 + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM +CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE +GLUT_CFLAGS = -fexceptions + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 + diff --git a/configs/linux-static b/configs/linux-static new file mode 100644 index 00000000000..0104d34022b --- /dev/null +++ b/configs/linux-static @@ -0,0 +1,21 @@ +# Configuration for generic Linux, making static libs + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-static + +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies (static libs don't have dependencies) +GL_LIB_DEPS = +OSMESA_LIB_DEPS = +GLU_LIB_DEPS = +GLUT_LIB_DEPS = +GLW_LIB_DEPS = diff --git a/configs/linux-ultrasparc b/configs/linux-ultrasparc new file mode 100644 index 00000000000..e235b56defe --- /dev/null +++ b/configs/linux-ultrasparc @@ -0,0 +1,17 @@ +# Configuration for Linux on UltraSparc + +include $(TOP)/configs/default + +CONFIG_NAME = linux-ultrasparc + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM +CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE +GLUT_CFLAGS = -fexceptions + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/configs/linux-x86 b/configs/linux-x86 new file mode 100644 index 00000000000..18fa06101de --- /dev/null +++ b/configs/linux-x86 @@ -0,0 +1,9 @@ +# Configuration for Linux with x86 optimizations + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-x86 + +ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) diff --git a/configs/linux-x86-32 b/configs/linux-x86-32 new file mode 100644 index 00000000000..f18ce7a4596 --- /dev/null +++ b/configs/linux-x86-32 @@ -0,0 +1,7 @@ +# To build Linux x86 32-bit in an x86-64 environment + +include $(TOP)/configs/linux-x86 + +CONFIG_NAME = linux-x86-32 + +ARCH_FLAGS += -m32 diff --git a/configs/linux-x86-64 b/configs/linux-x86-64 new file mode 100644 index 00000000000..a89c47eb937 --- /dev/null +++ b/configs/linux-x86-64 @@ -0,0 +1,14 @@ +# Configuration for Linux for 64-bit X86 (Opteron) + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-x86-64 + +ARCH_FLAGS = -m64 + +ASM_SOURCES = $(X86-64_SOURCES) +ASM_API = $(X86-64_API) +ASM_FLAGS = -DUSE_X86_64_ASM + +LIB_DIR = $(TOP)/lib64 +EXTRA_LIB_PATH = -L/usr/X11R6/lib64 diff --git a/configs/linux-x86-64-debug b/configs/linux-x86-64-debug new file mode 100644 index 00000000000..46e72c990af --- /dev/null +++ b/configs/linux-x86-64-debug @@ -0,0 +1,7 @@ +# Configuration for Linux for 64-bit X86 (Opteron) + +include $(TOP)/configs/linux-x86-64 + +CONFIG_NAME = linux-x86-64-debug + +DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/configs/linux-x86-64-static b/configs/linux-x86-64-static new file mode 100644 index 00000000000..05f21d87a64 --- /dev/null +++ b/configs/linux-x86-64-static @@ -0,0 +1,21 @@ +# Configuration for Linux for 64-bit X86 (Opteron), static libs + +include $(TOP)/configs/linux-x86-64 + +CONFIG_NAME = linux-x86-64-static + +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies (static libs don't have dependencies) +GL_LIB_DEPS = +OSMESA_LIB_DEPS = +GLU_LIB_DEPS = +GLUT_LIB_DEPS = +GLW_LIB_DEPS = diff --git a/configs/linux-x86-debug b/configs/linux-x86-debug new file mode 100644 index 00000000000..d35012ffae1 --- /dev/null +++ b/configs/linux-x86-debug @@ -0,0 +1,9 @@ +# Configuration for Linux with x86 code, but no gcc optimizations and +# debugging enabled. + +include $(TOP)/configs/linux-x86 + +CONFIG_NAME = linux-x86-debug + +OPT_FLAGS = -g +DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/configs/linux-x86-glide b/configs/linux-x86-glide new file mode 100644 index 00000000000..1397bdc0158 --- /dev/null +++ b/configs/linux-x86-glide @@ -0,0 +1,25 @@ +# Configuration for Linux with 3Dfx Glide driver and x86 optimizations + +include $(TOP)/configs/default + +CONFIG_NAME = linux-x86-glide + +# Compiler and flags +CC = gcc +CXX = g++ + +CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include + +CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE + +GLUT_CFLAGS = -fexceptions + + +ASM_SOURCES = $(X86_SOURCES) +ASM_API = $(X86_API) + +# Library/program dependencies +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm diff --git a/configs/linux-x86-static b/configs/linux-x86-static new file mode 100644 index 00000000000..d4ccfca803e --- /dev/null +++ b/configs/linux-x86-static @@ -0,0 +1,21 @@ +# Configuration for Linux with x86 optimizations, static libs + +include $(TOP)/configs/linux-x86 + +CONFIG_NAME = linux-x86-static + +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies (static libs don't have dependencies) +GL_LIB_DEPS = +OSMESA_LIB_DEPS = +GLU_LIB_DEPS = +GLUT_LIB_DEPS = +GLW_LIB_DEPS = diff --git a/configs/netbsd b/configs/netbsd new file mode 100644 index 00000000000..104daae0dd6 --- /dev/null +++ b/configs/netbsd @@ -0,0 +1,14 @@ +# Configuration for NetBSD + +include $(TOP)/configs/default + +CONFIG_NAME = netbsd + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O2 -fPIC -DUSE_XSHM -I/usr/X11R6/include -DHZ=100 +CXXFLAGS = -O2 -fPIC +GLUT_CFLAGS = -fexceptions +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm + diff --git a/configs/openbsd b/configs/openbsd new file mode 100644 index 00000000000..f769259a338 --- /dev/null +++ b/configs/openbsd @@ -0,0 +1,18 @@ +# Configuration for OpenBSD + +include $(TOP)/configs/default + +CONFIG_NAME = openbsd + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O2 -fPIC -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 +CXXFLAGS = -O2 -fPIC -I/usr/X11R6/include -DHZ=100 + +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm +OSMESA_LIB_DEPS = -lm +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm + diff --git a/configs/osf1 b/configs/osf1 new file mode 100644 index 00000000000..bc88c204221 --- /dev/null +++ b/configs/osf1 @@ -0,0 +1,16 @@ +# Configuration for OSF/1 + +include $(TOP)/configs/default + +CONFIG_NAME = osf1 + +# Compiler and flags +CC = cc +CXX = cxx +CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM +CXXFLAGS = -O2 -std ansi -ieee + +GL_LIB_DEPS = -lX11 -lXext -lm -lpthread +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm +APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm diff --git a/configs/solaris-x86 b/configs/solaris-x86 new file mode 100644 index 00000000000..7a04417f0c7 --- /dev/null +++ b/configs/solaris-x86 @@ -0,0 +1,18 @@ +# Configuration for Solaris on x86 + +include $(TOP)/configs/default + +CONFIG_NAME = solaris-x86 + +# Compiler and flags +CC = cc +CFLAGS = -Xa -xO3 -xpentium -KPIC -I/usr/openwin/include -DUSE_XSHM +MKLIB_OPTIONS = -static + +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm -lglut -lGLU -lGL + +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a diff --git a/configs/solaris-x86-gcc b/configs/solaris-x86-gcc new file mode 100644 index 00000000000..01f3d86d1df --- /dev/null +++ b/configs/solaris-x86-gcc @@ -0,0 +1,24 @@ +# Configuration for Solaris on x86 with gcc, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = solaris-x86-gcc + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM +CXXFLAGS = -O3 -m486 -fPIC +GLUT_CFLAGS = -fexceptions +MKLIB_OPTIONS = -static + +GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm + +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a diff --git a/configs/sunos4 b/configs/sunos4 new file mode 100644 index 00000000000..483b9aa730a --- /dev/null +++ b/configs/sunos4 @@ -0,0 +1,12 @@ +# Configuration for SunOS 4, shared libs + +include $(TOP)/configs/default + +CONFIG_NAME = sunos4 + +# Compiler and flags +CC = acc +CFLAGS = -Kpic -O -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4 +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi -lm + + diff --git a/configs/sunos4-gcc b/configs/sunos4-gcc new file mode 100644 index 00000000000..8fb1414fa9a --- /dev/null +++ b/configs/sunos4-gcc @@ -0,0 +1,15 @@ +# Configuration for SunOS 4, with gcc, shared libs + +include $(TOP)/configs/default + +CONFIG_NAME = sunos4-gcc + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4 +CXXFLAGS = -fPIC -O3 -I/usr/openwin/include -DSUNOS4 +GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG + +APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm + diff --git a/configs/sunos4-static b/configs/sunos4-static new file mode 100644 index 00000000000..3e510e7514b --- /dev/null +++ b/configs/sunos4-static @@ -0,0 +1,25 @@ +# Configuration for SunOS 4, static libs + +include $(TOP)/configs/default + +CONFIG_NAME = sunos4-static + +# Compiler and flags +CC = acc +CFLAGS = -O -DUSE_XSHM -DSUNOS4 +MKLIB_OPTIONS = -static + +# Library names (actual file names) +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +# Library/program dependencies (static libs don't have dependencies) +GL_LIB_DEPS = +OSMESA_LIB_DEPS = +GLU_LIB_DEPS = +GLUT_LIB_DEPS = +GLW_LIB_DEPS = +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm diff --git a/configs/sunos5 b/configs/sunos5 new file mode 100644 index 00000000000..9347fb842a7 --- /dev/null +++ b/configs/sunos5 @@ -0,0 +1,18 @@ +# Configuration for SunOS 5 + +include $(TOP)/configs/default + +CONFIG_NAME = sunos5 + +# Compiler and flags +CC = cc +CXX = c++ +CFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM +CXXFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include +GLUT_CFLAGS = -DSOLARIS_2_4_BUG + +GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -lCrun -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/configs/sunos5-gcc b/configs/sunos5-gcc new file mode 100644 index 00000000000..8d6223cea8a --- /dev/null +++ b/configs/sunos5-gcc @@ -0,0 +1,36 @@ +# Configuration for SunOS 5, with gcc + +include $(TOP)/configs/default + +CONFIG_NAME = sunos5-gcc + +# Compiler and flags +CC = gcc +CXX = g++ + +WARN_FLAGS = -Wall +OPT_FLAGS = -O3 -g -fomit-frame-pointer -pipe +PIC_FLAGS = -fPIC + +ARCH_FLAGS ?= + +DEFINES = -D_REENTRANT -DUSE_XSHM + +ASM_SOURCES = $(SPARC_SOURCES) +ASM_API = $(SPARC_API) +ASM_FLAGS = -DUSE_SPARC_ASM + +CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + $(ASM_FLAGS) -std=c99 -ffast-math -I/usr/openwin/include + +CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ + -I/usr/openwin/include + +GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG + +# Library/program dependencies +EXTRA_LIB_PATH=-L/usr/openwin/lib + +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXi -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm +APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/configs/sunos5-smp b/configs/sunos5-smp new file mode 100644 index 00000000000..633bced6833 --- /dev/null +++ b/configs/sunos5-smp @@ -0,0 +1,19 @@ +# Configuration for SunOS 5, SMP systems + +include $(TOP)/configs/default + +CONFIG_NAME = sunos5-smp + +# Compiler and flags +CC = cc +CXX = c++ +CFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DSOLARIS_2_4_BUG +CXXFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include +GLUT_CFLAGS = -DSOLARIS_2_4_BUG + +GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm +GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm +GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm +GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 +APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lCrun + diff --git a/configs/ultrix-gcc b/configs/ultrix-gcc new file mode 100644 index 00000000000..c65e275825e --- /dev/null +++ b/configs/ultrix-gcc @@ -0,0 +1,21 @@ +# Configuration for Ultrix, with gcc + +include $(TOP)/configs/default + +CONFIG_NAME = ultrix-gcc + +# Compiler and flags +CC = gcc +CXX = g++ +CFLAGS = -pedantic -O2 +CXXFLAGS = -pedantic -O2 +GLUT_CFLAGS = -fexceptions +MKLIB_OPTIONS = -static + +GL_LIB_NAME = libGL.a +GLU_LIB_NAME = libGLU.a +GLUT_LIB_NAME = libglut.a +GLW_LIB_NAME = libGLw.a +OSMESA_LIB_NAME = libOSMesa.a + +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXmu -lX11 -lXi -lm diff --git a/descrip.mms b/descrip.mms new file mode 100644 index 00000000000..11d94988916 --- /dev/null +++ b/descrip.mms @@ -0,0 +1,22 @@ +# Makefile for Mesa for VMS +# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl + +macro : + @ macro="" +.ifdef NOSHARE +.else + @ if f$getsyi("HW_MODEL") .ge. 1024 then macro= "/MACRO=(SHARE=1)" +.endif + $(MMS)$(MMSQUALIFIERS)'macro' all + +all : + if f$search("lib.dir") .eqs. "" then create/directory [.lib] + set default [.src] + $(MMS)$(MMSQUALIFIERS) + set default [-.progs.util] + $(MMS)$(MMSQUALIFIERS) + set default [-.demos] + $(MMS)$(MMSQUALIFIERS) + set default [-.xdemos] + $(MMS)$(MMSQUALIFIERS) + if f$search("[-]test.DIR") .nes. "" then pipe set default [-.test] ; $(MMS)$(MMSQUALIFIERS) diff --git a/docs/COPYING b/docs/COPYING new file mode 100644 index 00000000000..b88946cc66b --- /dev/null +++ b/docs/COPYING @@ -0,0 +1,490 @@ + +Some parts of Mesa are copyrighted under the GNU LGPL. See the +Mesa/docs/COPYRIGHT file for details. + +The following is the standard GNU copyright file. +---------------------------------------------------------------------- + + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + diff --git a/docs/MESA_agp_offset.spec b/docs/MESA_agp_offset.spec new file mode 100644 index 00000000000..8dcc72379cd --- /dev/null +++ b/docs/MESA_agp_offset.spec @@ -0,0 +1,95 @@ +Name + + MESA_agp_offset + +Name Strings + + GLX_MESA_agp_offset + +Contact + + Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com) + Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com) + +Status + + Shipping (Mesa 4.0.4 and later. Only implemented in particular + XFree86/DRI drivers.) + +Version + + 1.0 + +Number + + TBD + +Dependencies + + OpenGL 1.0 or later is required + GLX_NV_vertex_array_range is required. + This extensions is written against the OpenGL 1.4 Specification. + +Overview + + This extensions provides a way to convert pointers in an AGP memory + region into byte offsets into the AGP aperture. + Note, this extension depends on GLX_NV_vertex_array_range, for which + no real specification exists. See GL_NV_vertex_array_range for more + information. + +IP Status + + None + +Issues + + None + +New Procedures and Functions + + unsigned int glXGetAGPOffsetMESA( const void *pointer ) + +New Tokens + + None + +Additions to the OpenGL 1.4 Specification + + None + +Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors) + + Add a new section, 3.6 as follows: + + 3.6 AGP Memory Access + + On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV + and freed with glXFreeMemoryNV. Sometimes it's useful to know where a + block of AGP memory is located with respect to the start of the AGP + aperature. The function + + GLuint glXGetAGPOffsetMESA( const GLvoid *pointer ) + + Returns the offset of the given memory block from the start of AGP + memory in basic machine units (i.e. bytes). If pointer is invalid + the value ~0 will be returned. + +GLX Protocol + + None. This is a client side-only extension. + +Errors + + glXGetAGPOffsetMESA will return ~0 if the pointer does not point to + an AGP memory region. + +New State + + None + +Revision History + + 20 September 2002 - Initial draft + 2 October 2002 - finished GLX chapter 3 additions + 27 July 2004 - use unsigned int instead of GLuint, void instead of GLvoid diff --git a/docs/MESA_copy_sub_buffer.spec b/docs/MESA_copy_sub_buffer.spec new file mode 100644 index 00000000000..43424a5f46b --- /dev/null +++ b/docs/MESA_copy_sub_buffer.spec @@ -0,0 +1,88 @@ +Name + + MESA_copy_sub_buffer + +Name Strings + + GLX_MESA_copy_sub_buffer + +Contact + + Brian Paul (brian.paul 'at' tungstengraphics.com) + +Status + + Shipping since Mesa 2.6 in February, 1998. + +Version + + Last Modified Date: 8 June 2000 + +Number + + 215 + +Dependencies + + OpenGL 1.0 or later is required. + GLX 1.0 or later is required. + +Overview + + The glxCopySubBufferMESA() function copies a rectangular region + of the back color buffer to the front color buffer. This can be + used to quickly repaint 3D windows in response to expose events + when the back color buffer cannot be damaged by other windows. + +IP Status + + Open-source; freely implementable. + +Issues + + None. + +New Procedures and Functions + + void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, + int x, int y, int width, int height ); + +New Tokens + + None. + +Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) + + Add to section 3.3.10 Double Buffering: + + The function + + void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, + int x, int y, int width, int height ); + + may be used to copy a rectangular region of the back color buffer to + the front color buffer. This can be used to quickly repaint 3D windows + in response to expose events when the back color buffer cannot be + damaged by other windows. + + <x> and <y> indicates the lower-left corner of the region to copy and + <width> and <height> indicate the size in pixels. Coordinate (0,0) + corresponds to the lower-left pixel of the window, like glReadPixels. + +GLX Protocol + + None at this time. The extension is implemented in terms of ordinary + Xlib protocol inside of Mesa. + +Errors + + None. + +New State + + None. + +Revision History + + 8 June 2000 - initial specification + diff --git a/docs/MESA_pack_invert.spec b/docs/MESA_pack_invert.spec new file mode 100644 index 00000000000..53d5fca71b0 --- /dev/null +++ b/docs/MESA_pack_invert.spec @@ -0,0 +1,138 @@ +Name + + MESA_pack_invert + +Name Strings + + GL_MESA_pack_invert + +Contact + + Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com) + Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com) + +Status + + Shipping (Mesa 4.0.4 and later) + +Version + + 1.0 + +Number + + TBD + +Dependencies + + OpenGL 1.0 or later is required + This extensions is written against the OpenGL 1.4 Specification. + +Overview + + This extension adds a new pixel storage parameter to indicate that + images are to be packed in top-to-bottom order instead of OpenGL's + conventional bottom-to-top order. Only pixel packing can be + inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter, + etc). + + Almost all known image file formats store images in top-to-bottom + order. As it is, OpenGL reads images from the frame buffer in + bottom-to-top order. Thus, images usually have to be inverted before + writing them to a file with image I/O libraries. This extension + allows images to be read such that inverting isn't needed. + +IP Status + + None + +Issues + + 1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc? + + Resolved: No, we're only concerned with pixel packing. There are other + solutions for inverting images when using glDrawPixels (negative Y pixel + zoom) or glTexImage (invert the vertex T coordinates). It would be easy + enough to define a complementary extension for pixel packing in the + future if needed. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the <pname> parameter of PixelStorei and PixelStoref + and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev + and GetBooleanv: + + PACK_INVERT_MESA 0x8758 + +Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation) + + None + +Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) + + None + +Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment +Operations and the Frame Buffer) + + Add the following entry to table 4.4 (PixelStore parameters) on page 182: + + Parameter Name Type Initial Value Valid Range + --------------------------------------------------------- + PACK_INVERT_MESA boolean FALSE TRUE/FALSE + + In the section labeled "Placement in Client Memory" on page 184 + insert the following text into the paragraph before the sentence + that starts with "If the format is RED, GREEN, BLUE...": + + "The parameter PACK_INVERT_MESA controls whether the image is packed + in bottom-to-top order (the default) or top-to-bottom order. Equation + 3.8 is modified as follows: + + ... the first element of the Nth row is indicated by + + p + Nk, if PACK_INVERT_MESA is false + p + k * (H - 1) - Nk, if PACK_INVERT_MESA is true, where H is the + image height + " + +Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions) + + None + +Additions to Chapter 6 of the OpenGL 1.4 Specification (State and +State Requests) + + None + +Additions to Appendix A of the OpenGL 1.4 Specification (Invariance) + + None + +Additions to the AGL/GLX/WGL Specifications + + None + +GLX Protocol + + None + +Errors + + None + +New State + + Add the following entry to table 6.20 (Pixels) on page 235: + + Get Value Type Get Cmd Initial Value Description Sec Attribute + -------------------------------------------------------------------------------------------------- + PACK_INVERT_MESA boolean GetBoolean FALSE Value of PACK_INVERT_MESA 4.3.2 pixel-store + +Revision History + + 21 September 2002 - Initial draft diff --git a/docs/MESA_packed_depth_stencil.spec b/docs/MESA_packed_depth_stencil.spec new file mode 100644 index 00000000000..4f7ab1e28cf --- /dev/null +++ b/docs/MESA_packed_depth_stencil.spec @@ -0,0 +1,231 @@ +Name + + MESA_packed_depth_stencil + +Name Strings + + GL_MESA_packed_depth_stencil + +Contact + + Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com) + Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com) + +Status + + Obsolete. + +Version + + $Id: MESA_packed_depth_stencil.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $ + +Number + + ??? + +Dependencies + + EXT_abgr affects the definition of this extension + SGIS_texture4D affects the definition of this extension + EXT_cmyka affects the definition of this extension + ARB_packed_pixels affects the definition of this extension + +Overview + + Provides a mechanism for DrawPixels and ReadPixels to efficiently + transfer depth and stencil image data. Specifically, we defined new + packed pixel formats and types which pack both stencil and depth + into one value. + +Issues: + + 1. Is this the right way to distinguish between 24/8 and 8/24 + pixel formats? Should we instead provide both: + + GL_DEPTH_STENCIL_MESA + GL_STENCIL_DEPTH_MESA + + And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ? + + 2. If not, is it correct to use _REV to indicate that stencil + preceeds depth in the 1_15 and 8_24 formats? + + 3. Do we really want the GL_UNSIGNED_SHORT formats? + + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the <format> parameter of ReadPixels and DrawPixels: + + GL_DEPTH_STENCIL_MESA 0x8750 + + Accepted by the <type> parameter of ReadPixels and DrawPixels: + + GL_UNSIGNED_INT_24_8_MESA 0x8751 + GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 + GL_UNSIGNED_SHORT_15_1_MESA 0x8753 + GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 + +Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation) + + None + +Additions to Chapter 3 of the 1.1 Specification (Rasterization) + + One entry is added to table 3.5 (DrawPixels and ReadPixels formats). + The new table is: + + Target + Format Name Buffer Element Meaning and Order + ----------- ------ ------------------------- + COLOR_INDEX Color Color index + STENCIL_INDEX Stencil Stencil index + DEPTH_COMPONENT Depth Depth component + RED Color R component + GREEN Color G component + BLUE Color B component + ALPHA Color A component + RGB Color R, G, B components + RGBA Color R, G, B, A components + BGRA Color B, G, R, A components + ABGR_EXT Color A, B, G, R components + CMYK_EXT Color Cyan, Magenta, Yellow, Black components + CMYKA_EXT Color Cyan, Magenta, Yellow, Black, A components + LUMINANCE Color Luminance component + LUMINANCE_ALPHA Color Luminance, A components + DEPTH_STENCIL Depth, Depth component, stencil index. + Stencil + + Table 3.5: DrawPixels and ReadPixels formats. The third column + gives a description of and the number and order of elements in a + group. + + Add to the description of packed pixel formats: + + <type> Parameter Data of Matching + Token Name Type Elements Pixel Formats + ---------------- ---- -------- ------------- + + UNSIGNED_BYTE_3_3_2 ubyte 3 RGB + UNSIGNED_BYTE_2_3_3_REV ubyte 3 RGB + UNSIGNED_SHORT_5_6_5 ushort 3 RGB + UNSIGNED_SHORT_5_6_5_REV ushort 3 RGB + UNSIGNED_SHORT_4_4_4_4 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT + UNSIGNED_SHORT_4_4_4_4_REV ushort 4 RGBA,BGRA + UNSIGNED_SHORT_5_5_5_1 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT + UNSIGNED_SHORT_1_5_5_5_REV ushort 4 RGBA,BGRA + UNSIGNED_INT_8_8_8_8 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT + UNSIGNED_INT_8_8_8_8_REV uint 4 RGBA,BGRA + UNSIGNED_INT_10_10_10_2 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT + UNSIGNED_INT_2_10_10_10_REV uint 4 RGBA,BGRA + UNSIGNED_SHORT_15_1_MESA ushort 2 DEPTH_STENCIL_MESA + UNSIGNED_SHORT_1_15_REV_MESA ushort 2 DEPTH_STENCIL_MESA + UNSIGNED_SHORT_24_8_MESA ushort 2 DEPTH_STENCIL_MESA + UNSIGNED_SHORT_8_24_REV_MESA ushort 2 DEPTH_STENCIL_MESA + + UNSIGNED_INT_8_24: + + 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + +-----------------------+-----------------------------------------------------------------------+ + | | | + +-----------------------+-----------------------------------------------------------------------+ + + first second + element element + + + UNSIGNED_INT_24_8: + + 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + +----------------------------------------------------------------------+------------------------+ + | | | + +----------------------------------------------------------------------+------------------------+ + + first second + element element + + UNSIGNED_SHORT_15_1: + + 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + +-----------------------------------------------------------+---+ + | | | + +-----------------------------------------------------------+---+ + + first second + element element + + + UNSIGNED_SHORT_1_15_REV: + + 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + +---+-----------------------------------------------------------+ + | | | + +---+-----------------------------------------------------------+ + + second first + element element + + The assignment of elements to fields in the packed pixel is as + described in the table below: + + First Second Third Fourth + Format Element Element Element Element + ------ ------- ------- ------- ------- + RGB red green blue + RGBA red green blue alpha + BGRA blue green red alpha + ABGR_EXT alpha blue green red + CMYK_EXT cyan magenta yellow black + DEPTH_STENCIL_MESA depth stencil + +Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations +and the Frame Buffer) + + The new format is added to the discussion of Obtaining Pixels from the + Framebuffer. It should read " If the <format> is one of RED, GREEN, + BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and + the GL is in color index mode, then the color index is obtained." + + The new format is added to the discussion of Index Lookup. It should + read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, + ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to + reference 4 tables of color components: PIXEL_MAP_I_TO_R, + PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A." + + +Additions to Chapter 5 of the 1.1 Specification (Special Functions) + + None + +Additions to Chapter 6 of the 1.1 Specification (State and State Requests) + + None + +Additions to the GLX Specification + + None + +GLX Protocol + + TBD + +Errors + + None + +New State + + None + +Revision History + + Version 1.0 - 23 Sep 2000 + Keith's original version. + + Version 1.1 - 3 Nov 2000 + Brian's edits, assigned values to new enums. + diff --git a/docs/MESA_pixmap_colormap.spec b/docs/MESA_pixmap_colormap.spec new file mode 100644 index 00000000000..fb0b441cc58 --- /dev/null +++ b/docs/MESA_pixmap_colormap.spec @@ -0,0 +1,90 @@ +Name + + MESA_pixmap_colormap + +Name Strings + + GLX_MESA_pixmap_colormap + +Contact + + Brian Paul (brian.paul 'at' tungstengraphics.com) + +Status + + Shipping since Mesa 1.2.8 in May, 1996. + +Version + + Last Modified Date: 8 June 2000 + +Number + + 216 + +Dependencies + + OpenGL 1.0 or later is required. + GLX 1.0 or later is required. + +Overview + + Since Mesa allows RGB rendering into drawables with PseudoColor, + StaticColor, GrayScale and StaticGray visuals, Mesa needs a colormap + in order to compute pixel values during rendering. + + The colormap associated with a window can be queried with normal + Xlib functions but there is no colormap associated with pixmaps. + + The glXCreateGLXPixmapMESA function is an alternative to glXCreateGLXPixmap + which allows specification of a colormap. + +IP Status + + Open-source; freely implementable. + +Issues + + None. + +New Procedures and Functions + + GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, + Pixmap pixmap, Colormap cmap ); + +New Tokens + + None. + +Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) + + Add to section 3.4.2 Off Screen Rendering + + The Mesa implementation of GLX allows RGB rendering into X windows and + pixmaps of any visual class, not just TrueColor or DirectColor. In order + to compute pixel values from RGB values Mesa requires a colormap. + + The function + + GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, + Pixmap pixmap, Colormap cmap ); + + allows one to create a GLXPixmap with a specific colormap. The image + rendered into the pixmap may then be copied to a window (which uses the + same colormap and visual) with the expected results. + +GLX Protocol + + None since this is a client-side extension. + +Errors + + None. + +New State + + None. + +Revision History + + 8 June 2000 - initial specification diff --git a/docs/MESA_program_debug.spec b/docs/MESA_program_debug.spec new file mode 100644 index 00000000000..391d39fa70a --- /dev/null +++ b/docs/MESA_program_debug.spec @@ -0,0 +1,357 @@ +Name + + MESA_program_debug + +Name Strings + + GL_MESA_program_debug + +Contact + + Brian Paul (brian.paul 'at' tungstengraphics.com) + +Status + + XXX - Not complete yet!!! + +Version + + Last Modified Date: July 20, 2003 + Author Revision: 1.0 + $Date: 2004/03/25 01:42:41 $ $Revision: 1.4 $ + +Number + + TBD + +Dependencies + + OpenGL 1.4 is required + The extension is written against the OpenGL 1.4 specification. + ARB_vertex_program or ARB_fragment_program or NV_vertex_program + or NV_fragment_program is required. + +Overview + + The extension provides facilities for implementing debuggers for + vertex and fragment programs. + + The concept is that vertex and fragment program debuggers will be + implemented outside of the GL as a utility package. This extension + only provides the minimal hooks required to implement a debugger. + + There are facilities to do the following: + 1. Have the GL call a user-specified function prior to executing + each vertex or fragment instruction. + 2. Query the current program string's execution position. + 3. Query the current values of intermediate program values. + + The main feature is the ProgramCallbackMESA function. It allows the + user to register a callback function with the GL. The callback will + be called prior to executing each vertex or fragment program instruction. + + From within the callback, the user may issue Get* commands to + query current GL state. The GetProgramRegisterfvMESA function allows + current program values to be queried (such as temporaries, input + attributes, and result registers). + + There are flags for enabling/disabling the program callbacks. + + The current execution position (as an offset from the start of the + program string) can be queried with + GetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos) or + GetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos). + + +IP Status + + None + +Issues + + 1. Is this the right model for a debugger? + + It seems prudent to minimize the scope of this extension and leave + it up to the developer (or developer community) to write debuggers + that layer on top of this extension. + + If the debugger were fully implemented within the GL it's not + clear how terminal and GUI-based interfaces would work, for + example. + + 2. There aren't any other extensions that register callbacks with + the GL. Isn't there another solution? + + If we want to be able to single-step through vertex/fragment + programs I don't see another way to do it. + + 3. How do we prevent the user from doing something crazy in the + callback function, like trying to call glBegin (leading to + recursion)? + + The rule is that the callback function can only issue glGet*() + functions and no other GL commands. It could be difficult to + enforce this, however. Therefore, calling any non-get GL + command from within the callback will result in undefined + results. + + 4. Is this extension amenable to hardware implementation? + + Hopefully, but if not, the GL implementation will have to fall + back to a software path when debugging. This may be acceptable + for debugging. + + 5. What's the <data> parameter to ProgramCallbackMESA for? + + It's a common programming practice to associate a user-supplied + value with callback functions. + + 6. Debuggers often allow one to modify intermediate program values, + then continue. Does this extension support that? + + No. + + +New Procedures and Functions (and datatypes) + + typedef void (*programcallbackMESA)(enum target, void *data) + + void ProgramCallbackMESA(enum target, programcallbackMESA callback, + void *data) + + void GetProgramRegisterfvMESA(enum target, sizei len, + const ubyte *registerName, float *v) + +New Tokens + + Accepted by the <cap> parameter of Enable, Disable, IsEnabled, + GetBooleanv, GetDoublev, GetFloatv and GetIntegerv: + + FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 + VERTEX_PROGRAM_CALLBACK_MESA 0x8bb4 + + Accepted by the <pname> parameter GetBooleanv, GetDoublev, + GetFloatv and GetIntegerv: + + FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 + VERTEX_PROGRAM_POSITION_MESA 0x8bb4 + + Accepted by the <pname> parameter of GetPointerv: + + FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 + FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 + VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 + VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 + +Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) + |