# Make-config

# Mesa 3-D graphics library
# Version:  1.2.2
# Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
#
# 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.


# $Id: Make-config,v 1.15 1995/08/01 21:04:20 brianp Exp $

# $Log: Make-config,v $
# Revision 1.15  1995/08/01  21:04:20  brianp
# removed -I$(INCDIR) from all CFLAGS
# added MAKELIB
# added MachTen config
#
# Revision 1.14  1995/06/21  16:03:32  brianp
# added irix5-dso, linux-elf, and unixware targets
# added TK_LIB and AUX_LIB variables
# Release 1.2.1
#
# Revision 1.13  1995/05/25  18:52:01  brianp
# changed hpux XLIBS order of -lXext -lX11 per Jan Springer
#
# Revision 1.12  1995/05/23  13:51:11  brianp
# Release 1.2
#
# Revision 1.11  1995/05/16  14:12:02  brianp
# added amix target
# changed a few compiler flags
#
# Revision 1.10  1995/04/20  17:36:09  brianp
# made SCO a separate target
#
# Revision 1.9  1995/04/18  15:49:32  brianp
# fixed XLIBS variable for sun4-gcc configuration
#
# Revision 1.8  1995/04/17  14:47:04  brianp
# introduced GL_LIB and GLU_LIB variables
#
# Revision 1.7  1995/03/31  17:07:24  brianp
# 1.1.3 beta release
#
# Revision 1.6  1995/03/14  14:34:09  brianp
# 1.1.2 beta release
#
# Revision 1.5  1995/03/09  14:55:31  brianp
# added -mieee-fp to Linux CFLAGS per Thorsten Ohl
#
# Revision 1.4  1995/03/09  14:52:20  brianp
# added osf1 target per Joseph Canedo
#
# Revision 1.3  1995/03/08  18:53:19  brianp
# added linux-debug target per Thorsten Ohl
#
# Revision 1.2  1995/03/07  14:34:26  brianp
# new hpux CFLAGS per Jan Springer's suggestion
#
# Revision 1.1  1995/03/03  16:27:51  brianp
# Initial revision
#



# The following variables are passed to each Makefile:
#
# GL_LIB      the name of the Mesa "GL" library file (usually libMesaGL.a)
# GLU_LIB     the name of the Mesa "GLU" library file (usually libMesaGLU.a)
# TK_LIB      the name of the TK toolkit library file (usually libMesatk.a)
# AUX_LIB     the name of the AUX toolkit library file (usually libMesaaux.a)
# CC          the C compiler (usually cc or gcc)
# CFLAGS      flags to C compiler (usually -O)
# MAKELIB     the command and flags to make a library file (usually "ar rcv"
#                   or a shell script for shared libs)
# RANLIB      "ranlib" = use ranlib, "true" = don't use ranlib
# XLIBS       libraries needed to link X apps (at least -lX11)
#
# To add a new configuration for your system just follow the examples below
# and update the top-level Makefile.
#
# If your system supports the X Shared Memory extension add -DSHM to the
# CFLAGS line and add -lXext to the XLIBS line.




aix:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -O" \
	"MAKELIB = ../mklib.aix" \
	"RANLIB = true" \
	"XLIBS = -lX11"

# Make-config additions for the Amiga 3000 UX
# Carlyn Voss Iuzzolino   5/8/95: 
# Modified gcc part as follows:
# Needed to take out -pedantic because that makes gcc complain about 
# ANSI-CC not allowing #ident in Amiga's /usr/include/*.h files.
# Took out -O2 (unrecognized option for gcc on the Amiga).
# Needs /usr/lib/libsocket.a file. 
amix:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS =" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lsocket -lnsl "

freebsd:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2" \
	"MAKELIB = ar ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11"

gcc:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2" \
	"MAKELIB = ar ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11"

hpux:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = +O2 +Oall +Onolimit -Aa -D_HPUX_SOURCE -I/usr/include/X11R5 -DSHM" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/lib/X11R5 -lXext -lX11"

# For IRIX 4: don't use -fullwarn because it causes too much garbage
irix4:
	pmake targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -O2 -ansi -prototypes -float -DSHM" \
	"MAKELIB = ar rcv" \
	"RANLIB = true" \
	"XLIBS = -lXext -lX11"

# On IRIX 5.3 -sopt causes a problem in drawpixels.c so we don't use it
irix5:
	pmake targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -O2 -ansi -fullwarn -float -DSHM" \
	"MAKELIB = ar rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext"

# IRIX 5 using Dynamic Shared Objects (DSO)
irix5-dso:
	pmake targets \
	"GL_LIB = libMesaGL.so" \
	"GLU_LIB = libMesaGLU.so" \
	"TK_LIB = libMesatk.so" \
	"AUX_LIB = libMesaaux.so" \
	"CC = cc" \
	"CFLAGS = -O2 -ansi -fullwarn -float -DSHM" \
	"MAKELIB = ../mklib.irix5" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext"

# For IRIX 6: -woff:
#   1068 - integer conversion resulted in a change of sign
#   1069 - integer conversion resulted in truncation
#   1174 - variable was declared but never referenced
#   1185 - enumerated type mixed with another type
#   1209 - controlling expression is constant
#   1474 - declaring a void parameter list with a typedef is nonstandard
#   1552 - variable was set but never used
irix6:
	pmake targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -64 -O3 -ansi -fullwarn -woff 1068,1069,1174,1185,1209,1474,1552 -DSHM" \
	"MAKELIB = ar rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext"

linux:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2 -mieee-fp" \
	"MAKELIB = ar ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11/lib -lX11"

linux-elf:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.so" \
	"GLU_LIB = libMesaGLU.so" \
	"TK_LIB = libMesatk.so" \
	"AUX_LIB = libMesaaux.so" \
	"CC = gcc" \
	"CFLAGS = -pedantic -fPIC -O2 -mieee-fp" \
	"MAKELIB = ../mklib.linux" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11/lib -lX11"

machten:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -DTENON -D__MACHTEN__ -fstrength-reduce -m68881 -O2" \
	"MAKELIB = ar rcv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/lib/X11 -lX11"

netbsd:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pipe -O2"  \
	"MAKELIB = ar rcv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11R5/lib -lX11"

osf1:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -O2 -std1 -DSHM" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext"

sco:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2 -mieee-fp" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/X11/lib -lX11"

sunos4:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = acc" \
	"CFLAGS = -O -DSHM -DSUNOS4" \
	"MAKELIB = ar ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11 -lXext"

sunos4-gcc:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -O3 -DSHM -DSUNOS4" \
	"MAKELIB = ar ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/openwin/lib -lX11 -lXext"

sunos5:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -Xa -O -I/usr/openwin/include -DSHM" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext"

sunos5-gcc:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -O3 -I/usr/openwin/include -DSHM" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/openwin/lib -lX11 -lXext"

ultrix:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -O -Dconst=/**/" \
	"MAKELIB = ar rusv" \
	"RANLIB = true" \
	"XLIBS = -lX11"

unixware:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -O -I/usr/X/include -DSHM" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext -lsocket -lnsl"

vistra:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2" \
	"MAKELIB = ar ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lsocket -lnsl -lgen"


# for debugging on IRIX 5.x systems
debug:
	pmake targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -g -ansi -prototypes -fullwarn -float -DSHM" \
	"MAKELIB = ar rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext -lfpe -lXext"

DEBUG:
	pmake targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = cc" \
	"CFLAGS = -g -ansi -prototypes -fullwarn -float -DSHM -DDEBUG" \
	"MAKELIB = ar rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext -lfpe"

# for debugging on Linux systems
linux-debug:
	$(MAKE) targets \
	"GL_LIB = libMesaGL.a" \
	"GLU_LIB = libMesaGLU.a" \
	"TK_LIB = libMesatk.a" \
	"AUX_LIB = libMesaaux.a" \
	"CC = gcc" \
	"CFLAGS = -pedantic -g" \
	"MAKELIB = ar ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11/lib -lX11"

