#******************************************************************************
#
#       Copyright:      2005-2010 Paul Obermeier (obermeier@tcl3d.org)
#
#                       See the file "Tcl3D_License.txt" for information on
#                       usage and redistribution of this file, and for a
#                       DISCLAIMER OF ALL WARRANTIES.
#
#       Module:         Tcl3D
#       Filename:       config_IRIX64
#
#       Author:         Paul Obermeier
#
#       Description:    Configuration file for SGI IRIX based systems using
#                       the GNU or MIPS-Pro C++ Compiler.
#                       Standards are set for the GNU compiler. The places to 
#                       change, when using the MIPS-Pro compiler are marked with
#                       "MIPS-PRO".
#                       This file is included from the global Makefile.
#                       The syntax is based on GNU make.
#
#******************************************************************************

# Set the following variable to 1, if compiling with stubs.
WITH_STUBS = 1

# Set the following variable to 1, if compiling with debugging information.
# WITH_DEBUG = 1

INSTDIR  = /usr/local
TCLDIR   = /usr/local
TKDIR    = /usr/local

TCLMAJOR     = 8
TCLMINOR     = 5

INSTBIN  = $(INSTDIR)/bin
INSTLIB  = $(INSTDIR)/lib
INSTINC  = $(INSTDIR)/include

# Do not print out unused variables or functions, as this occurs very often
# in the auto-generated SWIG code.
WARNINGS =
# MIPS-PRO
# WARNINGS = -woff 1174,1552

ifdef WITH_DEBUG
OPT     = -g $(WARNINGS)
# MIPS-PRO
# OPT     = -g2 -signed $(WARNINGS)
DEBUG_SUFFIX=d
else
OPT     = -O -DNDEBUG $(WARNINGS)
# MIPS-PRO
# OPT     = -O -OPT:Olimit=0 -signed -DNDEBUG $(WARNINGS)
DEBUG_SUFFIX=
endif

PPSTUBS   = -DUSE_TCL_STUBS -DUSE_TK_STUBS
PPNOSTUBS = -D$(OS_TYPE) -DIRIX

CC           = gcc -c
CXX          = g++ -c
# MIPS-PRO
# CC           = cc -n32 -c
# CXX          = CC -c

MAKE         = gmake
LD           = cc -g -Wl,-woff,84 -Wl,-woff,85 -Wl,-woff,134
LDOUT        = -o 
SHLIB_LD     = gcc -shared
SHLIB_LDXX   = g++ -shared
# MIPS-PRO
# SHLIB_LD     = cc -shared -rdata_shared -n32
# SHLIB_LDXX   = CC -shared -rdata_shared -n32
SHLIB_CFLAGS =  

OBJEXT   = .o
LIBEXT   = .a
SHLIBEXT = .so
BINEXT   =
DSEP     = /

GLLIBS = -lGLU -lGL -lXmu

SYSLIBS = -lX11 -lm -lfpe -lmalloc

TCLVERSION   = $(TCLMAJOR).$(TCLMINOR)
TCLINCDIR    = $(TCLDIR)/include
TKINCDIR     = $(TKDIR)/include
TCLLIBDIR    = $(TCLDIR)/lib
TKLIBDIR     = $(TKDIR)/lib
TCLSTUBLIBS  = $(TKLIBDIR)/libtkstub$(TCLVERSION)$(LIBEXT) $(TCLLIBDIR)/libtclstub$(TCLVERSION)$(LIBEXT)
TCLSTDLIBS   = $(TKLIBDIR)/libtk$(TCLVERSION)$(LIBEXT) $(TCLLIBDIR)/libtcl$(TCLVERSION)$(LIBEXT)
TCLSH        = tclsh$(TCLVERSION)

RM           = rm -f
RMDIR        = rm -rf
CP           = cp -p
CPDIR        = csh -f cpdir
MKDIR        = mkdir -p

INCL   = -I. -I$(TCLINCDIR)

ifdef WITH_STUBS
TCLLIBS = $(TCLSTUBLIBS)
PPDEFS  = $(PPNOSTUBS) $(PPSTUBS)
else
TCLLIBS = $(TCLSTDLIBS)
PPDEFS  = $(PPNOSTUBS)
endif
PPDEFS += -DTOGL_X11
PPDEFS += -D__STDC_VERSION__=199901     # Needed for glxext.h Line 310

# Additional debugging options

# Debug tcl3dVector allocation and destruction.
# PPDEFS += -DDEBUG_VECTOR=1
