Tcl UDP

Check-in [9ce8fa7778]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Purged old comments
Timelines: family | ancestors | descendants | both | vc-reform
Files: files | file ages | folders
SHA1:9ce8fa777812ab0b3fb221876a328bb409f626b4
User & Date: apnadkarni 2017-10-26 15:13:51
Context
2017-12-14
11:34
Latest version of nmake reform from Tcl Closed-Leaf check-in: 41602b0e71 user: apnadkarni tags: vc-reform
2017-10-26
15:13
Purged old comments check-in: 9ce8fa7778 user: apnadkarni tags: vc-reform
2017-10-16
13:17
Updated to latest Tcl rules check-in: b01a44a88a user: apnadkarni tags: vc-reform
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/makefile.vc.

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
# makefile.vc --                                               -*- Makefile -*-
#
# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
#
# This makefile is based upon the Tcl 8.4 Makefile.vc and modified to 
# make it suitable as a general package makefile. Look for the word EDIT
# which marks sections that may need modification. As a minumum you will
# need to change the PROJECT, DOTVERSION and DLLOBJS variables to values
# relevant to your package.
#




# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
# Copyright (c) 2001 ActiveState Corporation.
# Copyright (c) 2001-2002 David Gravereaux.
# Copyright (c) 2003-2006 Pat Thoyts
#
#-------------------------------------------------------------------------
# RCS: @(#)$Id$
#-------------------------------------------------------------------------

# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
# or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define
# VCINSTALLDIR instead. The MSVC Toolkit release defines yet another.
!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(MSSDK) && !defined(VCINSTALLDIR) && !defined(VCToolkitInstallDir)
MSG = ^
You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
Platform SDK first to setup the environment.  Jump to this line to read^
the build instructions.
!error $(MSG)
!endif

#------------------------------------------------------------------------------
# HOW TO USE this makefile:
#
# 1)  It is now necessary to have %MSVCDir% set in the environment.  This is
#     used  as a check to see if vcvars32.bat had been run prior to running
#     nmake or during the installation of Microsoft Visual C++, MSVCDir had
#     been set globally and the PATH adjusted.  Either way is valid.
#
#     You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
#     directory to setup the proper environment, if needed, for your current
#     setup.  This is a needed bootstrap requirement and allows the swapping of
#     different environments to be easier.
#
# 2)  To use the Platform SDK (not expressly needed), run setenv.bat after
#     vcvars32.bat according to the instructions for it.  This can also turn on
#     the 64-bit compiler, if your SDK has it.
#
# 3)  Targets are:
#	all       -- Builds everything.
#       <project> -- Builds the project (eg: nmake sample)
#	test      -- Builds and runs the test suite.
#	install   -- Installs the built binaries and libraries to $(INSTALLDIR)
#		     in an appropriate subdirectory.
#	clean/realclean/distclean -- varying levels of cleaning.
#
# 4)  Macros usable on the commandline:
#	INSTALLDIR=<path>
#		Sets where to install Tcl from the built binaries.
#		C:\Progra~1\Tcl is assumed when not specified.
#
#	OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none
#		Sets special options for the core.  The default is for none.
#		Any combination of the above may be used (comma separated).
#		'none' will over-ride everything to nothing.
#
#		static  =  Builds a static library of the core instead of a
#			   dll.  The shell will be static (and large), as well.
#		msvcrt  =  Effects the static option only to switch it from
#			   using libcmt(d) as the C runtime [by default] to
#			   msvcrt(d). This is useful for static embedding
#			   support.
#		staticpkg = Effects the static option only to switch
#			   tclshXX.exe to have the dde and reg extension linked
#			   inside it.
#		nothreads = Turns off multithreading support (not recommended)
#		thrdalloc = Use the thread allocator (shared global free pool).
#		symbols =  Adds symbols for step debugging.
#		profile =  Adds profiling hooks.  Map file is assumed.
#		loimpact =  Adds a flag for how NT treats the heap to keep memory
#			   in use, low.  This is said to impact alloc performance.
#
#	STATS=memdbg,compdbg,none
#		Sets optional memory and bytecode compiler debugging code added
#		to the core.  The default is for none.  Any combination of the
#		above may be used (comma separated).  'none' will over-ride
#		everything to nothing.
#
#		memdbg   = Enables the debugging memory allocator.
#		compdbg  = Enables byte compilation logging.
#
#	MACHINE=(IX86|IA64|ALPHA|AMD64)
#		Set the machine type used for the compiler, linker, and
#		resource compiler.  This hook is needed to tell the tools
#		when alternate platforms are requested.  IX86 is the default
#		when not specified. If the CPU environment variable has been
#		set (ie: recent Platform SDK) then MACHINE is set from CPU.
#
#	TMP_DIR=<path>
#	OUT_DIR=<path>
#		Hooks to allow the intermediate and output directories to be
#		changed.  $(OUT_DIR) is assumed to be 
#		$(BINROOT)\(Release|Debug) based on if symbols are requested.
#		$(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
#
#	TESTPAT=<file>
#		Reads the tests requested to be run from this file.
#
#	CFG_ENCODING=encoding
#		name of encoding for configuration information. Defaults
#		to cp1252
#
# 5)  Examples:
#
#	Basic syntax of calling nmake looks like this:
#	nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
#
#                        Standard (no frills)
#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
#       Setting environment for using Microsoft Visual C++ tools.
#       c:\tcl_src\win\>nmake -f makefile.vc all
#       c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
#
#                         Building for Win64
#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
#       Setting environment for using Microsoft Visual C++ tools.
#       c:\tcl_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
#       Targeting Windows pre64 RETAIL
#       c:\tcl_src\win\>nmake -f makefile.vc MACHINE=IA64
#
#------------------------------------------------------------------------------
#==============================================================================
###############################################################################
#------------------------------------------------------------------------------

!if !exist("makefile.vc")
MSG = ^
You must run this makefile only from the directory it is in.^
Please `cd` to its location first.
!error $(MSG)
!endif

PROJECT = udp
!include "rules-ext.vc"

PRJ_OBJS = $(TMP_DIR)\udp_tcl.obj




PRJ_DOCS = $(OUT_DIR)\udp.html

#-------------------------------------------------------------------------
# Target names and paths ( shouldn't need changing )
#-------------------------------------------------------------------------


PRJ_DEFINES     = -D_CRT_SECURE_NO_WARNINGS \
		  -D_WINSOCK_DEPRECATED_NO_WARNINGS
PRJ_LIBS	= ws2_32.lib

# Define the standard targets
!include "$(_RULESDIR)\targets.vc"

#---------------------------------------------------------------------
# Project specific targets (EDIT)
#---------------------------------------------------------------------

doc:        setup $(PRJ_DOCS)
install:    install-docs install-demos
pkgindex:   default-pkgindex

test: setup $(PROJECT)
        $(TCLSH) <<
load $(PRJLIB:\=/)
cd {$(ROOT)/tests}
set argv "$(TESTFLAGS)"
source all.tcl
<<

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

DOC2HTML = $(TCLSH) "$(TOOLSDIR)\mpexpand.tcl" html

{$(DOCDIR)}.man{$(OUT_DIR)}.html:
	$(DOC2HTML) $< $@
        @$(TCLSH) <<
set name $(@:\=/)
set f [open $$name r]; set d [read $$f]; close $$f
set d [regsub {</head>} $$d {<link rel="stylesheet" href="manpage.css" type="text/css"></head>}]
set f [open $$name w]; puts -nonewline $$f $$d; close $$f
<<

.SUFFIXES: .man



install-docs: $(PRJ_DOCS)
	@echo Installing documentation to '$(DOC_INSTALL_DIR)'
	@if not exist $(DOC_INSTALL_DIR)\NUL mkdir "$(DOC_INSTALL_DIR)"
	@$(CPY) "$(DOCDIR)\manpage.css" "$(DOC_INSTALL_DIR)\" >NUL
	@for %i in ($(PRJ_DOCS)) do @$(CPY) %i "$(DOC_INSTALL_DIR)\" > NUL

install-demos:
	@echo Installing demos to '$(DEMO_INSTALL_DIR)'
	@if not exist $(DEMO_INSTALL_DIR)\nul mkdir "$(DEMO_INSTALL_DIR)"
	@$(CPY) $(DEMODIR)\*.tcl "$(DEMO_INSTALL_DIR)" >NUL

|

|

|
|
|
|
<

>
>
>
>


|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>
>
>



<
<
<
<
<
<
<
<




<
|
<

<
|


<
<
<
<
<
<
<
<
<
|
<
<

<











>
>
|





<
<
<
<

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
#------------------------------------------------------------- -*- makefile -*-
#
# Makefile for tcludp
#
# Basic build, test and install
#   nmake /f makefile.vc INSTALLDIR=c:\tcl
#   nmake /f makefile.vc INSTALLDIR=c:\tcl test
#   nmake /f makefile.vc INSTALLDIR=c:\tcl install

#
# For other build options (debug, static etc.),
# See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for
# detailed documentation.
# 
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#





















#------------------------------------------------------------------------------














































































































PROJECT = udp
!include "rules-ext.vc"

PRJ_OBJS = $(TMP_DIR)\udp_tcl.obj
PRJ_DEFINES     = -D_CRT_SECURE_NO_WARNINGS \
		  -D_WINSOCK_DEPRECATED_NO_WARNINGS
PRJ_LIBS	= ws2_32.lib

PRJ_DOCS = $(OUT_DIR)\udp.html










# Define the standard targets
!include "$(_RULESDIR)\targets.vc"


# Project specific targets



install:    install-docs default-install-demos
pkgindex:   default-pkgindex










# Implicit rule to generate html from man files


DOC2HTML = $(TCLSH) "$(TOOLSDIR)\mpexpand.tcl" html

{$(DOCDIR)}.man{$(OUT_DIR)}.html:
	$(DOC2HTML) $< $@
        @$(TCLSH) <<
set name $(@:\=/)
set f [open $$name r]; set d [read $$f]; close $$f
set d [regsub {</head>} $$d {<link rel="stylesheet" href="manpage.css" type="text/css"></head>}]
set f [open $$name w]; puts -nonewline $$f $$d; close $$f
<<

.SUFFIXES: .man

# Cannot use default-install-docs because we generate docs on the fly
doc:        setup $(PRJ_DOCS)
install-docs: doc
	@echo Installing documentation to '$(DOC_INSTALL_DIR)'
	@if not exist $(DOC_INSTALL_DIR)\NUL mkdir "$(DOC_INSTALL_DIR)"
	@$(CPY) "$(DOCDIR)\manpage.css" "$(DOC_INSTALL_DIR)\" >NUL
	@for %i in ($(PRJ_DOCS)) do @$(CPY) %i "$(DOC_INSTALL_DIR)\" > NUL