summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-04-22 16:14:34 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-04-22 16:14:34 +0000
commitd611fe0a610e710b8084b51226c7b58bad796176 (patch)
tree52dd0f4c662bbf7f36f299bb4357fe4b5c859573
parent57bb444f38385c85037add091c1dc7f0d55d8c71 (diff)
updates for Cygnus (Eric Lassauge)
-rw-r--r--Make-config33
-rw-r--r--Makefile.X1142
-rwxr-xr-xbin/mklib46
-rw-r--r--progs/demos/Makefile.cygwin103
-rw-r--r--progs/redbook/Makefile.cygwin50
-rw-r--r--progs/samples/Makefile.cygwin44
-rw-r--r--progs/xdemos/Makefile.cygwin75
-rw-r--r--src/glu/sgi/Makefile.cygwin164
-rw-r--r--src/glut/glx/Makefile.cygwin123
-rw-r--r--src/glw/Makefile.cygwin74
-rw-r--r--src/mesa/Makefile.cygwin148
11 files changed, 899 insertions, 3 deletions
diff --git a/Make-config b/Make-config
index 434b858749..2dcdf87d69 100644
--- a/Make-config
+++ b/Make-config
@@ -265,10 +265,39 @@ gcc-sl:
"OSMESA_LIB = libOSMesa.so" \
"CC = gcc" \
"CPLUSPLUS = g++" \
- "CFLAGS = -fPIC -O3" \
+ "CFLAGS = -fPIC -O3 -I/usr/X11R6/include" \
"CXXFLAGS = -fPIC -O3" \
"GLUT_CFLAGS = -fexceptions" \
- "APP_LIB_DEPS = -lX11 -lm"
+ "APP_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lm"
+
+cygwin-sl:
+ $(MAKE) $(MFLAGS) -f Makefile.cygwin targets \
+ "GL_LIB = libGL.dll.a" \
+ "GLU_LIB = libGLU.dll.a" \
+ "GLUT_LIB = libglut.dll.a" \
+ "GLW_LIB = libGLw.dll.a" \
+ "OSMESA_LIB = libOSMesa.dll.a" \
+ "CC = gcc" \
+ "CPLUSPLUS = g++" \
+ "CFLAGS = -O3 -I/usr/X11R6/include" \
+ "CXXFLAGS = -O3" \
+ "GLUT_CFLAGS = -fexceptions" \
+ "APP_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lm"
+
+cygwin-static:
+ $(MAKE) $(MFLAGS) -f Makefile.cygwin targets \
+ "MKLIB_OPTIONS = -static" \
+ "GL_LIB = libGL.a" \
+ "GLU_LIB = libGLU.a" \
+ "GLUT_LIB = libglut.a" \
+ "GLW_LIB = libGLw.a" \
+ "OSMESA_LIB = libOSMesa.a" \
+ "CC = gcc" \
+ "CPLUSPLUS = g++" \
+ "CFLAGS = -O3 -I/usr/X11R6/include" \
+ "CXXFLAGS = -O3" \
+ "GLUT_CFLAGS = -fexceptions" \
+ "APP_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lm"
#special hidden target, to make a shared lib for ONLY Mesa "core"
gcc-mesa-sl:
diff --git a/Makefile.X11 b/Makefile.X11
index ef100f1645..d6c0d0fffa 100644
--- a/Makefile.X11
+++ b/Makefile.X11
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.107.2.9 2004/04/22 16:08:13 brianp Exp $
+# $Id: Makefile.X11,v 1.107.2.10 2004/04/22 16:14:34 brianp Exp $
# Mesa 3-D graphics library
# Version: 6.0.1
@@ -127,6 +127,8 @@ default:
@echo " make ultrix-gcc for DEC systems with Ultrix and GCC"
@echo " make unixware for PCs running UnixWare"
@echo " make unixware-shared for PCs running UnixWare, shared libs"
+ @echo " make cygwin-sl for Cygwin, shared libs"
+ @echo " make cygwin-static for Cygwin, static libs"
@echo " make clean remove .o files"
@echo " make realclean remove .o, library and executable files"
@@ -380,6 +382,44 @@ linux-ggi linux-x86-ggi:
$(MAKE) -f Makefile.X11 $@ ; \
fi
+cygwin-sl cygwin-static:
+ -mkdir lib
+ if [ -d src/mesa ] ; then \
+ cd src/mesa ; \
+ touch depend ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d src/glu/sgi ] ; then \
+ cd src/glu/sgi ; \
+ touch depend ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d src/glut/glx ] ; then \
+ cd src/glut/glx ; \
+ touch depend ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d src/glw ] ; then \
+ cd src/glw ; \
+ touch depend ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d progs/demos ] ; then \
+ cd progs/demos ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d progs/xdemos ] ; then \
+ cd progs/xdemos ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d progs/samples ] ; then \
+ cd progs/samples ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
+ if [ -d progs/redbook ] ; then \
+ cd progs/redbook ; \
+ $(MAKE) -f Makefile.cygwin $@ ; \
+ fi
# if you change GGI_DEST please change it in ggimesa.conf, too.
DESTDIR=/usr/local
diff --git a/bin/mklib b/bin/mklib
index 064d420fb7..5359f90955 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -488,6 +488,46 @@ case $ARCH in
fi
;;
+ 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
+ ;;
+
*)
echo "mklib: ERROR: Don't know how to make a static/shared library for" ${ARCH}
echo "mklib: Please add necessary commands to mklib script."
@@ -502,3 +542,9 @@ if [ ${INSTALLDIR} != "." ] ; then
echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
mv ${FINAL_LIBS} ${INSTALLDIR}/
fi
+
+# Ugly as sins ...
+if [ ${INSTALLDIR} != "." -a "x${FINAL_BINS}" != "x" ] ; then
+ echo "mklib: Installing" ${FINAL_BINS} "in" ${INSTALLDIR}/../bin
+ mv ${FINAL_BINS} ${INSTALLDIR}/../bin
+fi
diff --git a/progs/demos/Makefile.cygwin b/progs/demos/Makefile.cygwin
new file mode 100644
index 0000000000..85cc3a531d
--- /dev/null
+++ b/progs/demos/Makefile.cygwin
@@ -0,0 +1,103 @@
+# Makefile for GLUT-based demo programs
+
+
+##### MACROS #####
+
+TOP = ../..
+INCDIR = $(TOP)/include
+LIBDIR = $(TOP)/lib
+
+LIBS = -L$(LIBDIR) $(APP_LIB_DEPS) -lglut -lGLU -lGL
+
+OSMESA_LIBS = -L$(LIBDIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
+
+LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
+
+PROGS = \
+ arbfplight \
+ arbocclude \
+ bounce \
+ clearspd \
+ cubemap \
+ drawpix \
+ fire \
+ fplight \
+ gamma \
+ gears \
+ geartrain \
+ glinfo \
+ gloss \
+ gltestperf \
+ glutfx \
+ isosurf \
+ ipers \
+ lodbias \
+ morph3d \
+ multiarb \
+ occlude \
+ osdemo \
+ paltex \
+ pixeltex \
+ pointblast \
+ ray \
+ readpix \
+ reflect \
+ renormal \
+ shadowtex \
+ spectex \
+ spriteblast \
+ stex3d \
+ teapot \
+ terrain \
+ tessdemo \
+ texcyl \
+ texdown \
+ texenv \
+ texobj \
+ trispd \
+ tunnel \
+ tunnel2 \
+ winpos
+
+
+##### RULES #####
+
+.SUFFIXES:
+.SUFFIXES: .c
+
+
+# make executable from .c file:
+.c: $(LIB_DEP)
+ @echo "Making $@"
+ $(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(LIBS) -o $@
+
+
+# special case: need the -lOSMesa library:
+osdemo: osdemo.c
+ $(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration"
+
+clean:
+ -rm -f *.o *~
+
+realclean:
+ -rm -f $(PROGS)
+ -rm -f *.o *~
+ -rm -f readtex.[ch]
+
+targets: readtex.c readtex.h $(PROGS)
+
+
+readtex.c:
+ cp $(TOP)/progs/util/readtex.c .
+
+readtex.h:
+ cp $(TOP)/progs/util/readtex.h .
+
+
+include $(TOP)/Make-config
diff --git a/progs/redbook/Makefile.cygwin b/progs/redbook/Makefile.cygwin
new file mode 100644
index 0000000000..a555e6e238
--- /dev/null
+++ b/progs/redbook/Makefile.cygwin
@@ -0,0 +1,50 @@
+# Makefile for programs from the OpenGL Programming Guide
+
+
+##### MACROS #####
+
+TOP = ../..
+INCDIR = $(TOP)/include
+LIBDIR = $(TOP)/lib
+
+LIBS = -L../../lib -lGL -lGLU -lglut -L$(LIBDIR) $(APP_LIB_DEPS)
+
+LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
+
+PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \
+ bezcurve bezmesh checker clip colormat cube depthcue dof \
+ double drawf feedback fog fogindex font hello image light \
+ lines list material mipmap model movelight nurbs pickdepth \
+ picksquare plane planet polyoff polys quadric robot sccolorlight \
+ scene scenebamb sceneflat select smooth stencil stroke surface \
+ teaambient teapots tess tesswind texbind texgen texprox texsub \
+ texturesurf torus trim unproject varray wrap
+
+
+
+##### RULES #####
+
+.SUFFIXES:
+.SUFFIXES: .c
+
+.c: $(LIB_DEP)
+ $(CC) -I$(INCDIR) $(CFLAGS) $< $(LIBS) -o $@
+
+
+
+##### TARGETS ######
+
+default:
+ @echo "Specify a target configuration"
+
+clean:
+ -rm -f *.o *~
+
+realclean:
+ -rm -f $(PROGS)
+ -rm -f *.o *~
+
+targets: $(PROGS)
+
+
+include $(TOP)/Make-config
diff --git a/progs/samples/Makefile.cygwin b/progs/samples/Makefile.cygwin
new file mode 100644
index 0000000000..578c4088f4
--- /dev/null
+++ b/progs/samples/Makefile.cygwin
@@ -0,0 +1,44 @@
+# Makefile for assorted SGI OpenGL demos
+
+
+##### MACROS #####
+
+TOP = ../..
+INCDIR = $(TOP)/include
+LIBDIR = $(TOP)/lib
+
+LIBS = -L../../lib -lGL -lGLU -lglut -L$(LIBDIR) $(APP_LIB_DEPS)
+
+LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
+
+PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
+ font line logo nurb oglinfo olympic overlay point prim quad select \
+ shape sphere star stencil stretch texture tri wave
+
+
+##### RULES #####
+
+.SUFFIXES:
+.SUFFIXES: .c
+
+.c: $(LIB_DEP)
+ $(CC) -I$(INCDIR) $(CFLAGS) $< $(LIBS) -o $@
+
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration"
+
+clean:
+ -rm -f *.o *~
+
+realclean:
+ -rm -f $(PROGS)
+ -rm -f *.o *~
+
+targets: $(PROGS)
+
+
+include $(TOP)/Make-config
diff --git a/progs/xdemos/Makefile.cygwin b/progs/xdemos/Makefile.cygwin
new file mode 100644
index 0000000000..03dc6e3ef6
--- /dev/null
+++ b/progs/xdemos/Makefile.cygwin
@@ -0,0 +1,75 @@
+# Makefile for non-GLUT (X11, SVGA, etc) demo programs
+
+
+##### MACROS #####
+
+TOP = ../..
+INCDIR = $(TOP)/include
+LIBDIR = $(TOP)/lib
+
+LIBS = -L../../lib -lGL -lGLU -L$(LIBDIR) $(APP_LIB_DEPS)
+
+LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB)
+
+PROGS = glthreads \
+ glxdemo \
+ glxgears \
+ glxheads \
+ glxinfo \
+ glxpixmap \
+ glxswapcontrol \
+ manywin \
+ offset \
+ pbinfo \
+ pbdemo \
+ wincopy \
+ xdemo \
+ xfont
+
+
+
+##### RULES #####
+
+.SUFFIXES:
+.SUFFIXES: .c
+
+.c: $(LIB_DEP)
+ $(CC) -I$(INCDIR) $(CFLAGS) $< $(LIBS) -o $@
+
+
+# special cases
+pbinfo: pbinfo.o pbutil.o
+ $(CC) pbinfo.o pbutil.o $(LIBS) -o $@
+
+pbdemo: pbdemo.o pbutil.o
+ $(CC) pbdemo.o pbutil.o $(LIBS) -o $@
+
+pbinfo.o: pbinfo.c pbutil.h
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbinfo.c
+
+pbdemo.o: pbdemo.c pbutil.h
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbdemo.c
+
+pbutil.o: pbutil.c pbutil.h
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c
+
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration (i.e. make -f Makefile.X11 linux)"
+
+clean:
+ -rm -f *.o *~
+
+realclean:
+ -rm -f $(PROGS)
+ -rm -f *.o *~
+
+targets: $(PROGS)
+
+
+include $(TOP)/Make-config
+
+
diff --git a/src/glu/sgi/Makefile.cygwin b/src/glu/sgi/Makefile.cygwin
new file mode 100644
index 0000000000..2aaf96ba51
--- /dev/null
+++ b/src/glu/sgi/Makefile.cygwin
@@ -0,0 +1,164 @@
+# Makefile for SGI SI GLU library
+
+.SUFFIXES : .cc
+
+##### MACROS #####
+
+GLU_MAJOR = 1
+GLU_MINOR = 3
+GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+
+GLU_LIB_NAME = "GLU" # may be overridden in Make-config
+
+VPATH = RCS
+
+TOP = ../../..
+INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
+LIBDIR = $(TOP)/lib
+
+C_SOURCES = \
+ libutil/error.c \
+ libutil/glue.c \
+ libutil/mipmap.c \
+ libutil/project.c \
+ libutil/quad.c \
+ libutil/registry.c \
+ libtess/dict.c \
+ libtess/geom.c \
+ libtess/memalloc.c \
+ libtess/mesh.c \
+ libtess/normal.c \
+ libtess/priorityq.c \
+ libtess/render.c \
+ libtess/sweep.c \
+ libtess/tess.c \
+ libtess/tessmono.c
+
+CC_SOURCES = \
+ libnurbs/interface/bezierEval.cc \
+ libnurbs/interface/bezierPatch.cc \
+ libnurbs/interface/bezierPatchMesh.cc \
+ libnurbs/interface/glcurveval.cc \
+ libnurbs/interface/glinterface.cc \
+ libnurbs/interface/glrenderer.cc \
+ libnurbs/interface/glsurfeval.cc \
+ libnurbs/interface/incurveeval.cc \
+ libnurbs/interface/insurfeval.cc \
+ libnurbs/internals/arc.cc \
+ libnurbs/internals/arcsorter.cc \
+ libnurbs/internals/arctess.cc \
+ libnurbs/internals/backend.cc \
+ libnurbs/internals/basiccrveval.cc \
+ libnurbs/internals/basicsurfeval.cc \
+ libnurbs/internals/bin.cc \
+ libnurbs/internals/bufpool.cc \
+ libnurbs/internals/cachingeval.cc \
+ libnurbs/internals/ccw.cc \
+ libnurbs/internals/coveandtiler.cc \
+ libnurbs/internals/curve.cc \
+ libnurbs/internals/curvelist.cc \
+ libnurbs/internals/curvesub.cc \
+ libnurbs/internals/dataTransform.cc \
+ libnurbs/internals/displaylist.cc \
+ libnurbs/internals/flist.cc \
+ libnurbs/internals/flistsorter.cc \
+ libnurbs/internals/hull.cc \
+ libnurbs/internals/intersect.cc \
+ libnurbs/internals/knotvector.cc \
+ libnurbs/internals/mapdesc.cc \
+ libnurbs/internals/mapdescv.cc \
+ libnurbs/internals/maplist.cc \
+ libnurbs/internals/mesher.cc \
+ libnurbs/internals/monoTriangulationBackend.cc \
+ libnurbs/internals/monotonizer.cc \
+ libnurbs/internals/mycode.cc \
+ libnurbs/internals/nurbsinterfac.cc \
+ libnurbs/internals/nurbstess.cc \
+ libnurbs/internals/patch.cc \
+ libnurbs/internals/patchlist.cc \
+ libnurbs/internals/quilt.cc \
+ libnurbs/internals/reader.cc \
+ libnurbs/internals/renderhints.cc \
+ libnurbs/internals/slicer.cc \
+ libnurbs/internals/sorter.cc \
+ libnurbs/internals/splitarcs.cc \
+ libnurbs/internals/subdivider.cc \
+ libnurbs/internals/tobezier.cc \
+ libnurbs/internals/trimline.cc \
+ libnurbs/internals/trimregion.cc \
+ libnurbs/internals/trimvertpool.cc \
+ libnurbs/internals/uarray.cc \
+ libnurbs/internals/varray.cc \
+ libnurbs/nurbtess/directedLine.cc \
+ libnurbs/nurbtess/gridWrap.cc \
+ libnurbs/nurbtess/monoChain.cc \
+ libnurbs/nurbtess/monoPolyPart.cc \
+ libnurbs/nurbtess/monoTriangulation.cc \
+ libnurbs/nurbtess/partitionX.cc \
+ libnurbs/nurbtess/partitionY.cc \
+ libnurbs/nurbtess/polyDBG.cc \
+ libnurbs/nurbtess/polyUtil.cc \
+ libnurbs/nurbtess/primitiveStream.cc \
+ libnurbs/nurbtess/quicksort.cc \
+ libnurbs/nurbtess/rectBlock.cc \
+ libnurbs/nurbtess/sampleComp.cc \
+ libnurbs/nurbtess/sampleCompBot.cc \
+ libnurbs/nurbtess/sampleCompRight.cc \
+ libnurbs/nurbtess/sampleCompTop.cc \
+ libnurbs/nurbtess/sampleMonoPoly.cc \
+ libnurbs/nurbtess/sampledLine.cc \
+ libnurbs/nurbtess/searchTree.cc
+
+SOURCES = $(C_SOURCES) $(CC_SOURCES)
+
+C_OBJECTS = $(C_SOURCES:.c=.o)
+CC_OBJECTS = $(CC_SOURCES:.cc=.o)
+OBJECTS = $(C_OBJECTS) $(CC_OBJECTS)
+
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+
+.cc.o:
+ $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration"
+
+clean:
+ -rm -f *.o */*.o */*/*.o
+ -rm -f *.lo */*.lo */*/*.lo
+ -rm -f *.la */*.la */*/*.la
+ -rm -f *.dll */*.dll */*/*.dll
+ -rm -f *.dll.a */*.dll.a */*/*.dll.a
+
+
+targets: $(LIBDIR)/$(GLU_LIB)
+
+# Make the library:
+$(LIBDIR)/$(GLU_LIB): $(OBJECTS)
+ $(TOP)/bin/mklib -o $(GLU_LIB_NAME) -major $(GLU_MAJOR) \
+ -minor $(GLU_MINOR) -patch $(GLU_TINY) \
+ -L$(LIBDIR) -lGL \
+ $(MKLIB_OPTIONS) -cplusplus -install $(LIBDIR) \
+ $(GLU_LIB_DEPS) $(OBJECTS)
+
+
+
+include $(TOP)/Make-config
+
+include depend
+
+
+
+#
+# Run 'make depend' to update the dependencies if you change what's included
+# by any source file.
+#
+dep: $(SOURCES)
+ makedepend -fdepend -Y -I$(TOP)/include $(SOURCES)
diff --git a/src/glut/glx/Makefile.cygwin b/src/glut/glx/Makefile.cygwin
new file mode 100644
index 0000000000..e8afc67d04
--- /dev/null
+++ b/src/glut/glx/Makefile.cygwin
@@ -0,0 +1,123 @@
+# Makefile for GLUT
+#
+# NOTICE: The OpenGL Utility Toolkit (GLUT) distribution contains source
+# code published in a book titled "Programming OpenGL for the X Window
+# System" (ISBN: 0-201-48359-9) published by Addison-Wesley. The
+# programs and associated files contained in the distribution were
+# developed by Mark J. Kilgard and are Copyright 1994, 1995, 1996 by Mark
+# J. Kilgard (unless otherwise noted). The programs are not in the
+# public domain, but they are freely distributable without licensing
+# fees. These programs are provided without guarantee or warrantee
+# expressed or implied.
+#
+# GLUT source included with Mesa with permission from Mark Kilgard.
+
+
+##### MACROS #####
+
+GLUT_MAJOR = 3
+GLUT_MINOR = 7
+GLUT_TINY = 1
+
+VPATH = RCS
+
+TOP = ../../..
+INCDIR = $(TOP)/include
+LIBDIR = $(TOP)/lib
+
+SOURCES = \
+ glut_8x13.c \
+ glut_9x15.c \
+ glut_bitmap.c \
+ glut_bwidth.c \
+ glut_cindex.c \
+ glut_cmap.c \
+ glut_cursor.c \
+ glut_dials.c \
+ glut_dstr.c \
+ glut_event.c \
+ glut_ext.c \
+ glut_fbc.c \
+ glut_fullscrn.c \
+ glut_gamemode.c \
+ glut_get.c \
+ glut_glxext.c \
+ glut_hel10.c \
+ glut_hel12.c \
+ glut_hel18.c \
+ glut_init.c \
+ glut_input.c \
+ glut_joy.c \
+ glut_key.c \
+ glut_keyctrl.c \
+ glut_keyup.c \
+ glut_menu.c \
+ glut_menu2.c \
+ glut_mesa.c \
+ glut_modifier.c \
+ glut_mroman.c \
+ glut_overlay.c \
+ glut_roman.c \
+ glut_shapes.c \
+ glut_space.c \
+ glut_stroke.c \
+ glut_swap.c \
+ glut_swidth.c \
+ glut_tablet.c \
+ glut_teapot.c \
+ glut_tr10.c \
+ glut_tr24.c \
+ glut_util.c \
+ glut_vidresize.c \
+ glut_warp.c \
+ glut_win.c \
+ glut_winmisc.c \
+ layerutil.c
+
+
+OBJECTS = $(SOURCES:.c=.o)
+
+
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c -I$(INCDIR) $(CFLAGS) $(GLUT_CFLAGS) $<
+
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration"
+
+clean:
+ -rm -f *.o *~
+ -rm -f *.lo
+ -rm -f *.la
+ -rm -f *.dll
+ -rm -f *.dll.a
+ -rm -rf .libs
+
+targets: $(LIBDIR)/$(GLUT_LIB)
+
+# Make the library
+$(LIBDIR)/$(GLUT_LIB): $(OBJECTS)
+ $(TOP)/bin/mklib -o glut -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
+ -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIBDIR) \
+ -L../../lib -lGL -lGLU \
+ -L/usr/X11R6/lib -lXmu -lXi -lX11 \
+ $(GLUT_LIB_DEPS) $(OBJECTS)
+
+include $(TOP)/Make-config
+
+include depend
+
+
+
+#
+# Run 'make dep' to update the dependencies if you change what's included
+# by any source file.
+#
+dep: $(SOURCES)
+ makedepend -fdepend -Y -I$(TOP)/include $(SOURCES)
diff --git a/src/glw/Makefile.cygwin b/src/glw/Makefile.cygwin
new file mode 100644
index 0000000000..a8a178603b
--- /dev/null
+++ b/src/glw/Makefile.cygwin
@@ -0,0 +1,74 @@
+# Makefile for SGI's OpenGL widgets
+
+
+##### MACROS #####
+
+MAJOR = 1
+MINOR = 0
+TINY = 0
+
+TOP = ../..
+
+VPATH = RCS
+
+INCDIRS = -I$(TOP)/include -I/usr/X11R6/include
+LIBDIR = $(TOP)/lib
+
+# Use these sources for Motif (and Xt) support. Requires Motif header files.
+#SOURCES = GLwDrawA.c GLwMDrawA.c
+
+# OR, use these sources for non-Motif (Xt only) build:
+SOURCES = GLwDrawA.c
+
+
+OBJECTS = $(SOURCES:.c=.o)
+
+
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCDIRS) $(CFLAGS) $<
+
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration"
+
+clean:
+ -rm -f *.o *~
+
+targets: $(LIBDIR)/$(GLW_LIB) message
+
+
+# Make the library
+$(LIBDIR)/$(GLW_LIB): $(OBJECTS)
+ $(TOP)/bin/mklib -o GLw -major $(MAJOR) -minor $(MINOR) \
+ -patch $(TINY) $(MKLIB_OPTIONS) -install $(LIBDIR) \
+ -L../../lib -lGL \
+ -L/usr/X11R6/lib -lXt -lX11 \
+ $(GLW_LIB_DEPS) $(OBJECTS)
+
+
+message:
+ @echo
+ @echo "************************************************************************"
+ @echo "*** Edit widgets-sgi/Makefile.X11 to enable Motif support, if needed ***"
+ @echo "************************************************************************"
+ @echo
+
+
+include $(TOP)/Make-config
+
+include depend
+
+
+
+#
+# Run 'make depend' to update the dependencies if you change what's included
+# by any source file.
+#
+dep: $(SOURCES)
+ makedepend -fdepend -Y -I$(TOP)/include $(SOURCES)
diff --git a/src/mesa/Makefile.cygwin b/src/mesa/Makefile.cygwin
new file mode 100644
index 0000000000..048be18005
--- /dev/null
+++ b/src/mesa/Makefile.cygwin
@@ -0,0 +1,148 @@
+# Makefile for main Mesa library for Unix/X11-like systems
+
+
+##### MACROS #####
+
+TOP = ../..
+
+GL_MAJOR = 1
+GL_MINOR = 5
+GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+
+# These may be overridden in Make-config
+GL_LIB_NAME = GL
+OSMESA_LIB_NAME = OSMesa
+
+LIBDIR = $(TOP)/lib
+
+
+include sources
+
+
+# This will probably get set to $(X86_SOURCES) in Make-config:
+ASM_SOURCES =
+
+# This should get set in Make-config someday:
+DRIVER_SOURCES = \
+ $(X11_DRIVER_SOURCES) \
+ $(GLIDE_DRIVER_SOURCES) \
+ $(SVGA_DRIVER_SOURCES) \
+ $(FBDEV_DRIVER_SOURCES)
+
+# All the sources we care about:
+SOURCES = \
+ $(CORE_SOURCES) \
+ $(ASM_SOURCES) \
+ $(DRIVER_SOURCES)
+
+
+ASM_OBJECTS = $(ASM_SOURCES:.S=.o)
+
+DRIVER_OBJECTS = $(DRIVER_SOURCES:.c=.o)
+
+OSMESA_OBJECTS = $(OSMESA_DRIVER_SOURCES:.c=.o)
+
+# All the objects we want to make:
+OBJECTS = \
+ $(CORE_OBJECTS) \
+ $(ASM_OBJECTS) \
+ $(DRIVER_OBJECTS)
+
+
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+.S.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+
+# need some special rules here, unfortunately
+x86/matypes.h: main/mtypes.h tnl/t_context.h x86/gen_matypes.c
+ $(CC) $(INCLUDE_DIRS) $(CFLAGS) x86/gen_matypes.c -o x86/gen_matypes
+ ./x86/gen_matypes > x86/matypes.h
+ #rm -f x86/gen_matypes x86/*.o
+
+x86/common_x86_asm.o: x86/matypes.h
+x86/3dnow_normal.o: x86/matypes.h
+x86/3dnow_xform1.o: x86/matypes.h
+x86/3dnow_xform2.o: x86/matypes.h
+x86/3dnow_xform3.o: x86/matypes.h
+x86/3dnow_xform4.o: x86/matypes.h
+x86/mmx_blend.o: x86/matypes.h
+x86/sse_normal.o: x86/matypes.h
+x86/sse_xform1.o: x86/matypes.h
+x86/sse_xform2.o: x86/matypes.h
+x86/sse_xform3.o: x86/matypes.h
+x86/sse_xform4.o: x86/matypes.h
+x86/x86_cliptest.o: x86/matypes.h
+x86/x86_xform2.o: x86/matypes.h
+x86/x86_xform3.o: x86/matypes.h
+x86/x86_xform4.o: x86/matypes.h
+
+
+
+##### TARGETS #####
+
+default:
+ @echo "Specify a target configuration"
+
+
+targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
+
+
+# Make the GL library
+$(LIBDIR)/$(GL_LIB): $(OBJECTS)
+ $(TOP)/bin/mklib -o $(GL_LIB_NAME) -major $(GL_MAJOR) \
+ -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIBDIR) \
+ -L/usr/X11R6/lib -lX11 \
+ $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS)
+
+
+# Make the OSMesa library
+$(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
+ if [ ${OSMESA_LIB} ] ; then \
+ $(TOP)/bin/mklib -o $(OSMESA_LIB_NAME) -major $(MESA_MAJOR) \
+ -minor $(MESA_MINOR) -patch $(GL_TINY) \
+ -L../../lib -lGL \
+ $(MKLIB_OPTIONS) -install $(LIBDIR) \
+ $(OSMESA_LIB_DEPS) $(OSMESA_OBJECTS) ; \
+ fi
+
+
+# Make an optional library with _just_ core objects
+# XXX this should probably be moved into a separate makefile
+libmesa: $(LIBDIR)/$(MESA_LIB)
+ if [ ${MESA_LIB} ] ; then \
+ $(MAKELIB) $(MESA_LIB) $(MESA_MAJOR) \
+ $(MESA_MINOR) $(GL_TINY) $(CORE_OBJECTS) ; \
+ fi
+ if [ ${MESA_LIB} ] ; then rm -f $(LIBDIR)/$(MESA_LIB)* ; fi
+ if [ ${MESA_LIB} ] ; then mv $(MESA_LIB)* $(LIBDIR) ; fi
+$(LIBDIR)/$(MESA_LIB): $(CORE_OBJECTS)
+
+
+
+# Run 'make -f Makefile.X11 dep' to update the dependencies if you change
+# what's included by any source file.
+dep: $(SOURCES)
+ makedepend -fdepend -Y $(INCLUDE_DIRS) -DGGI -DSVGA -DFX $(SOURCES)
+
+
+# Emacs tags
+tags:
+ etags `find . -name \*.[ch]` `find ../include`
+
+
+# Remove .o and backup files
+clean:
+ -rm -f *.a
+ -rm -f */*.o */*~ */*.o */*~
+ -rm -f drivers/*/*.o drivers/*/*/*.o
+
+
+include $(TOP)/Make-config
+
+include depend