# $Source: /usr/local/SimSoft/Sfx3D/src/Makebd.def,v $
# $Revision: 1.2 $
# $Author: baum $
# $Date: 2001/11/29 15:18:09 $
#
# Login name of the user who locked the revision
# $Locker:  $
# Tag name used to checkout the file
# $Name:  $
# State assigned to revision
# $State: Exp $
#
#
# $Log: Makebd.def,v $
# Revision 1.2  2001/11/29 15:18:09  baum
# -Realzeitsteuerung eingebaut
# -Handsteuerung eingebaut
#

##########################################
# Project directories
#
# TMPDIR = location where object files 
#          should be stored during build
# ROOT   = top of source tree
#
# SOFTSHOPDIR = what it says;-))
# STDDIR      = Borland-Compiler-Dir
# GLDIR       = OpenGL-Library-Dir
#
##########################################

TMPDIR	= .\\

ROOT    = \Sfx3D\\

SOFTSHOPDIR = \SoftShop\\

HANDLERDIR  = $(SOFTSHOPDIR)Handler\\

STDDIR  = $(MAKEDIR)\..\\

GLDIR   = $(STDDIR)\Lib\PSDK\\

###########################################
#  JAVA
###########################################
JAVA_HOME           = D:\Programme\j2sdk1.4.2_04\\
JAVALIB 	        = jvmOMF.lib
JAVAINCLUDES        = $(JAVA_HOME)include\\
JAVAWIN32INCLUDES   = $(JAVA_HOME)include\win32\\
JAVALIBDIR          = $(JAVA_HOME)lib\\

JAVAHANDLERLIBNAME  = JavaHandler
JAVAHANDLERDIR      = $(HANDLERDIR)$(JAVAHANDLERLIBNAME)\\
JAVAHANDLERDLL	    = $(JAVAHANDLERLIBNAME)$(DLL)
JAVAHANDLERLIB	    = $(JAVAHANDLERLIBNAME)$(LIB) 

JAVAHANDLERTESTDIR  = $(HANDLERDIR)$(JAVAHANDLERLIBNAME)Test\\
JAVA_INCLUDES 	    = -I$(JAVAINCLUDES) -I$(JAVAWIN32INCLUDES)

###########################################
# set the following line to 1
# to compile with debug symbols
# and with CodeGuard support (CBUILDER 5)
# OR optimize full with FULLSPEED
###########################################

DEBUG     = 1

!if "$(DEBUG)" == "1"
CODEGUARD = 0
!endif

!if "$(DEBUG)" == "0"
FULLSPEED = 1
!endif

###########################################
#  set MSOGL to 1
#  when using Microsoft-OpenGL
#  (otherwise use SGI-OpenGL)
###########################################

MSOGL = 1

###########################################
#  set TCLTKSOURCE to 1
#  when using soucecode of Tcl/Tk
#  (otherwise use Bin-Package)
#  Perhaps you have to edit
#  Path or TCLVersion
###########################################

TCLTKSOURCE   = 1

TCLVERSION    = 85
TCLDOTVERSION = 8.5a1
TIXVERSION    = 81
TIXDOTVERSION = 8.1.4

!if "$(DEBUG)" == "1"
DBGX = d
!endif

!if $(TCLVERSION) >= 88888888
TCLTKDEFINES = USE_TCL_STUBS;USE_TK_STUBS
STUBPREFIX   = stub
!endif

!if "$(TCLTKSOURCE)" == "1"
TCLDIR  = $(SOFTSHOPDIR)Tcl\TCL$(TCLDOTVERSION)\\
TKDIR   = $(SOFTSHOPDIR)Tcl\TK$(TCLDOTVERSION)\\
TIXDIR  = $(SOFTSHOPDIR)Tcl\Tix-$(TIXDOTVERSION)\\
!else
TCLDIR  = D:\Programme\Tcl\\
TKDIR   = $(TCLDIR)
TIXDIR  = $(TCLDIR)
!endif

#TCLLIB = tcl$(STUBPREFIX)$(TCLVERSION)$(DBGX)OMF.lib
TCLLIB = tcl$(STUBPREFIX)$(TCLVERSION)$(DBGX).lib
TCLDLL = tcl$(TCLVERSION)$(DBGX).dll

#TKLIB  = tk$(STUBPREFIX)$(TCLVERSION)$(DBGX)OMF.lib
TKLIB  = tk$(STUBPREFIX)$(TCLVERSION)$(DBGX).lib
TKDLL  = tk$(TCLVERSION)$(DBGX).dll

TIXLIB = tix$(TIXVERSION)$(TCLVERSION)$(DBGX).lib
TIXDLL = tix$(TIXVERSION)$(TCLVERSION)$(DBGX).dll

###########################################
#  !!do not edit below!!
###########################################


!if "$(MSOGL)" == "1"

# Microsoft OpenGL libraries
GLLIB   = opengl32.lib
GLDLL   = opengl32.dll

GLULIB  = glu32.lib
GLUDLL  = glu32.dll

!else

# SGI OpenGL libraries (formerly Cosmo)
GLLIB   = opengl.lib
GLDLL   = opengl.dll

GLULIB  = glu.lib
GLUDLL  = glu.dll

!endif

###########################################
#  SFX3D directories 
###########################################

GSLDIR        = $(ROOT)src\gsl\\
GTSDIR        = $(ROOT)src\gts\\
BINDIR        = $(ROOT)bin\\
INCDIR        = $(ROOT)include\\
LIBDIR        = $(ROOT)lib\\

###########################################
#  SoftShop directories 
###########################################

SOFTINCDIR     = $(SOFTSHOPDIR)include\\
SOFTLIBDIR     = $(SOFTSHOPDIR)lib\\
XGRAPHUTILSDIR = $(SOFTSHOPDIR)XGraph\utils\\


###########################################
# file-extensions as macro 
###########################################

H   = .h
C   = .c
CPP = .cpp

O   = .obj

LIB = .lib
DLL = .dll

E   = .exe
CFG = .cfg

RC  = .rc
RES = .res

INI = .ini

###########################################
#  libs to build and use
###########################################

BASICSLIBNAME = basics
BASICSLIB     = $(BASICSLIBNAME)$(LIB)
BASICSDLL     = $(BASICSLIBNAME)$(DLL)

IDLIBNAME  = identity
IDLIB      = $(IDLIBNAME)$(LIB)
IDDLL      = $(IDLIBNAME)$(DLL)

TTOOLLIBNAME = ttool
TTOOLLIB     = $(TTOOLLIBNAME)$(LIB)
TTOOLDLL     = $(TTOOLLIBNAME)$(DLL)

SIMTOOLLIBNAME = simtool
SIMTOOLLIB     = $(SIMTOOLLIBNAME)$(LIB)
SIMTOOLDLL     = $(SIMTOOLLIBNAME)$(DLL)

XMATHLIBNAME = xmath
XMATHLIB     = $(XMATHLIBNAME)$(LIB)
XMATHDLL     = $(XMATHLIBNAME)$(DLL)

EXECONTEXTLIBNAME = execon
EXECONTEXTLIB     = $(EXECONTEXTLIBNAME)$(LIB)
EXECONTEXTDLL     = $(EXECONTEXTLIBNAME)$(DLL)

NEWSIMCLIBNAME = newsimc
NEWSIMCLIB     = $(NEWSIMCLIBNAME)$(LIB)
NEWSIMCDLL     = $(NEWSIMCLIBNAME)$(DLL)

VIEWSLIBNAME = views
VIEWSLIB     = $(VIEWSLIBNAME)$(LIB)
VIEWSDLL     = $(VIEWSLIBNAME)$(DLL)

XGRAPHLIBNAME = xgraph
XGRAPHLIB     = $(XGRAPHLIBNAME)$(LIB)
XGRAPHDLL     = $(XGRAPHLIBNAME)$(DLL)

MAINLIBNAME = sfxkern
MAINLIB     = $(MAINLIBNAME)$(LIB)
MAINDLL     = $(MAINLIBNAME)$(DLL)

###########################################
# Progs
###########################################

CC      = $(STDDIR)bin\Bcc32
LD      = $(STDDIR)bin\ilink32

IMPLIB  = $(STDDIR)bin\Implib
RCC     = $(STDDIR)bin\Brcc32

CP      = copy
RM      = $(ROOT)src\rm.bat

###########################################
# these macros cause maximum optimization
#  and no symbols
#
###########################################

!if "$(DEBUG)" == "0"
DEBUGDEFINES = NDEBUG
DEBUGLDPATH  = $(STDDIR)lib\Release\\
DEBUGLDFLAGS = -x -Gn -w
!if "$(FULLSPEED)" == "1"
DEBUGCCFLAGS = -b- -c -ff -k- -O2 -Oi -OS -Ov -Oc -v- -vi -w-aus -Q -xf -Tkh30000 -a4 -5
!else
DEBUGCCFLAGS = -c -k- -O2 -vi -w -Tkh30000 -a4 -5
!endif

!else

# these macros enable debugging
DEBUGDEFINES = _DEBUG
DEBUGLDPATH  = $(STDDIR)lib\Debug\\
DEBUGLDFLAGS = -s -v -Gn -w

!if "$(CODEGUARD)" == "1"
DEBUGCCFLAGS = -vGc -vGt -vGd -c -r- -k -y -Od -v -vi- -w -Q -Tkh30000 -a4 -5
!else
DEBUGCCFLAGS = -c -r- -k -y -Od -v -vi- -w -Q -Tkh30000 -a4 -5
!endif

!endif

DEFINES = NO_STRICT;_NO_VCL;_RTLDLL;WIN32;__WIN32__;$(DEBUGDEFINES);$(TCLTKDEFINES)

PROJECTCCFLAGS= $(DEBUGCCFLAGS) 

########################################## 
# some INCLUDES
##########################################

!if "$(TCLTKSOURCE)" == "1"
TCLTK_INCLUDES  = -I$(TCLDIR)generic -I$(TKDIR)generic -I$(TKDIR)win -I$(TKDIR)xlib
!else
TCLTK_INCLUDES  = -I$(TCLDIR)include -I$(TKDIR)include
!endif

TIX_INCLUDES    = -I$(TIXDIR)generic

STD_INCLUDES    = -I$(INCDIR) -I$(SOFTINCDIR) -I$(STDDIR)include -I$(GSLDIR)

########################################## 
# the LIBDIRS
##########################################

!if "$(TCLTKSOURCE)" == "1"
!if "$(DEBUG)" == "1"
LIBDIRS  = -L.;$(TIXDIR)win\Debug;$(TCLDIR)win\Debug;$(TKDIR)win\Debug;$(GLDIR);$(SOFTLIBDIR);$(DEBUGLDPATH);$(STDDIR)lib;$(LIBDIR)
!else
LIBDIRS  = -L.;$(TIXDIR)win\Release;$(TCLDIR)win\Release;$(TKDIR)win\Release;$(GLDIR);$(SOFTLIBDIR);$(DEBUGLDPATH);$(STDDIR)lib;$(LIBDIR)
!endif
!else
LIBDIRS  = -L.;$(TIXDIR)win\Release;$(TCLDIR)lib;$(TKDIR)lib;$(GLDIR);$(SOFTLIBDIR);$(DEBUGLDPATH);$(STDDIR)lib;$(LIBDIR)
!endif

########################################## 
# compiler and linker flags
##########################################

CONLNFLAGS_exe = -Tpe -ap     $(LIBDIRS) $(DEBUGLDFLAGS) c0x32.obj
LNFLAGS_exe    = -Tpe -aa     $(LIBDIRS) $(DEBUGLDFLAGS) c0w32.obj
LNFLAGS_dll    = -Tpd -aa -Gi $(LIBDIRS) $(DEBUGLDFLAGS) c0d32.obj

!if "$(CODEGUARD)" == "1"
STD_LNLIBS_dll = cg32 import32 cw32mti
STD_LNLIBS_exe = cg32 import32 cw32mti
!else 
STD_LNLIBS_dll = import32 cw32mti
STD_LNLIBS_exe = import32 cw32mti
!endif

########################################## 
# Global makefile settings an objects
##########################################

.AUTODEPEND
#.CACHEAUTODEPEND

.SUFFIXES: $(H) $(C) $(CPP) $(O) $(LIB) $(DLL) $(E)

#vpath % $(GSLDIR) $(GTSDIR)

###########################################
# Implicit Targets
###########################################

$(C)$(O):
	$(CC) {$< }

$(CPP)$(O):
	$(CC) {$< }

$(DLL)$(LIB):
	$(IMPLIB) -c $@ $<

$(RC)$(RES):
	$(RCC) -i.;..;.\rc -fo$@ $<
