added a cast
[mesa.git] / Makefile.X11
index aae5a80276fd4187171cdaa60dceef2a961b9cb2..94ef10a7a7a808c3c258a9662fa94c5d02fff939 100644 (file)
@@ -1,9 +1,9 @@
-# $Id: Makefile.X11,v 1.52 2001/09/10 19:28:22 brianp Exp $
+# $Id: Makefile.X11,v 1.76 2003/04/07 14:45:52 brianp Exp $
 
 # Mesa 3-D graphics library
-# Version:  3.5
+# Version:  5.1
 # 
-# Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
+# Copyright (C) 1999-2003  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"),
@@ -42,16 +42,18 @@ default:
        @echo "  make bsdos4               for BSD/OS 4.x, dynamic libraries"
        @echo "  make cygnus               for Win95/NT using Cygnus-Win32"
        @echo "  make cygnus-linux         for Win95/NT using Cygnus-Win32 under Linux"
+       @echo "  make darwin               for Darwin - Mac OS X"
        @echo "  make dgux                 for Data General"
        @echo "  make freebsd              for FreeBSD systems with GCC"
        @echo "  make freebsd-386          for FreeBSD systems with GCC, w/ Intel assembly"
        @echo "  make gcc                  for a generic system with GCC"
+       @echo "  make gcc-sl               for a generic system with GCC for shared libs"
        @echo "  make hpux9                for HP systems with HPUX 9.x"
        @echo "  make hpux9-sl             for HP systems with HPUX 9.x, make shared libs"
        @echo "  make hpux9-gcc            for HP systems with HPUX 9.x using GCC"
        @echo "  make hpux9-gcc-sl         for HP systems with HPUX 9.x, GCC, make shared libs"
-       @echo "  make hpux10               for HP systems with HPUX 10.x"
-       @echo "  make hpux10-sl            for HP systems with HPUX 10.x, shared libs"
+       @echo "  make hpux10               for HP systems with HPUX 10.x and 11.x"
+       @echo "  make hpux10-sl            for HP systems with HPUX 10.x and 11.x, shared libs"
        @echo "  make hpux10-gcc           for HP systems with HPUX 10.x w/ GCC"
        @echo "  make hpux10-gcc-sl        for HP systems with HPUX 10.x w/ GCC, shared libs"
        @echo "  make irix4                for SGI systems with IRIX 4.x"
@@ -68,7 +70,6 @@ default:
 
        @echo "  make linux                for Linux systems, make shared .so libs"
        @echo "  make linux-static         for Linux systems, make static .a libs"
-       @echo "  make linux-trace          for Linux systems, with API trace extension"
        @echo "  make linux-x86            for Linux on Intel, make shared .so libs"
        @echo "  make linux-x86-static     for Linux on Intel, make static .a libs"
        @echo "  make linux-ggi            for Linux systems with libggi"
@@ -86,6 +87,7 @@ default:
        @echo "  make linux-sparc-ultra    for UltraSparc systems, make ELF shared libs"
        @echo "  make linux-osmesa16       for 16-bit/channel OSMesa"
        @echo "  make linux-osmesa32       for 32-bit/channel OSMesa"
+       @echo "  make linux-icc            for Linux with the Intel C/C++ compiler"
        @echo "  make lynxos               for LynxOS systems with GCC"
        @echo "  make macintosh            for Macintosh"
        @echo "  make machten-2.2          for Macs w/ MachTen 2.2 (68k w/ FPU)"
@@ -137,12 +139,12 @@ default:
 # XXX we may have to split up this group of targets into those that
 # have a C++ compiler and those that don't for the SI-GLU library.
 
-aix aix-sl amix bsdos bsdos4 dgux freebsd freebsd-386 gcc \
+aix aix-sl amix bsdos bsdos4 darwin dgux freebsd freebsd-386 gcc gcc-sl \
 hpux9 hpux9-sl hpux9-gcc hpux9-gcc-sl \
 hpux10 hpux10-sl hpux10-gcc hpux10-gcc-sl \
-irix4 irix5 irix5-gcc irix5-dso irix6-o32 irix6-o32-dso \
+irix4 irix5 irix5-gcc irix5-dso \
 linux linux-static linux-debug linux-static-debug linux-prof \
-linux-x86 linux-x86-static linux-x86-debug \
+linux-x86 linux-icc linux-x86-static linux-x86-debug \
 linux-glide linux-386-glide linux-386-opt-glide \
 linux-x86-glide linux-glide-debug linux-glide-prof \
 linux-alpha-static linux-alpha \
@@ -171,12 +173,14 @@ sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
        if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
        if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 
-irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
+gcc-mesa-sl:
+       if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
+
+irix6-o32 irix6-o32-dso irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
        -mkdir lib32
        if [ -d src      ] ; then touch src/depend      ; fi
        if [ -d src-glu  ] ; then touch src-glu/depend  ; fi
        if [ -d src-glut ] ; then touch src-glut/depend ; fi
-       if [ -d src-glut ] ; then touch src-glut/depend ; fi
        if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
        if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
        if [ -d src-glu  ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
@@ -187,6 +191,7 @@ irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
        if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
        if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 
+CORE_OBJECTS = $(CORE_SOURCES:.c=.o)
 
 irix6-64 irix6-64-dso:
        -mkdir lib64
@@ -203,10 +208,18 @@ irix6-64 irix6-64-dso:
        if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
        if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 
+CORE_OBJECTS = $(CORE_SOURCES:.c=.o)
 
 amiwin:
        bin/mklib.amiwin
 
+# Make an optional library with _just_ core objects
+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)
 
 beos-r4:
        -mkdir lib
@@ -322,22 +335,33 @@ clean:
 
 # Remove everything that can be remade
 realclean: clean
-       -rm -f lib/*
+       -rm -fr lib lib32 lib64
        cd demos       && $(MAKE) -f Makefile.X11 realclean || true
        cd xdemos      && $(MAKE) -f Makefile.X11 realclean || true
        cd book        && $(MAKE) -f Makefile.X11 realclean || true
        cd samples     && $(MAKE) -f Makefile.X11 realclean || true
-       cd ggi/demos   && $(MAKE) -f Makefile.X11 realclean || true
-       cd src/GGI/default && $(MAKE) -f Makefile.X11 realclean || true
 
-
-
-DIRECTORY = Mesa-3.5
-LIB_NAME = MesaLib-3.5
-DEMO_NAME = MesaDemos-3.5
-GLU_NAME = MesaGLU-3.5
+# Remove everything not in CVS
+cvsclean: realclean
+       -rm -f acinclude.m4 aclocal.m4
+       -rm -f conf.h conf.h.in config.guess config.log config.status
+       -rm -f config.sub configure
+       -rm -f install-sh libtool ltmain.sh Makefile.in
+       -rm -f missing mkinstalldirs stamp-h stamp-h.in
+
+DIRECTORY = Mesa-5.1
+LIB_NAME = MesaLib-5.1
+DEMO_NAME = MesaDemos-5.1
+GLU_NAME = MesaGLU-5.1
 GLUT_NAME = GLUT-3.7
 
+# Make an optional library with _just_ core objects
+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)
 
 LIB_FILES =    \
        $(DIRECTORY)/Makefile*                                          \
@@ -352,17 +376,15 @@ LIB_FILES =       \
        $(DIRECTORY)/configure                                          \
        $(DIRECTORY)/configure.in                                       \
        $(DIRECTORY)/install-sh                                         \
-       $(DIRECTORY)/ltconfig                                           \
        $(DIRECTORY)/ltmain.sh                                          \
        $(DIRECTORY)/missing                                            \
        $(DIRECTORY)/mkinstalldirs                                      \
        $(DIRECTORY)/stamp-h.in                                         \
-       $(DIRECTORY)/docs/CONFIG                                        \
+       $(DIRECTORY)/docs/index.html                                    \
        $(DIRECTORY)/docs/CONFORM                                       \
        $(DIRECTORY)/docs/COPYING                                       \
        $(DIRECTORY)/docs/COPYRIGHT                                     \
        $(DIRECTORY)/docs/DEVINFO                                       \
-       $(DIRECTORY)/docs/IAFA-PACKAGE                                  \
        $(DIRECTORY)/docs/INSTALL                                       \
        $(DIRECTORY)/docs/INSTALL.GNU                                   \
        $(DIRECTORY)/docs/README                                        \
@@ -380,7 +402,7 @@ LIB_FILES = \
        $(DIRECTORY)/include/GL/internal/glcore.h                       \
        $(DIRECTORY)/include/GL/Makefile.in                             \
        $(DIRECTORY)/include/GL/Makefile.am                             \
-       $(DIRECTORY)/include/GL/dosmesa.h                               \
+       $(DIRECTORY)/include/GL/dmesa.h                                 \
        $(DIRECTORY)/include/GL/amesa.h                                 \
        $(DIRECTORY)/include/GL/fxmesa.h                                \
        $(DIRECTORY)/include/GL/ggimesa.h                               \
@@ -408,7 +430,6 @@ LIB_FILES = \
        $(DIRECTORY)/src/Makefile*                                      \
        $(DIRECTORY)/src/libGL_la_SOURCES                               \
        $(DIRECTORY)/src/descrip.mms                                    \
-       $(DIRECTORY)/src/mms_depend                                     \
        $(DIRECTORY)/src/mesa.conf                                      \
        $(DIRECTORY)/src/*.def                                          \
        $(DIRECTORY)/src/depend                                         \
@@ -426,12 +447,16 @@ LIB_FILES =       \
        $(DIRECTORY)/src/tnl/*.[ch]                                     \
        $(DIRECTORY)/src/tnl/Makefile*                                  \
        $(DIRECTORY)/src/tnl/libMesaTnl_la_SOURCES                      \
+       $(DIRECTORY)/src/tnl_dd/*.[ch]                                  \
+       $(DIRECTORY)/src/tnl_dd/imm/*.[ch]                              \
+       $(DIRECTORY)/src/tnl_dd/imm/NOTES.imm                           \
        $(DIRECTORY)/src/windml/*.[ch]                                  \
        $(DIRECTORY)/src/windml/tornado/*.c                             \
        $(DIRECTORY)/src/windml/tornado/*.cdf                           \
-       $(DIRECTORY)/src/windml/torVars.sample                          \
        $(DIRECTORY)/src/windml/man3/*.3                                \
        $(DIRECTORY)/src/windml/man3/*.html                             \
+       $(DIRECTORY)/src/DOS/*.[chS]                                    \
+       $(DIRECTORY)/src/DOS/mga/*.[ch]                                 \
        $(DIRECTORY)/src/BeOS/*.cpp                                     \
        $(DIRECTORY)/src/FX/Makefile.am                                 \
        $(DIRECTORY)/src/FX/Makefile.in                                 \
@@ -463,6 +488,8 @@ LIB_FILES = \
        $(DIRECTORY)/src/KNOWN_BUGS                                     \
        $(DIRECTORY)/src/OSmesa/Makefile.am                             \
        $(DIRECTORY)/src/OSmesa/Makefile.in                             \
+       $(DIRECTORY)/src/OSmesa/Makefile.win                            \
+       $(DIRECTORY)/src/OSmesa/osmesa.def                              \
        $(DIRECTORY)/src/OSmesa/*.[ch]                                  \
        $(DIRECTORY)/src/SPARC/*.[chS]                                  \
        $(DIRECTORY)/src/SPARC/Makefile.am                              \
@@ -470,9 +497,6 @@ LIB_FILES = \
        $(DIRECTORY)/src/SVGA/Makefile.am                               \
        $(DIRECTORY)/src/SVGA/Makefile.in                               \
        $(DIRECTORY)/src/SVGA/*.[ch]                                    \
-       $(DIRECTORY)/src/Trace/*.[ch]                                   \
-       $(DIRECTORY)/src/Trace/Makefile.am                              \
-       $(DIRECTORY)/src/Trace/Makefile.in                              \
        $(DIRECTORY)/src/Windows/*.[ch]                                 \
        $(DIRECTORY)/src/Windows/*.def                                  \
        $(DIRECTORY)/src/X/Makefile.am                                  \
@@ -485,6 +509,9 @@ LIB_FILES = \
        $(DIRECTORY)/si-glu/Makefile.am                                 \
        $(DIRECTORY)/si-glu/Makefile.in                                 \
        $(DIRECTORY)/si-glu/Makefile.X11                                \
+       $(DIRECTORY)/si-glu/Makefile.win                                \
+       $(DIRECTORY)/si-glu/Makefile.DJ                                 \
+       $(DIRECTORY)/si-glu/glu.def                                     \
        $(DIRECTORY)/si-glu/dummy.cc                                    \
        $(DIRECTORY)/si-glu/descrip.mms                                 \
        $(DIRECTORY)/si-glu/mesaglu.opt                                 \
@@ -576,7 +603,6 @@ OBSOLETE_LIB_FILES = \
        $(DIRECTORY)/src/D3D/*bat                                       \
        $(DIRECTORY)/src/D3D/*DEF                                       \
        $(DIRECTORY)/src/DOS/DEPEND.DOS                                 \
-       $(DIRECTORY)/src/DOS/*.c                                        \
        $(DIRECTORY)/src/S3/*.[ch]                                      \
        $(DIRECTORY)/src/S3/*.def                                       \
        $(DIRECTORY)/src/S3/*.mak                                       \
@@ -609,6 +635,9 @@ DEMO_FILES =        \
        $(DIRECTORY)/src-glut/descrip.mms       \
        $(DIRECTORY)/src-glut/mms_depend        \
        $(DIRECTORY)/src-glut/*.[ch]            \
+       $(DIRECTORY)/src-glut.dos/*.[ch]        \
+       $(DIRECTORY)/src-glut.dos/Makefile.DJ   \
+       $(DIRECTORY)/src-glut.dos/PC_HW/*.[chS] \
        $(DIRECTORY)/images/*                   \
        $(DIRECTORY)/demos/Makefile*            \
        $(DIRECTORY)/demos/descrip.mms          \
@@ -618,7 +647,7 @@ DEMO_FILES =        \
        $(DIRECTORY)/demos/README               \
        $(DIRECTORY)/xdemos/Makefile*           \
        $(DIRECTORY)/xdemos/descrip.mms         \
-       $(DIRECTORY)/xdemos/*.[cf]              \
+       $(DIRECTORY)/xdemos/*.[chf]             \
        $(DIRECTORY)/book/Makefile*             \
        $(DIRECTORY)/book/README                \
        $(DIRECTORY)/book/*.[ch]                \
@@ -626,9 +655,9 @@ DEMO_FILES =        \
        $(DIRECTORY)/samples/README             \
        $(DIRECTORY)/samples/*.c                \
        $(DIRECTORY)/mtdemos                    \
-       $(DIRECTORY)windmldemos/Makefile.ugl    \
-       $(DIRECTORY)windmldemos/*.c             \
-       $(DIRECTORY)windmldemos/*.bmp           \
+       $(DIRECTORY)/windmldemos/Makefile.ugl   \
+       $(DIRECTORY)/windmldemos/*.c            \
+       $(DIRECTORY)/windmldemos/*.bmp          \
        $(DIRECTORY)/ggi
 
 OBSOLETE_DEMO_FILES = \
@@ -701,33 +730,31 @@ OBSOLETE_GLUT_FILES = \
        $(DIRECTORY)/src-glut.beos/*.h
 
 
-lib_tar:
+lib_gz:
        cp Makefile.X11 Makefile ; \
        cd .. ; \
        tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
        gzip $(LIB_NAME).tar ; \
        mv $(LIB_NAME).tar.gz $(DIRECTORY)
 
-demo_tar:
+demo_gz:
        cd .. ; \
        tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
        gzip $(DEMO_NAME).tar ; \
        mv $(DEMO_NAME).tar.gz $(DIRECTORY)
 
-glu_tar:
+lib_bz2:
        cp Makefile.X11 Makefile ; \
        cd .. ; \
-       tar -cvf $(GLU_NAME).tar $(GLU_FILES) ; \
-       gzip $(GLU_NAME).tar ; \
-       mv $(GLU_NAME).tar.gz $(DIRECTORY)
+       tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
+       bzip2 $(LIB_NAME).tar ; \
+       mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
 
-glut_tar:
-       cp Makefile.X11 Makefile ; \
+demo_bz2:
        cd .. ; \
-       tar -cvf $(GLUT_NAME).tar $(GLUT_FILES) ; \
-       gzip $(GLUT_NAME).tar ; \
-       mv $(GLUT_NAME).tar.gz $(DIRECTORY)
-
+       tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
+       bzip2 $(DEMO_NAME).tar ; \
+       mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
 
 lib_zip:
        -rm $(LIB_NAME).zip ; \
@@ -742,20 +769,29 @@ demo_zip:
        zip -r $(DEMO_NAME).zip $(DEMO_FILES) ; \
        mv $(DEMO_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
 
+# Everything for new Mesa release:
+tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
 
-SRC_FILES =    \
-       RELNOTES                \
-       src/Makefile*           \
-       src/depend              \
-       src/*.[chS]             \
-       src/*/*.[ch]            \
-       include/GL/*.h
 
-srctar:
-       tar -cvf src.tar $(SRC_FILES) ; \
-       gzip src.tar
+# not used
+glu_gz:
+       cp Makefile.X11 Makefile ; \
+       cd .. ; \
+       tar -cvf $(GLU_NAME).tar $(GLU_FILES) ; \
+       gzip $(GLU_NAME).tar ; \
+       mv $(GLU_NAME).tar.gz $(DIRECTORY)
 
-srctar.zip:
-       -rm src.zip
-       zip -r src.zip $(SRC_FILES) ; \
+glut_gz:
+       cp Makefile.X11 Makefile ; \
+       cd .. ; \
+       tar -cvf $(GLUT_NAME).tar $(GLUT_FILES) ; \
+       gzip $(GLUT_NAME).tar ; \
+       mv $(GLUT_NAME).tar.gz $(DIRECTORY)