@@ -24,7 +24,7 @@ _RULES_VC = 1
24
24
# For modifications that are not backward-compatible, you *must* change
25
25
# the major version.
26
26
RULES_VERSION_MAJOR = 1
27
- RULES_VERSION_MINOR = 9
27
+ RULES_VERSION_MINOR = 10
28
28
29
29
# The PROJECT macro must be defined by parent makefile.
30
30
!if "$(PROJECT)" == ""
@@ -411,8 +411,8 @@ _INSTALLDIR=$(_INSTALLDIR)\lib
411
411
# compiler version 1200. This is kept only for legacy reasons as it
412
412
# does not make sense for recent Microsoft compilers. Only used for
413
413
# output directory names.
414
- # ARCH - set to IX86 or AMD64 depending on 32- or 64-bit target
415
- # NATIVE_ARCH - set to IX86 or AMD64 for the host machine
414
+ # ARCH - set to IX86, ARM64 or AMD64 depending on 32- or 64-bit target
415
+ # NATIVE_ARCH - set to IX86, ARM64 or AMD64 for the host machine
416
416
# MACHINE - same as $(ARCH) - legacy
417
417
# _VC_MANIFEST_EMBED_{DLL,EXE} - commands for embedding a manifest if needed
418
418
@@ -435,6 +435,8 @@ VCVER=0
435
435
&& ![echo ARCH=IX86 >> vercl.x] \
436
436
&& ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
437
437
&& ![echo ARCH=AMD64 >> vercl.x] \
438
+ && ![echo $(_HASH)elif defined(_M_ARM64) >> vercl.x] \
439
+ && ![echo ARCH=ARM64 >> vercl.x] \
438
440
&& ![echo $(_HASH)endif >> vercl.x] \
439
441
&& ![$(cc32) -nologo -TC -P vercl.x 2>NUL]
440
442
!include vercl.i
@@ -459,6 +461,9 @@ VCVER = $(VCVERSION)
459
461
!if "$(MACHINE)" == "x86"
460
462
!undef MACHINE
461
463
MACHINE = IX86
464
+ !elseif "$(MACHINE)" == "arm64"
465
+ !undef MACHINE
466
+ MACHINE = ARM64
462
467
!elseif "$(MACHINE)" == "x64"
463
468
!undef MACHINE
464
469
MACHINE = AMD64
@@ -475,6 +480,8 @@ MACHINE=$(ARCH)
475
480
# the Tcl platform::identify command
476
481
!if "$(MACHINE)" == "AMD64"
477
482
PLATFORM_IDENTIFY = win32-x86_64
483
+ !elseif "$(MACHINE)" == "ARM64"
484
+ PLATFORM_IDENTIFY = win32-arm
478
485
!else
479
486
PLATFORM_IDENTIFY = win32-ix86
480
487
!endif
@@ -490,6 +497,8 @@ MULTIPLATFORM_INSTALL = 0
490
497
491
498
!if ![reg query HKLM\Hardware\Description\System\CentralProcessor\0 /v Identifier | findstr /i x86]
492
499
NATIVE_ARCH =IX86
500
+ !elseif ![reg query HKLM\Hardware\Description\System\CentralProcessor\0 /v Identifier | findstr /i ARM | findstr /i 64-bit]
501
+ NATIVE_ARCH =ARM64
493
502
!else
494
503
NATIVE_ARCH =AMD64
495
504
!endif
@@ -541,8 +550,13 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
541
550
542
551
# We always build nmakehlp even if it exists since we do not know
543
552
# what source it was built from.
553
+ !if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
544
554
!if [$(cc32 ) -nologo "$(NMAKEHLPC ) " -link -subsystem :console > nul]
545
555
!endif
556
+ !else
557
+ !if [copy x86_64-w64-mingw32-nmakehlp.exe nmakehlp.exe >NUL]
558
+ !endif
559
+ !endif
546
560
547
561
# ###############################################################
548
562
# 5. Test for compiler features
@@ -1344,7 +1358,7 @@ INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\..\include
1344
1358
# baselibs - minimum Windows libraries required. Parent makefile can
1345
1359
# define PRJ_LIBS before including rules.rc if additional libs are needed
1346
1360
1347
- OPTDEFINES = /DSTDC_HEADERS
1361
+ OPTDEFINES = /DSTDC_HEADERS /DUSE_NMAKE=1
1348
1362
!if $(VCVERSION) > 1600
1349
1363
OPTDEFINES = $(OPTDEFINES ) /DHAVE_STDINT_H=1
1350
1364
!else
@@ -1476,6 +1490,11 @@ carch = /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
1476
1490
carch =
1477
1491
!endif
1478
1492
1493
+ # cpuid is only available on intel machines
1494
+ !if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "AMD64"
1495
+ carch = $(carch ) /DHAVE_CPUID=1
1496
+ !endif
1497
+
1479
1498
!if $(DEBUG)
1480
1499
# Turn warnings into errors
1481
1500
cwarn = $(cwarn ) -WX
0 commit comments