1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
|
# -*- mode: makefile; fill-column: 75; tab-width: 8; coding: iso-latin-1-dos -*-
# $Id: makefile.vc,v 1.22 2008/03/17 23:16:01 hobbs Exp $
#
#----------------------------------------------------------------------
# makefile.vc --
#
# Visual C++ 6.0 makefile for Tix.
#
# This makefile builds the Tix DLL and EXE files. You can also
# use this makefile to install Tix in your local machine (see
# common.mak) for details.
#
# This makefile requires Tcl/Tk versions 8.2 or later.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#----------------------------------------------------------------------
#
# XXX makefile.vc no longer maintained - it *may* work ... or not
# XXX use the toplevel configure/make with msys or cygwin on Windows
#
######################################################################
# Customization section:
#
# Normally you shouldn't modify this file directory to customize
# the make procedure. See README.txt in this directory for a better
# way.
#
######################################################################
# Where the Tcl and Tk. They must be in the same directory
!IFNDEF SRC_ROOT
SRC_ROOT = ..\..
!ENDIF
# Set the TCL version. The TK version are assumed to be equal. The default
# is 8.3.3.
!IFNDEF TCL_MAJOR
TCL_MAJOR = 8
!ENDIF
!IFNDEF TCL_MINOR
TCL_MINOR = 4
!ENDIF
!IFNDEF TCL_PATCH
TCL_PATCH = 7
!ENDIF
TK_MAJOR = $(TCL_MAJOR)
TK_MINOR = $(TCL_MINOR)
TK_PATCH = $(TCL_PATCH)
# Uncomment the following if you had compiled Tcl with debugging symbols
!IFNDEF TCL_DBGX
#TCL_DBGX = d
!ENDIF
# Uncomment the following if you had compiled Tk with debugging symbols
!IFNDEF TK_DBGX
#TK_DBGX = d
!ENDIF
# TOOLS32 = location of VC++ 32-bit development tools.
# TOOLS32_rc = location of VC++ rc program
!IFNDEF TOOLS32
#
# Visual C++ 6.0
#
TOOLS32 = c:\Program Files\Microsoft Visual Studio\VC98
TOOLS32_rc = c:\Program Files\Microsoft Visual Studio\Common\MSDev98
!ENDIF
# Set this to the appropriate value of /MACHINE: for your platform
!IFNDEF MACHINE
MACHINE = IX86
!ENDIF
# Comment this out if you don't want to compile with stubs
!IFNDEF USESTUBS
USESTUBS = 1
!ENDIF
# Comment this out if you want to compile with debugging symbols
!IFNDEF NODEBUG
NODEBUG = 1
!ENDIF
# Where to install Tix. By default it installs at the default Tcl
# installation directory C:\Tcl
!IFNDEF INSTALLDIR
INSTALLDIR = C:\Tcl
!ENDIF
######################################################################
# Do not modify below this line
######################################################################
default: all
######################################################################
# Development tool specific definitions
######################################################################
#
# Build tools
#
cc32 = "$(TOOLS32)\bin\cl.exe"
link32 = "$(TOOLS32)\bin\link.exe"
include32 = -I"$(TOOLS32)\include"
RMDIR = rd
MKDIR = md
RM = del
#
# Link flags
#
!IF "$(NODEBUG)" == "1"
ldebug = /RELEASE
!ELSE
ldebug = -debug:full -debugtype:cv
!ENDIF
# declarations common to all linker options
lcommon = /RELEASE /NOLOGO
# declarations for use on Intel i386, i486, and Pentium systems
!IF "$(MACHINE)" == "IX86"
lflags = $(lcommon) /MACHINE:$(MACHINE)
!ELSE
lflags = $(lcommon) /MACHINE:$(MACHINE)
!ENDIF
dlllflags = $(lflags) -dll
baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib
winlibs = $(baselibs) gdi32.lib comdlg32.lib
#
# Compile flags
#
# makefile.vc in Tk claims -O2 is buggy and so uses -Ot, so we do the same)
!IF "$(NODEBUG)" == "1"
optflags = -Oti -Gs -GD
!ELSE
optflags = -Od -Zi
!ENDIF
cvarsdll = -D_X86_=1 -DWIN32 -D_WIN32 -D_MT -D_DLL
cflagsdll = $(cvarsdll) -c -W3 -nologo -Fp$(TMPDIR)\ -YX -MD \
$(optflags)
######################################################################
# Project specific definitions
######################################################################
TIX_MAJOR = 8
TIX_MINOR = 4
TIX_PATCH = 3
ROOT = ..
WINDIR = $(ROOT)\win
GENERICDIR = $(ROOT)\generic
DOTVERSION = $(TIX_MAJOR).$(TIX_MINOR).$(TIX_PATCH)
#
# Choose to build with stubs or not
#
!IF ("$(TCL_MAJOR)" == "8") && ("$(TCL_MINOR)" == "0")
#
# Tcl 8.0 does not support stubs
#
STUBS_CFLAGS =
DLLDEPENDS = $(TK_LIB) $(TCL_LIB)
!ELSE
#
# Tcl 8.1 or later support stubs
#
!IF "$(USESTUBS)" == "1"
STUBS_CFLAGS = -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1
DLLDEPENDS = $(TK_STUBLIB) $(TCL_STUBLIB)
!ELSE
STUBS_CFLAGS =
DLLDEPENDS = $(TK_LIB) $(TCL_LIB)
!ENDIF
!ENDIF
#
# Debugging options and where to output .obj and .dll files
#
!IF "$(NODEBUG)" == "1"
DBGX =
TMPDIR = Release
!ELSE
DBGX = d
TMPDIR = Debug
!ENDIF
#
# File and dir names for Tcl
#
!IF "$(TCL_DBGX)" != "d"
TCL_TMPDIR = Release
!ELSE
TCL_TMPDIR = Debug
!ENDIF
!IF "$(TCL_PATCH)" == ""
TCL_DIR = $(SRC_ROOT)\tcl$(TCL_MAJOR).$(TCL_MINOR)
TK_DIR = $(SRC_ROOT)\tk$(TCL_MAJOR).$(TCL_MINOR)
!ELSE
TCL_DIR = $(SRC_ROOT)\tcl$(TCL_MAJOR).$(TCL_MINOR).$(TCL_PATCH)
TK_DIR = $(SRC_ROOT)\tk$(TCL_MAJOR).$(TCL_MINOR)
!ENDIF
TCL_LIBDIR = $(TCL_DIR)\win\$(TCL_TMPDIR)
TCL_LIB = $(TCL_LIBDIR)\tcl$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).lib
TCL_DLL = $(TCL_LIBDIR)\tcl$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).dll
TCL_STUBLIB = $(TCL_LIBDIR)\tclstub$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).lib
TCLSH_EXE = $(TCL_LIBDIR)\tclsh$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).exe
TK_LIBDIR = $(TK_DIR)\win\$(TK_TMPDIR)
TK_LIB = $(TK_LIBDIR)\tk$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).lib
TK_DLL = $(TK_LIBDIR)\tk$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).dll
#
# File and dir names for Tk
#
!IF "$(TK_DBGX)" == "d"
TK_TMPDIR = Debug
!ELSE
TK_TMPDIR = Release
!ENDIF
!IF "$(TK_PATCH)" == ""
TK_DIR = $(SRC_ROOT)\tk$(TK_MAJOR).$(TK_MINOR)
!ELSE
TK_DIR = $(SRC_ROOT)\tk$(TK_MAJOR).$(TK_MINOR).$(TK_PATCH)
!ENDIF
TK_LIBDIR = $(TK_DIR)\win\$(TK_TMPDIR)
TK_LIB = $(TK_LIBDIR)\tk$(TK_MAJOR)$(TK_MINOR)$(TK_DBGX).lib
TK_STUBLIB = $(TK_LIBDIR)\tkstub$(TK_MAJOR)$(TK_MINOR)$(TK_DBGX).lib
#
# File and dir names for Tix
#
TIX_LIB = $(TMPDIR)\tix$(TIX_MAJOR)$(TIX_MINOR)$(DBGX).lib
TIX_DLL = $(TMPDIR)\tix$(TIX_MAJOR)$(TIX_MINOR)$(DBGX).dll
TIX_PKGIDX = $(TMPDIR)\pkgIndex.tcl.src
TIX_DEFINES = -D__WIN32__
TIX_INCLUDES = $(include32) \
-I$(ROOT)\win -I$(ROOT)\generic \
-I$(TK_DIR)\generic -I$(TK_DIR)\win -I$(TK_DIR)\xlib \
-I$(TCL_DIR)\generic -I$(TCL_DIR)\win
TIX_CFLAGS = $(cflagsdll) $(TIX_INCLUDES) $(TIX_DEFINES)
######################################################################
# Project specific targets
######################################################################
all: $(TMPDIR) $(TIX_DLL) $(TIX_PKGIDX)
$(TMPDIR):
-$(MKDIR) $@
#
# Object files
#
TIX_DLL_OBJS = \
$(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)\tixGrid.obj \
$(TMPDIR)\tixGrData.obj \
$(TMPDIR)\tixGrRC.obj \
$(TMPDIR)\tixGrFmt.obj \
$(TMPDIR)\tixGrSel.obj \
$(TMPDIR)\tixGrUtl.obj \
$(TMPDIR)\tixHLCol.obj \
$(TMPDIR)\tixHLHdr.obj \
$(TMPDIR)\tixHLInd.obj \
$(TMPDIR)\tixHList.obj \
$(TMPDIR)\tixImgCmp.obj \
$(TMPDIR)\tixImgXpm.obj \
$(TMPDIR)\tixInit.obj \
$(TMPDIR)\tixList.obj \
$(TMPDIR)\tixMethod.obj \
$(TMPDIR)\tixNBFrame.obj \
$(TMPDIR)\tixOption.obj \
$(TMPDIR)\tixSmpLs.obj \
$(TMPDIR)\tixScroll.obj \
$(TMPDIR)\tixTList.obj \
$(TMPDIR)\tixUtils.obj \
$(TMPDIR)\tixWCmpt.obj \
$(TMPDIR)\tixWidget.obj \
$(TMPDIR)\tixWinDraw.obj \
$(TMPDIR)\tixWinXpm.obj \
$(TMPDIR)\tixWinWm.obj
#
# .EXE and .DLL files
#
# (ToDo) $(TIX_DLL) doesn't have resources to define its icon, etc.
#
$(TIX_DLL): $(TIX_DLL_OBJS)
$(link32) $(ldebug) $(dlllflags) $(DLLDEPENDS) $(winlibs) \
-out:$@ @<<
$(TIX_DLL_OBJS)
<<
$(TIX_PKGIDX): make_pkgIndex.tcl makefile.vc
set TCL_LIBRARY=$(TCL_DIR)\library
$(TCLSH_EXE) make_pkgIndex.tcl $@ $(TIX_DLL) $(DOTVERSION)
#
# Implicit rules
#
{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
$(cc32) $(TIX_CFLAGS) $(STUBS_CFLAGS) -DBUILD_tix -Fo$@ $<
{$(WINDIR)}.c{$(TMPDIR)}.obj:
$(cc32) $(TIX_CFLAGS) $(STUBS_CFLAGS) -DBUILD_tix -Fo$@ $<
######################################################################
# Test:
######################################################################
oldtest:
set TCL_LIBRARY=$(TCL_DIR)\library
set TK_LIBRARY=$(TK_DIR)\library
@echo "===================================================="
@echo "running old-style tests"
@echo "===================================================="
$(TCLSH_EXE) ../tests/Driver.tcl
newtest:
set TCL_LIBRARY=$(TCL_DIR)\library
set TK_LIBRARY=$(TK_DIR)\library
@echo "===================================================="
@echo "running new-style tests"
@echo "===================================================="
set TIX_LIBRARY=$(ROOT)\library
$(TCLSH_EXE) ..\tests\all.tcl
copydlls::
copy /y $(TCL_DLL) $(TMPDIR)
copy /y $(TK_DLL) $(TMPDIR)
test: copydlls newtest
tests: copydlls newtest
rundemos:
set TCL_LIBRARY=$(TCL_DIR)\library
set TK_LIBRARY=$(TK_DIR)\library
set TIX_LIBRARY=$(ROOT)\library
$(WISH) ..\demos\widget
######################################################################
# Clean up
######################################################################
clean:
-del $(TIX_LIB)
-del $(TIX_DLL)
-del $(TIX_PKGIDX)
-del $(TMPDIR)\*.obj
-del $(TMPDIR)\*.exp
-del $(TMPDIR)\*.res
-del $(TMPDIR)\*.def
-del $(TMPDIR)\*.pch
-del $(TMPDIR)\*.pdb
-del $(TMPDIR)\*.lib
-del *.pdb
######################################################################
# Install
######################################################################
LIB_INSTALL_DIR = $(INSTALL_DIR)\lib\tix$(DOTVERSION)
INCLUDE_INSTALL_DIR = $(INSTALL_DIR)\include
install: all
-@$(MKDIR) "$(LIB_INSTALL_DIR)"
@echo installing $(TIX_DLL)
@copy "$(TIX_DLL)" "$(LIB_INSTALL_DIR)"
@echo installing $(TIX_LIB)
@copy "$(TIX_LIB)" "$(LIB_INSTALL_DIR)"
@echo installing library files
-@$(MKDIR) "$(LIB_INSTALL_DIR)"
-@$(MKDIR) "$(LIB_INSTALL_DIR)\pref"
-@$(MKDIR) "$(LIB_INSTALL_DIR)\bitmaps"
-@$(MKDIR) "$(LIB_INSTALL_DIR)\demos"
-@$(MKDIR) "$(LIB_INSTALL_DIR)\demos\bitmaps"
-@$(MKDIR) "$(LIB_INSTALL_DIR)\demos\samples"
xcopy "$(ROOT)\library" "$(LIB_INSTALL_DIR)"
copy "$(TIX_PKGIDX)" "$(LIB_INSTALL_DIR)\pkgIndex.tcl"
xcopy "$(ROOT)\library\pref" "$(LIB_INSTALL_DIR)\pref"
xcopy "$(ROOT)\library\bitmaps" "$(LIB_INSTALL_DIR)\bitmaps"
xcopy "$(ROOT)\demos" "$(LIB_INSTALL_DIR)\demos"
xcopy "$(ROOT)\demos\samples" "$(LIB_INSTALL_DIR)\demos\samples"
xcopy "$(ROOT)\demos\bitmaps" "$(LIB_INSTALL_DIR)\demos\bitmaps"
|