# $Filename: C:\Software\Sfx3D\Makebd.def $
# $Revision: 1.7 $
# $Date: Freitag, 15. Dezember 2000 15:04:44 $
# $Author: schneider $
# $Log3: C:\Software\Sfx3D\qvcs\Makebd.efg $
# 
#   Makefiles
# 
# Revision 1.7  by: schneider  Rev date: Fri Dec 15 15:04:44 2000
#   Texture - Verzeichnis nach Sfx3D
# 
# Revision 1.6  by: schneider  Rev date: Fri Dec 01 15:01:18 2000
#   Bst-Programme auf Quelle, Senke usw.
# 
# Revision 1.5  by: schneider  Rev date: Tue Aug 08 16:02:34 2000
#   Kettenfoerderer im Beta-Stadium
# 
# $Endlog$

##########################################
# 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-Install-Dir
#
##########################################
#Softwar-Umgebungswariable
SU = d:\rei\Ssy2_cd2002

TMPDIR  = .\\


ROOT    = $(SU)\Ssy2\\

SOFTSHOPDIR = $(SU)\SoftShop\\

STDDIR  = $(MAKEDIR)\..\\

GLDIR   = $(SU)\ogl32\\

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

DEBUG     = 0

!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    = 83
TCLDOTVERSION = 8.3.2
TIXVERSION    = 81
TIXDOTVERSION = 8.1.0

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

!if "$(TCLTKSOURCE)" == "1"
TCLDIR  = $(SU)\tcltk\TCL$(TCLDOTVERSION)\\
TKDIR   = $(SU)\tcltk\TK$(TCLDOTVERSION)\\
TIXDIR  = $(SU)\tcltk\Tix-$(TIXDOTVERSION)\\
!else
TCLDIR  = C:\Programme\TCL\\
TKDIR   = $(TCLDIR)
!endif

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

TKLIB  = tk$(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

###########################################
#  Sfx Directories 
###########################################

SRCDIR        = $(ROOT)sfx07_vw\\
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      = del

###########################################
# 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 -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)

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$(GLDIR)include -I$(INCDIR) -I$(SOFTINCDIR) -I$(STDDIR)include

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

!if "$(TCLTKSOURCE)" == "1"
!if "$(DEBUG)" == "1"
LIBDIRS  = -L.;$(TIXDIR)win\Debug;$(TCLDIR)win\Debug;$(TKDIR)win\Debug;$(GLDIR)bclib;$(SOFTLIBDIR);$(DEBUGLDPATH);$(STDDIR)lib;$(LIBDIR)
!else
LIBDIRS  = -L.;$(TIXDIR)win\Release;$(TCLDIR)win\Release;$(TKDIR)win\Release;$(GLDIR)bclib;$(SOFTLIBDIR);$(DEBUGLDPATH);$(STDDIR)lib;$(LIBDIR)
!endif
!else
LIBDIRS  = -L.;$(TIXDIR)win;$(TCLDIR)lib;$(TKDIR)lib;$(GLDIR)bclib;$(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 % $(SRCDIR) $(GTSDIR)

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

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

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

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

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