summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/rules.vc33
1 files changed, 29 insertions, 4 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 2061e9b..5060805 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -24,7 +24,7 @@ _RULES_VC = 1
# For modifications that are not backward-compatible, you *must* change
# the major version.
RULES_VERSION_MAJOR = 1
-RULES_VERSION_MINOR = 5
+RULES_VERSION_MINOR = 6
# The PROJECT macro must be defined by parent makefile.
!if "$(PROJECT)" == ""
@@ -686,6 +686,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# configuration (ignored for Tcl itself)
# _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build
# (CRT library should support this)
+# TCL_UTF_MAX=4 - forces a build allowing 4-byte UTF-8 sequences internally.
# Further, LINKERFLAGS are modified based on above.
# Default values for all the above
@@ -750,7 +751,7 @@ TCL_USE_STATIC_PACKAGES = 0
TCL_THREADS = 0
USE_THREAD_ALLOC= 0
!else
-TCL_THREADS = 1
+TCL_THREADS = 1
USE_THREAD_ALLOC= 1
!endif
@@ -759,6 +760,11 @@ USE_THREAD_ALLOC= 1
_USE_64BIT_TIME_T = 1
!endif
+!if [nmakehlp -f $(OPTS) "utfmax"]
+!message *** Force allowing 4-byte UTF-8 sequences internally
+TCL_UTF_MAX = 4
+!endif
+
# Yes, it's weird that the "symbols" option controls DEBUG and
# the "pdbs" option controls SYMBOLS. That's historical.
!if [nmakehlp -f $(OPTS) "symbols"]
@@ -1291,6 +1297,17 @@ INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\..\include
# define PRJ_LIBS before including rules.rc if additional libs are needed
OPTDEFINES = /DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) /DSTDC_HEADERS
+!if $(VCVERSION) >= 1600
+OPTDEFINES = $(OPTDEFINES) /DHAVE_STDINT_H=1
+!else
+OPTDEFINES = $(OPTDEFINES) /DMP_NO_STDINT=1
+!endif
+!if $(VCVERSION) >= 1700
+OPTDEFINES = $(OPTDEFINES) /DHAVE_INTTYPES_H=1
+!endif
+!if $(VCVERSION) >= 1800
+OPTDEFINES = $(OPTDEFINES) /DHAVE_STDBOOL_H=1
+!endif
!if $(TCL_MEM_DEBUG)
OPTDEFINES = $(OPTDEFINES) /DTCL_MEM_DEBUG
@@ -1306,6 +1323,11 @@ OPTDEFINES = $(OPTDEFINES) /DUSE_THREAD_ALLOC=1
!endif
!if $(STATIC_BUILD)
OPTDEFINES = $(OPTDEFINES) /DSTATIC_BUILD
+!elseif $(TCL_VERSION) > 86
+OPTDEFINES = $(OPTDEFINES) /DTCL_WITH_EXTERNAL_TOMMATH
+!if "$(MACHINE)" == "AMD64"
+OPTDEFINES = $(OPTDEFINES) /DMP_64BIT
+!endif
!endif
!if $(TCL_NO_DEPRECATED)
OPTDEFINES = $(OPTDEFINES) /DTCL_NO_DEPRECATED
@@ -1335,11 +1357,14 @@ OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_PROFILED
OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_DO64BIT
!endif
!if $(VCVERSION) < 1300
-OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64
+OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64=1
!endif
!if "$(_USE_64BIT_TIME_T)" == "1"
-OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T
+OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1
+!endif
+!if "$(TCL_UTF_MAX)" == "4"
+OPTDEFINES = $(OPTDEFINES) /DTCL_UTF_MAX=4
!endif
# _ATL_XP_TARGETING - Newer SDK's need this to build for XP