Diff
Not logged in

Differences From Artifact [39e926e9ee]:

To Artifact [ff68500bf9]:


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
# Copyright (c) 2001 ActiveState Corporation.
# Copyright (c) 2001 Tomasoft Engineering.
#
#------------------------------------------------------------------------------
# RCS: @(#) $Id: makefile.vc,v 1.80 2002/02/20 12:33:32 davygrvy Exp $
#------------------------------------------------------------------------------

!if "$(MSVCDIR)" == ""
MSG = ^
You'll need to run vcvars32.bat from Developer Studio, first, to setup^
the environment.  Jump to this line to read the new instructions.
!error $(MSG)







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
# Copyright (c) 2001 ActiveState Corporation.
# Copyright (c) 2001 Tomasoft Engineering.
#
#------------------------------------------------------------------------------
# RCS: @(#) $Id: makefile.vc,v 1.81 2002/02/20 19:06:53 davygrvy Exp $
#------------------------------------------------------------------------------

!if "$(MSVCDIR)" == ""
MSG = ^
You'll need to run vcvars32.bat from Developer Studio, first, to setup^
the environment.  Jump to this line to read the new instructions.
!error $(MSG)
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
	$(TMP_DIR)\tclWinTime.obj \
!if !$(STATIC_BUILD)
	$(TMP_DIR)\tcl.res
!endif

TCLSTUBOBJS = $(TMP_DIR)\tclStubLib.obj

WINDIR		= $(ROOT)\win
GENERICDIR	= $(ROOT)\generic
TOOLSDIR	= $(ROOT)\tools


TCL_INCLUDES	= -I"$(WINDIR)" -I"$(GENERICDIR)"
TCL_DEFINES	= $(OPTDEFINES)


#---------------------------------------------------------------------
# Compile flags
#---------------------------------------------------------------------

!if !$(DEBUG)

# This cranks the optimization level to maximize speed


cdebug = -O2 -Gs

!else if "$(MACHINE)" == "IA64"

cdebug = -Od -Zi
!else
cdebug = -Z7 -Od -WX
!endif

# declarations common to all compiler options
cflags = -nologo -c -W3 -YX -QI0f -QIfdiv -Fp$(TMP_DIR)^\









!if $(MSVCRT)
crt = -MD$(DBGX)
!else
crt = -MT$(DBGX)
!endif

BASE_CLFAGS	= $(cdebug) $(cflags) $(crt) $(TCL_INCLUDES)
TCL_CFLAGS	= $(BASE_CLFAGS) $(TCL_DEFINES)
CON_CFLAGS	= $(cdebug) $(cflags) $(crt) -DCONSOLE


#---------------------------------------------------------------------
# Link flags
#---------------------------------------------------------------------

!if $(DEBUG)
ldebug	= -debug:full -debugtype:cv
!else
ldebug	= -release
!endif

# declarations common to all linker options
lflags	= -nologo -machine:$(MACHINE)

!if $(PROFILE)
lflags	= $(lflags) -profile
!endif









dlllflags = $(lflags) -dll
conlflags = $(lflags) -subsystem:console
guilflags = $(lflags) -subsystem:windows

baselibs   = kernel32.lib advapi32.lib user32.lib
winlibs	   = $(baselibs) gdi32.lib







|


>










>

>
>
|
>

>
|

|



|
>
>
>
>
>
>
>
>







|

|









|



|




>
>
>
>
>
>
>
>







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
	$(TMP_DIR)\tclWinTime.obj \
!if !$(STATIC_BUILD)
	$(TMP_DIR)\tcl.res
!endif

TCLSTUBOBJS = $(TMP_DIR)\tclStubLib.obj

COMPATDIR	= $(ROOT)\compat
GENERICDIR	= $(ROOT)\generic
TOOLSDIR	= $(ROOT)\tools
WINDIR		= $(ROOT)\win

TCL_INCLUDES	= -I"$(WINDIR)" -I"$(GENERICDIR)"
TCL_DEFINES	= $(OPTDEFINES)


#---------------------------------------------------------------------
# Compile flags
#---------------------------------------------------------------------

!if !$(DEBUG)
!if $(OPTIMIZING)
# This cranks the optimization level to maximize speed
cdebug	= -O2 -Op -Gs
!else
cdebug	=
!endif
!else if "$(MACHINE)" == "IA64"
# Warnings are too many to support warnings into errors.
cdebug	= -Z7 -Od
!else
cdebug	= -Z7 -WX -Od
!endif

# declarations common to all compiler options
cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\

!if $(PENT_0F_ERRATA)
cflags = $(cflags) -QI0f
!endif

!if $(ITAN_B_ERRATA)
cflags = $(cflags) -QIA64_Bx
!endif

!if $(MSVCRT)
crt = -MD$(DBGX)
!else
crt = -MT$(DBGX)
!endif

BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES)
TCL_CFLAGS	= $(BASE_CLFAGS) $(TCL_DEFINES)
CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE


#---------------------------------------------------------------------
# Link flags
#---------------------------------------------------------------------

!if $(DEBUG)
ldebug	= -debug:full -debugtype:cv
!else
ldebug	= -release -opt:ref -opt:icf,3
!endif

# declarations common to all linker options
lflags	= -nologo -machine:$(MACHINE) $(ldebug)

!if $(PROFILE)
lflags	= $(lflags) -profile
!endif

!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
# align sections for PE size savings.
lflags	= $(lflags) -opt:nowin98
!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
# align sections for speed in loading by choosing the page size.
lflags	= $(lflags) -align:4096
!endif

dlllflags = $(lflags) -dll
conlflags = $(lflags) -subsystem:console
guilflags = $(lflags) -subsystem:windows

baselibs   = kernel32.lib advapi32.lib user32.lib
winlibs	   = $(baselibs) gdi32.lib
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
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459

$(TCLLIB): $(TCLOBJS)
!if $(STATIC_BUILD)
	$(lib32) -nologo -out:$@ @<<
$**
<<
!else
	$(link32) $(ldebug) $(dlllflags) -out:$@ $(winlibs) @<<
$**
<<
	-@del $*.exp
!endif


$(TCLSTUBLIB): $(TCLSTUBOBJS)
	$(lib32) -nologo -out:$@ $(TCLSTUBOBJS)

$(TCLSH): $(TCLSHOBJS) $(TCLIMPLIB)
	$(link32) $(ldebug) $(conlflags) -stack:2300000 -out:$@ $(baselibs) @<<
$**
<<


$(TCLTEST): $(TCLTESTOBJS) $(TCLIMPLIB)
	$(link32) $(ldebug) $(conlflags) -stack:2300000 -out:$@ $(baselibs) @<<
$**
<<


$(TCLPIPEDLL): $(WINDIR)\stub16.c
	$(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $(WINDIR)\stub16.c
	$(link32) $(ldebug) $(conlflags) -out:$@ $(TMP_DIR)\stub16.obj \
		$(baselibs)


!if $(STATIC_BUILD)
$(TCLDDEDLL): $(TMP_DIR)\tclWinDde.obj
	$(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj
!else
$(TCLDDEDLL): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB)
	$(link32) $(ldebug) $(dlllflags) -out:$@ $** $(baselibs)
	-@del $*.exp
	-@del $*.lib
!endif


!if $(STATIC_BUILD)
$(TCLREGDLL): $(TMP_DIR)\tclWinReg.obj
	$(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj
!else
$(TCLREGDLL): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB)
	$(link32) $(ldebug) $(dlllflags) -out:$@ $** $(baselibs)
	-@del $*.exp
	-@del $*.lib
!endif


$(CAT32): $(WINDIR)\cat.c
	$(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $?







|










|





|






|








|










|







423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481

$(TCLLIB): $(TCLOBJS)
!if $(STATIC_BUILD)
	$(lib32) -nologo -out:$@ @<<
$**
<<
!else
	$(link32) $(dlllflags) -out:$@ $(winlibs) @<<
$**
<<
	-@del $*.exp
!endif


$(TCLSTUBLIB): $(TCLSTUBOBJS)
	$(lib32) -nologo -out:$@ $(TCLSTUBOBJS)

$(TCLSH): $(TCLSHOBJS) $(TCLIMPLIB)
	$(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) @<<
$**
<<


$(TCLTEST): $(TCLTESTOBJS) $(TCLIMPLIB)
	$(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) @<<
$**
<<


$(TCLPIPEDLL): $(WINDIR)\stub16.c
	$(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $(WINDIR)\stub16.c
	$(link32) $(conlflags) -out:$@ $(TMP_DIR)\stub16.obj \
		$(baselibs)


!if $(STATIC_BUILD)
$(TCLDDEDLL): $(TMP_DIR)\tclWinDde.obj
	$(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj
!else
$(TCLDDEDLL): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB)
	$(link32) $(dlllflags) -out:$@ $** $(baselibs)
	-@del $*.exp
	-@del $*.lib
!endif


!if $(STATIC_BUILD)
$(TCLREGDLL): $(TMP_DIR)\tclWinReg.obj
	$(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj
!else
$(TCLREGDLL): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB)
	$(link32) $(dlllflags) -out:$@ $** $(baselibs)
	-@del $*.exp
	-@del $*.lib
!endif


$(CAT32): $(WINDIR)\cat.c
	$(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $?
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
	cd $(MAKEDIR)


#---------------------------------------------------------------------
# Special case object file targets
#---------------------------------------------------------------------

$(TMP_DIR)\tclWinInit.obj: $(WINDIR)\tclWinInit.c
	$(cc32) -DBUILD_tcl $(TCL_CFLAGS) $(EXTFLAGS) -Fo$(TMP_DIR)\ $?

$(TMP_DIR)\testMain.obj: $(WINDIR)\tclAppInit.c
!if $(TCL_LINKWITHEXTENSIONS)
	$(cc32) $(TCL_CFLAGS) -DTCL_TEST -DTCL_LINKWITHEXTENSIONS -Fo$@ $?
!else
	$(cc32) $(TCL_CFLAGS) -DTCL_TEST -Fo$@ $?
!endif








<
<
<







591
592
593
594
595
596
597



598
599
600
601
602
603
604
	cd $(MAKEDIR)


#---------------------------------------------------------------------
# Special case object file targets
#---------------------------------------------------------------------




$(TMP_DIR)\testMain.obj: $(WINDIR)\tclAppInit.c
!if $(TCL_LINKWITHEXTENSIONS)
	$(cc32) $(TCL_CFLAGS) -DTCL_TEST -DTCL_LINKWITHEXTENSIONS -Fo$@ $?
!else
	$(cc32) $(TCL_CFLAGS) -DTCL_TEST -Fo$@ $?
!endif

649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673


#---------------------------------------------------------------------
# Implicit rules
#---------------------------------------------------------------------

{$(WINDIR)}.c{$(TMP_DIR)}.obj::
    $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
$<
<<

{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
    $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
$<
<<

{$(ROOT)\compat}.c{$(TMP_DIR)}.obj::
    $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
$<
<<

{$(WINDIR)}.rc{$(TMP_DIR)}.res:
	$(rc32) -fo $@ -r -i $(GENERICDIR) -D__WIN32__ \
!if $(DEBUG)
	-d DEBUG \







|




|



|
|







668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692


#---------------------------------------------------------------------
# Implicit rules
#---------------------------------------------------------------------

{$(WINDIR)}.c{$(TMP_DIR)}.obj::
    $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
$<
<<

{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
    $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
$<
<<

{$(COMPATDIR)}.c{$(TMP_DIR)}.obj::
    $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
$<
<<

{$(WINDIR)}.rc{$(TMP_DIR)}.res:
	$(rc32) -fo $@ -r -i $(GENERICDIR) -D__WIN32__ \
!if $(DEBUG)
	-d DEBUG \