# Make-config

# Mesa 3-D graphics library
# Version:  1.1 beta
# 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.7 1995/03/31 17:07:24 brianp Exp $

# $Log: Make-config,v $
# 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
#



# This is included by all the sub-dir makefiles to define the following
# variables:
#
# CC          the C compiler (usually cc or gcc)
# CFLAGS      flags to C compiler
# ARFLAGS     flags to ar
# RANLIB      "ranlib" = use ranlib, "true" = don't use ranlib
# XLIBS       libraries needed to link X apps
#
# To add a new configuration for your system just follow the examples below
# and update the top-level Makefile.



aix:
	$(MAKE) targets \
	"CC = cc" \
	"CFLAGS = -O -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11"

freebsd:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2 -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11"

gcc:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2 -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11"

hpux:
	$(MAKE) targets \
	"CC = cc" \
	"CFLAGS = +O2 +Oall +Onolimit -Aa -D_HPUX_SOURCE -I$(INCDIR) -I/usr/include/X11R5" \
	"ARFLAGS = ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/lib/X11R5 -lX11"

# For IRIX 4: don't use -fullwarn because it causes too much garbage
irix4:
	pmake targets \
	"CC = cc" \
	"CFLAGS = -O2 -ansi -prototypes -float -I$(INCDIR)" \
	"ARFLAGS = rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext"

# On IRIX 5.3 -sopt causes a problem in drawpixels.c so we don't use it
irix5:
	pmake targets \
	"CC = cc" \
	"CFLAGS = -O2 -ansi -prototypes -fullwarn -float -I$(INCDIR) -DSHM" \
	"ARFLAGS = rcv" \
	"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 \
	"CC = cc" \
	"CFLAGS = -64 -O2 -ansi -fullwarn -woff 1068,1069,1174,1185,1209,1474,1552 -I$(INCDIR)" \
	"ARFLAGS = rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext"

linux:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2 -mieee-fp -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11/lib -lX11"

netbsd:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -pipe -O2 -I$(INCDIR)"  \
	"ARFLAGS = rcv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11R5/lib -lX11"

osf1:
	$(MAKE) targets \
	"CC = cc" \
	"CFLAGS = -DSHM -O3 -I$(INCDIR) -std1" \
	"ARFLAGS = ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11"

sunos4:
	$(MAKE) targets \
	"CC = acc" \
	"CFLAGS = -O -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11"

sunos4-gcc:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -O -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -lX11"

sunos5:
	$(MAKE) targets \
	"CC = cc" \
	"CFLAGS = -Xa -O -I/usr/openwin/include -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/openwin/lib -lX11"

sunos5-gcc:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -O -I/usr/openwin/include -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = true" \
	"XLIBS = -L/usr/openwin/lib -lX11"

ultrix:
	$(MAKE) targets \
	"CC = cc" \
	"CFLAGS = -O -I$(INCDIR) -Dconst=/**/" \
	"ARFLAGS = rusv" \
	"RANLIB = true" \
	"XLIBS = -lX11"

vistra:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -pedantic -O2 -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lsocket -lnsl -lgen"


# for debugging on IRIX systems
debug:
	pmake targets \
	"CC = cc" \
	"CFLAGS = -g -ansi -prototypes -fullwarn -float -I$(INCDIR)" \
	"ARFLAGS = rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext -lfpe"

DEBUG:
	pmake targets \
	"CC = cc" \
	"CFLAGS = -g -ansi -prototypes -fullwarn -float -I$(INCDIR) -DDEBUG" \
	"ARFLAGS = rcv" \
	"RANLIB = true" \
	"XLIBS = -lX11 -lXext -lfpe"

# for debugging on Linux systems
linux-debug:
	$(MAKE) targets \
	"CC = gcc" \
	"CFLAGS = -pedantic -g -I$(INCDIR)" \
	"ARFLAGS = ruv" \
	"RANLIB = ranlib" \
	"XLIBS = -L/usr/X11/lib -lX11"

