# nmakefile
#
# Visual C++ 6.0 makefile for Tix.
#
# Copyright (c) 1996, Expert Interface Technologies
#
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#----------------------------------------------------------------------
# Environment setting
#
# You can set the following variables in your DOS environment. This
# way you don't need to change this file. E.g.:
#
# set TCL_VER=8.0
# nmake -f nmakefile
#
# You can also set variables on the command line to nmake. E.g.:
#
# nmake TCL_VER=8.0 -f makefile.vc
#
# TOOLS32 = location of VC++ 32-bit development tools.
# TOOLS32_rc = location of VC++ rc program
# TIX_DEBUG = Compile Tix with debug information.
# TCL_VER = version of Tcl to compile with. Default is 8.0
#----------------------------------------------------------------------
!IFNDEF TOOLS32
TOOLS32 = d:\Programs\MSVC60\VC98
TOOLS32_rc = d:\Programs\MSVC60\Common\msdev98
!ENDIF
# Set this to the appropriate value of /MACHINE: for your platform
MACHINE = IX86
!IFNDEF TIX_DEBUG
NODEBUG=1
!ENDIF
!IFNDEF TCL_VER
TCL_VER=8.0
!ENDIF
# Project directories
#
# ROOT = top of source tree
# TMPDIR = location where .obj files should be stored during build
# TCLDIR = location of top of Tcl source heirarchy
#
ROOT = ..
!IF "$(TCL_VER)" == "8.0"
TMPDIR = tcl8.0
TCLDIR = d:\tcl-tk\tcl8.0.5
TKDIR = d:\tcl-tk\tk8.0.5
TCLLIB = tcl80.lib
TCLDLL = tcl80.dll
TKLIB = tk80.lib
TKDLL = tk80.dll
TIXLIB = $(TMPDIR)\tix4180.lib
TIXDLL = $(TMPDIR)\tix4180.dll
TIXWISH = $(TMPDIR)\tix4180.exe
CONSOLE_OBJ = tkConsole80.obj
!ENDIF
!IFNDEF TCLDIR
!ERROR "Unsupported Tcl version $(TCL_VER)"
!ENDIF
#----------------------------------------------------------------------
# You shouldn't normally modify anything below this line
#----------------------------------------------------------------------
!IF "$(NODEBUG)" == "1"
DBGX =
!ELSE
DBGX = d
!ENDIF
cc32 = "$(TOOLS32)\bin\cl"
rc32 = "$(TOOLS32_rc)\bin\rc"
link32 = "$(TOOLS32)\bin\link"
include32 = -I"$(TOOLS32)\include"
TIX_INCLUDES = $(include32) \
-I$(ROOT)\win -I$(ROOT)\generic \
-I$(TKDIR)\generic -I$(TKDIR)\win -I$(TKDIR)\xlib \
-I$(TCLDIR)\generic
WINDIR = $(ROOT)\win
GENERICDIR = $(ROOT)\generic
TCLLIBDIR = $(TCLDIR)\win\Release
TKLIBDIR = $(TKDIR)\win\Release
TIX_DEFINES = -D__WIN32__
TIX_CFLAGS = $(cflagsdll) \
$(TIX_INCLUDES) -Fo$@ $(TIX_DEFINES)
TEST_CFLAGS = $(cdebug) $(cflagsdll) \
$(TIX_INCLUDES) $(TIX_DEFINES) -DTK_TEST
WISHOBJS = \
$(TMPDIR)\tixWinMain.obj
TIXOBJS = \
$(TMPDIR)\$(CONSOLE_OBJ) \
$(TMPDIR)\tixClass.obj \
$(TMPDIR)\tixCmds.obj \
$(TMPDIR)\tixCompat.obj \
$(TMPDIR)\tixDiImg.obj \
$(TMPDIR)\tixDiITxt.obj \
$(TMPDIR)\tixDiStyle.obj \
$(TMPDIR)\tixDItem.obj \
$(TMPDIR)\tixDiText.obj \
$(TMPDIR)\tixDiWin.obj \
$(TMPDIR)\tixError.obj \
$(TMPDIR)\tixForm.obj \
$(TMPDIR)\tixFormMisc.obj \
$(TMPDIR)\tixGeometry.obj \
$(TMPDIR)\tixHLCol.obj \
$(TMPDIR)\tixHLHdr.obj \
$(TMPDIR)\tixHLInd.obj \
$(TMPDIR)\tixImgCmp.obj \
$(TMPDIR)\tixHlist.obj \
$(TMPDIR)\tixList.obj \
$(TMPDIR)\tixMethod.obj \
$(TMPDIR)\tixOption.obj \
$(TMPDIR)\tixSmpLs.obj \
$(TMPDIR)\tixWidget.obj \
$(TMPDIR)\tixInit.obj \
$(TMPDIR)\tixItcl.obj \
$(TMPDIR)\tixUtils.obj \
$(TMPDIR)\tixImgXpm.obj \
$(TMPDIR)\tixNBFrame.obj \
$(TMPDIR)\tixTList.obj \
$(TMPDIR)\tixGrid.obj \
$(TMPDIR)\tixGrData.obj \
$(TMPDIR)\tixGrRC.obj \
$(TMPDIR)\tixGrFmt.obj \
$(TMPDIR)\tixGrSel.obj \
$(TMPDIR)\tixGrUtl.obj \
$(TMPDIR)\tixScroll.obj \
$(TMPDIR)\tixWCmpt.obj \
$(TMPDIR)\tixWinDraw.obj \
$(TMPDIR)\tixWinXpm.obj \
$(TMPDIR)\tixWinWm.obj
######################################################################
# Link flags
######################################################################
!IF "$(NODEBUG)" == "1"
ldebug = /RELEASE
!ELSE
ldebug = -debug:full -debugtype:cv
!ENDIF
# declarations common to all linker options
lflags = /NODEFAULTLIB /RELEASE /NOLOGO /MACHINE:$(MACHINE)
# declarations for use on Intel i386, i486, and Pentium systems
!IF "$(MACHINE)" == "IX86"
DLLENTRY = @12
!ENDIF
conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
libc = libc$(DBGX).lib oldnames.lib
libcdll = msvcrt$(DBGX).lib oldnames.lib
baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib
winlibs = $(baselibs) gdi32.lib comdlg32.lib winspool.lib
guilibs = $(libc) $(winlibs)
conlibs = $(libc) $(baselibs)
guilibsdll = $(libcdll) $(winlibs)
conlibsdll = $(libcdll) $(baselibs)
######################################################################
# Compile flags
######################################################################
# declarations common to all compiler options (makefile.vc in tk
# claims -O2 is buggy and so uses -Ot, so we do the same)
#
cvarsdll = -D_X86_=1 -DWIN32 -D_WIN32 -D_MT -D_DLL
cflagsdll = $(cvarsdll) -c -W3 -nologo -Fp$(TMPDIR)\ -YX -MD \
-Oti -Gs -GD
######################################################################
# Project specific targets
######################################################################
all: $(TIXDLL) $(TIXWISH)
$(TMPDIR)\tixvc.def: $(TIXOBJS)
$(TCLLIBDIR)\dumpexts.exe -o $@ $(TIXDLL) @<<
$(TIXOBJS)
<<
# (ToDo) $(TIXDLL) doesn't have resources to define its icon, etc.
#
$(TIXDLL): $(TIXOBJS) $(TMPDIR)\tixvc.def
$(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tixvc.def \
$(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(guilibsdll) \
$(ITCL_LIBS) -out:$@ @<<
$(TIXOBJS)
<<
$(TIXWISH): $(WISHOBJS) $(TIXOBJS) $(TIXLIB) $(TMPDIR)\tixwish.res
$(link32) $(ldebug) $(guilflags) \
$(WISHOBJS) $(TMPDIR)\tixwish.res $(TIXLIB) \
$(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(guilibsdll) \
$(ITCL_LIBS) -out:$@
#
# Special case object file targets
#
$(TMPDIR)\testMain.obj: $(ROOT)\win\tixWinMain.c
$(cc32) $(TEST_CFLAGS) -Fo$@ $?
#
# Implicit rules
#
{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
$(cc32) $(TIX_CFLAGS) -DBUILD_tix $<
{$(WINDIR)}.c{$(TMPDIR)}.obj:
$(cc32) $(TIX_CFLAGS) -DBUILD_tix $<
{$(WINDIR)\rc}.rc{$(TMPDIR)}.res:
$(rc32) -fo $@ -r -i $(GENERICDIR) -i $(TKDIR)\generic \
-i $(TKDIR)\win -i $(TKDIR)\xlib -i $(TCLDIR)\generic $<
clean:
-del $(TMPDIR)\*.obj
-del $(TMPDIR)\*.exp
-del $(TMPDIR)\*.res
-del $(TMPDIR)\*.def
-del $(TMPDIR)\*.pch
-del $(TIXLIB)
-del $(TIXDLL)
-del $(TIXWISH)