#
# $Id: make.cfg,v 1.16 2005/03/12 17:19:11 wes Exp $
# $Revision: 1.16 $
# $Log: make.cfg,v $
# Revision 1.16  2005/03/12 17:19:11  wes
# Added netbsd, netbsd-debug, netbsd-pkgsrc arch-specific configs.
#
# Revision 1.15  2005/02/19 16:47:52  wes
# Distro sync and consolidation.
#
# Revision 1.14  2005/01/23 17:18:04  wes
# Version change to OpenRM 1.6
#
# Revision 1.13  2004/04/18 19:55:13  wes
# Minor consistency improvements.
#
# Revision 1.12  2004/04/09 14:46:55  wes
# Added new build targets: linux-x86_64, linux-x86_64-debug, linux-x86_32,
# and linux-x86_32-debug. Tweak and test to support builds on Darwin.
#
# Revision 1.11  2004/03/18 15:50:30  wes
# Modified CFLAGS for irix6 builds to ignore an additional compile
# warning: variables declared but not used.
#
# Revision 1.10  2004/02/23 03:01:58  wes
# MacOSX targets.
#
# Revision 1.9  2004/01/17 03:59:02  wes
# Updated Copyright line for 2004.
#
# Revision 1.8  2003/12/12 00:54:21  wes
# Remove curly braces in freebsd make rules, replace with parens. Curly
# braces make Windows get ill.
#
# Revision 1.7  2003/12/12 00:25:42  wes
# Added freebsd build rules. Thanks to Igor Pokrovsky for the contribution.
#
# Revision 1.6  2003/12/01 02:15:07  wes
# Updated linux (no debug) build CFLAGS for current versions of gcc.
#
# Revision 1.5  2003/07/20 14:11:32  wes
# Modified compile flag for solaris targets from -Xc to -Xa to reduce
# warnings caused by old declarations in Sun's header files.
#
# Revision 1.4  2003/07/14 02:18:23  wes
# Update minor version to 5.
#
# Revision 1.3  2003/02/14 00:14:00  wes
# Updated make.cfg and all Makefile.x11 files.
#
# Revision 1.2  2003/02/02 02:07:13  wes
# Updated copyright to 2003.
#
# Revision 1.1.1.1  2003/01/28 02:15:23  wes
# Manual rebuild of rm150 repository.
#
# Revision 1.15  2003/01/27 05:03:31  wes
# New compile flags and defines for linux-debug and linux-cr-debug targets
#
# Revision 1.14  2002/12/31 00:56:49  wes
#
# Added linux-cr-debug build target for use with Chromium.
#
# Revision 1.13  2002/12/04 14:50:28  wes
# Cleanup SGI compiles.
#
# Revision 1.12  2002/08/19 00:27:11  wes
# Changed win-32 targets to: win-32-static, win-32-dynamic and win-32-clean.
# Revamp of compile flags for all architectures. Remapped definitions for
# pthreads and jpeg to be consistent with a distribution tarball.
#
# Revision 1.11  2001/10/14 23:37:11  wes
# Minor changes for Win32 systems to update new internal structure used
# in the pthreads-win32 distribution (latest version is 7/2001).
#
# Revision 1.10  2001/06/04 01:53:39  wes
# Added JPEGINC definition to solaris and solaris-debug targets.
#
# Revision 1.9  2001/06/03 20:19:41  wes
# Added -lrmi to RM libs.
#
# Revision 1.8  2001/03/31 18:46:06  wes
# Added win-32-dll from RM 1.3.1, misc tweaks to win-32 flags.
#
# Revision 1.7  2001/03/31 17:13:47  wes
# v1.4.0-alpha-2 checkin
#
# Revision 1.6  2000/12/03 23:50:16  wes
# Major/minor change to 1.4
#
# Revision 1.5  2000/10/03 11:43:46  wes
# Contributions from jdb - housekeeping wrt IRIX species.
#
# Revision 1.4  2000/08/31 02:13:30  wes
# On Linux platforms, the default location for OpenGL includes is
# assumed to be /usr/include (like SGIs), and /usr/lib for OpenGL
# libraries (again, like SGIs).
#
# Revision 1.3  2000/05/17 14:32:05  wes
# Changed Major/Minor to 1.3.
#
# Revision 1.2  2000/04/20 17:53:37  wes
# Win32 LIBDIR name change - now use backslash in pathname.
#
# Revision 1.1.1.1  2000/02/28 21:29:40  wes
# OpenRM 1.2 Checkin
#
# Revision 1.1.1.1  2000/02/28 17:18:47  wes
# Initial entry - pre-RM120 release, source base for OpenRM 1.2.
#
#

SHELL=/bin/sh

MAJOR=1
MINOR=6
VERSION=$MAJOR.$MINOR

netbsd:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"XINC = -I/usr/X11R6/include" \
	"GLINC = -I/usr/pkg/include" \
	"JPEGINC = -I/usr/pkg/include" \
	"RMINC = ../include" \
	"CFLAGS = $(CFLAGS) -c -finline-functions -fomit-frame-pointer -DRM_X -D'pthread_setconcurrency(a)=0'" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.netbsd" \
	"ARCHFLAGS = none"

netbsd-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"XINC = -I/usr/X11R6/include" \
	"GLINC = -I/usr/pkg/include" \
	"JPEGINC = -I/usr/pkg/include" \
	"RMINC = ../include" \
	"CFLAGS = $(CFLAGS) -g -c -finline-functions -fomit-frame-pointer -DRM_X -D'pthread_setconcurrency(a)=0'" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.netbsd" \
	"ARCHFLAGS = none"

netbsd-pkgsrc:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"XINC = -I$(X11BASE)/include" \
	"GLINC = -I$(LOCALBASE)/include" \
	"JPEGINC = -I$(LOCALBASE)/include" \
	"RMINC = ../include" \
	"CFLAGS = $(CFLAGS) -c -finline-functions -fomit-frame-pointer -DRM_X -D'pthread_setconcurrency(a)=0'" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.netbsd-pkgsrc" \
	"ARCHFLAGS = none"

freebsd:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"XINC = -I$(X11BASE)/include" \
	"GLINC = -I$(X11BASE)/include" \
	"JPEGINC = -I$(LOCALBASE)/include" \
	"RMINC = ../include" \
	"CFLAGS = $(CFLAGS) -c -finline-functions -fomit-frame-pointer -DRM_X" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.freebsd" \
	"ARCHFLAGS = none"

linux:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC = -I/usr/include" \
	"RMINC = ../include" \
	"CFLAGS = -c -O2 -march=i486 -finline-functions -fomit-frame-pointer -DRM_X" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = none"

linux-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -D_BSD_SOURCE -Wall -Winline -march=i486 -finline-functions -DRM_X"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = debug"
#	"CFLAGS = -c -g -ansi -Wall -Winline -m486 -finline-functions -DRM_X" 

linux-cr-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC = -I/usr/local/cr/include" \
	"RMINC = ../include" \
	"CFLAGS = -c -g -D_SVID_SOURCE -D_BSD_SOURCE -Wall -Winline -march=i486 -finline-functions -DRM_X -DRM_CR" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = debug"

linux-x86_64-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -D_BSD_SOURCE -Wall -Winline -m64 -finline-functions -DRM_X -fPIC"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = 64-debug"

linux-x86_64:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"CFLAGS = -c -O2 -D_BSD_SOURCE -Wall -Winline -m64 -finline-functions -DRM_X -fPIC"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = 64"

linux-x86_32-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -D_BSD_SOURCE -Wall -Winline -m32 -finline-functions -DRM_X -fPIC"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = 32-debug"

linux-x86_32:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"CFLAGS = -c -O2 -D_BSD_SOURCE -Wall -Winline -m32 -finline-functions -DRM_X -fPIC"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = 32"

linux-nopthreads-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -D_NO_PTHREADS -D_BSD_SOURCE -Wall -Winline -march=i486 -finline-functions -DRM_X"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = debug"

linux-nopthreads:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  "\
	"RMINC = ../include" \
	"CFLAGS = -c -O2 -D_NO_PTHREADS -D_BSD_SOURCE -Wall -Winline -march=i486 -finline-functions -DRM_X"  \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.linux" \
        "ARCHFLAGS = none"

macosx-X11:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC = " \
	"JPEGINC = -I/usr/local/include" \
	"RMINC = ../include" \
	"CFLAGS = -c -O2 -fno-common -finline-functions -fomit-frame-pointer -DRM_X" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.macosx-X11" \
	"ARCHFLAGS = none"

macosx-X11-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = gcc" \
	"XINC = -I/usr/X11R6/include" \
	"GLINC =  " \
	"RMINC = ../include" \
	"JPEGINC = -I/usr/local/include" \
	"CFLAGS = -c -g -fno-common -Wall -Winline -finline-functions -DRM_X" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.macosx-X11" \
	"ARCHFLAGS = debug"


# 
# solaris doesn't include the JPEG hdrs and libs with the system
# (at least in versions 2.5.1 and 2.6). You will probably have to
# change JPEGINC in the solaris targets to point to the location
# of the hdrs on your system. if you can't find any, you can download
# the JPEG src from www.itg.org and build it yourself.
#
solaris:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = /usr/openwin/include" \
	"GLINC = /usr/openwin/include" \
	"RMINC = ../include" \
	"JPEGINC = -I/usr/local/include" \
	"CFLAGS = -O -c -Xa -Kpic -v -I/usr/openwin/include -DSOLARIS -DRM_X" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.solaris" \
        "ARCHFLAGS = none"

solaris-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = /usr/openwin/include" \
	"GLINC = /usr/openwin/include" \
	"RMINC = ../include" \
	"JPEGINC = -I/usr/local/include" \
	"CFLAGS = -g -c -Xa -Kpic -v -I/usr/openwin/include -DSOLARIS -DRM_X" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.solaris" \
        "ARCHFLAGS = debug"

irix6-32:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -woff 835 -O2 -32 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMKLIB = librmk" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = 32"

irix6-32-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -fullwarn -woff 835 -32 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMKLIB = librmk" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = 32-debug"

irix6-n32:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -woff 1552,1174,3201 -O2 -n32 -mips3 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = n32"

irix6-n32-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -fullwarn -woff 1552,1174,3201 -n32 -mips3 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = n32-debug"

irix6-n32-mips4:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -woff 1174,1552,3201 -O2 -n32 -mips4 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = n32-mips4"

irix6-n32-mips4-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -fullwarn -woff 1174,1552,3201 -n32 -mips4 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = n32-mips4-debug"

irix6-64:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -woff 1174,1506,1552,3201 -O2 -64 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = 64"

irix6-64-debug:
	@$(MAKE) $(MFLAGS) -f Makefile.x11 targets \
	"CC = cc" \
	"XINC = " \
	"GLINC = " \
	"RMINC = ../include" \
	"CFLAGS = -c -g -fullwarn -woff 1174,1506,1552,3201 -64 -DIRIX -DRM_X" \
	"XLIBS = -lX11 -lXext" \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ../lib" \
	"MAKELIB = ../bin/mklib.irix6" \
	"ARCHFLAGS = 64-debug"

#
# win-32 is a debug build.
# also, you'll need to adjust the Include locations in CFLAGS and
# GLINC for your system
#
# one user suggests this might work if you put stuff into Program Files:
# "GLINC=\"c:\Program Files\Microsoft Visual Studio\vc98\include\GL\"" \
#
win-32-static:
	$(MAKE) /f Makefile.w32 $(MFLAGS) static-win32 \
	"CC = cl" \
	"GLINC=\pf\vc98\include\GL" \
	"RMINC=../include" \
	"PTHREADINC=\PTHREADS\include" \
	"JPEGINC=\jpeg-6b\include" \
	"CFLAGS = /D "_DEBUG" /Z7 /c /nologo /W1 /Od /GZ -I\pf\vc98\include -I..\include /D \"RM_WIN\" " \
	"XLIBS = " \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ..\lib" 

win-32-nopthreads-static:
	$(MAKE) /f Makefile.w32 $(MFLAGS) static-win32 \
	"CC = cl" \
	"GLINC=\pf\vc98\include\GL" \
	"RMINC=../include" \
	"PTHREADINC=." \
	"JPEGINC=\jpeg-6b\include" \
	"CFLAGS = /D_NO_PTHREADS /Z7 /c /nologo /W1 /Od /GZ -I\pf\vc98\include -I..\include /D \"RM_WIN\" " \
	"XLIBS = " \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ..\lib" 


win-32-dynamic:
	$(MAKE) /f Makefile.w32 $(MFLAGS) dynamic-win32 \
	"CC = cl" \
	"GLINC=\pf\vc98\include\GL" \
	"RMINC=../include" \
	"PTHREADINC=\PTHREADS\include" \
	"PTHREADSLIBS=\PTHREADS\lib\pthreadVC.lib" \
	"JPEGINC=\jpeg-6b\include" \
	"JPEGLIB=\jpeg-6b\lib\libjpeg.lib" \
	"CFLAGS = /nologo /MDd /W1 /GX /Od /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RM_DLL_EXPORTS" /D "RM_WIN" /YX /FD /c -I\pf\vc98\include " \
	"XLIBS = " \
	"RMLIB = librm" \
	"RMVLIB = librmv" \
	"RMAUXLIB = librmaux" \
	"RMILIB = librmi" \
	"LIBDIR = ..\lib"

# EOF
