summaryrefslogtreecommitdiffstats
path: root/win/makefile.vc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-08-28 11:43:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-08-28 11:43:26 (GMT)
commit43fa4c24905499a1f9e52986e3bcc75e2ede53fb (patch)
treecab65fe5ee9859a688eb430e8b89105f8a561e50 /win/makefile.vc
parent1fd576b1cecb84450f2ae58edd48d66fe871c773 (diff)
downloadtk-43fa4c24905499a1f9e52986e3bcc75e2ede53fb.zip
tk-43fa4c24905499a1f9e52986e3bcc75e2ede53fb.tar.gz
tk-43fa4c24905499a1f9e52986e3bcc75e2ede53fb.tar.bz2
Completing [http://core.tcl.tk/tcl/info/00189c4afcb9e2586301d711f71383e48817a72d|00189c4afc]: Allow semi-static UCRT build on Windows with VC 14.0. Now for the configure/makefile build.
Diffstat (limited to 'win/makefile.vc')
-rw-r--r--win/makefile.vc25
1 files changed, 7 insertions, 18 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index dff7294..d2795c9 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -42,7 +42,7 @@ the build instructions.
# turn on the 64-bit compiler, if your SDK has it.
#
# 3) Targets are:
-# release -- Builds the core, the shell. (default)
+# release -- Builds the core, the shell and the dlls. (default)
# dlls -- Just builds the windows extensions.
# shell -- Just builds the shell and the core.
# core -- Only builds the core [tkXX.(dll|lib)].
@@ -76,7 +76,7 @@ the build instructions.
# Sets where to install Tcl from the built binaries.
# C:\Progra~1\Tcl is assumed when not specified.
#
-# OPTS=loimpact,msvcrt,nothreads,noxp,pdbs,profile,square,static,staticpkg,symbols,unchecked,ucrt,none
+# OPTS=loimpact,msvcrt,nothreads,noxp,pdbs,profile,square,static,staticpkg,symbols,unchecked,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.
@@ -105,11 +105,6 @@ the build instructions.
# unchecked = Allows a symbols build to not use the debug
# enabled runtime (msvcrt.dll not msvcrtd.dll
# or libcmt.lib not libcmtd.lib).
-# ucrt= Uses ucrt.lib and libvcruntime.lib, which
-# ensures Tcl will run on machines with only the subset
-# of the C runtime that is part of the operating system.
-# If omitted, builds with VC 14.0 or later will require
-# the full C runtime redistributable.
#
# STATS=compdbg,memdbg,none
# Sets optional memory and bytecode compiler debugging code added
@@ -448,7 +443,7 @@ cdebug = $(OPTIMIZATIONS)
cdebug =
!endif
!if $(SYMBOLS)
-cdebug = $(cdebug) -Zi
+cdebug = $(cdebug) -Zi
!endif
!else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
### Warnings are too many, can't support warnings into errors.
@@ -461,13 +456,7 @@ cdebug = -Zi -WX $(DEBUGFLAGS)
cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
-!if $(UCRT)
-!if $(DEBUG) && !$(UNCHECKED)
-crt = -MDd
-!else
-crt = -MT
-!endif
-!elseif $(MSVCRT)
+!if $(MSVCRT)
!if $(DEBUG) && !$(UNCHECKED)
crt = -MDd
!else
@@ -487,6 +476,7 @@ CON_CFLAGS = $(cdebug) $(cflags) $(crt) -DCONSOLE
WISH_CFLAGS = $(BASE_CFLAGS) $(TK_DEFINES)
STUB_CFLAGS = $(cflags) $(cdebug) $(TK_DEFINES)
+
#---------------------------------------------------------------------
# Link flags
#---------------------------------------------------------------------
@@ -507,7 +497,7 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
lflags = $(lflags) -profile
!endif
-!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED))
+!if $(MSVCRT) && !($(DEBUG) && !$(UNCHECKED)) && $(VCVERSION) >= 1900
lflags = $(lflags) -nodefaultlib:libucrt.lib
!endif
@@ -535,8 +525,7 @@ baselibs = kernel32.lib user32.lib
baselibs = $(baselibs) bufferoverflowU.lib
!endif
!endif
-
-!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED))
+!if $(MSVCRT) && !($(DEBUG) && !$(UNCHECKED)) && $(VCVERSION) >= 1900
baselibs = $(baselibs) ucrt.lib
!endif