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 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 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 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 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 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 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 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968
|
# Copyright (C) 2001-2025 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
# implied.
#
# This software is distributed under license and may not be copied,
# modified or distributed except as expressly authorized under the terms
# of the license contained in the file LICENSE in this distribution.
#
# Refer to licensing information at http://www.artifex.com or contact
# Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
# CA 94129, USA, for further information.
# Define which major version of MSVC is being used
# (currently, 4, 5, 6, 7, and 8 are supported).
# Define the minor version of MSVC, currently only
# used for Microsoft Visual Studio .NET 2003 (7.1)
#MSVC_VERSION_GUESS=6
#MSVC_MINOR_VERSION=0
# Make a guess at the version of MSVC in use
# This will not work if service packs change the version numbers.
!if defined(_NMAKE_VER) && !defined(MSVC_VERSION)
!if "$(_NMAKE_VER)" == "162"
MSVC_VERSION_GUESS=5
!endif
!if "$(_NMAKE_VER)" == "6.00.8168.0"
# VC 6
MSVC_VERSION_GUESS=6
!endif
!if "$(_NMAKE_VER)" == "7.00.9466"
MSVC_VERSION_GUESS=7
!endif
!if "$(_NMAKE_VER)" == "7.00.9955"
MSVC_VERSION_GUESS=7
!endif
!if "$(_NMAKE_VER)" == "7.10.3077"
MSVC_VERSION_GUESS=7
MSVC_MINOR_VERSION=1
!endif
!if "$(_NMAKE_VER)" == "8.00.40607.16"
# VS2005
MSVC_VERSION_GUESS=8
!endif
!if "$(_NMAKE_VER)" == "8.00.50727.42"
# VS2005
MSVC_VERSION_GUESS=8
!endif
!if "$(_NMAKE_VER)" == "8.00.50727.762"
# VS2005
MSVC_VERSION_GUESS=8
!endif
!if "$(_NMAKE_VER)" == "9.00.21022.08"
# VS2008
MSVC_VERSION_GUESS=9
!endif
!if "$(_NMAKE_VER)" == "9.00.30729.01"
# VS2008
MSVC_VERSION_GUESS=9
!endif
!if "$(_NMAKE_VER)" == "10.00.30319.01"
# VS2010
MSVC_VERSION_GUESS=10
!endif
!if "$(_NMAKE_VER)" == "11.00.50522.1"
# VS2012
MSVC_VERSION_GUESS=11
!endif
!if "$(_NMAKE_VER)" == "11.00.50727.1"
# VS2012
MSVC_VERSION_GUESS=11
!endif
!if "$(_NMAKE_VER)" == "11.00.60315.1"
# VS2012
MSVC_VERSION_GUESS=11
!endif
!if "$(_NMAKE_VER)" == "11.00.60610.1"
# VS2012
MSVC_VERSION_GUESS=11
!endif
!if "$(_NMAKE_VER)" == "12.00.21005.1"
# VS 2013
MSVC_VERSION_GUESS=12
!endif
!if "$(_NMAKE_VER)" == "14.00.23506.0"
# VS2015
MSVC_VERSION_GUESS=14
!endif
!if "$(_NMAKE_VER)" == "14.00.24210.0"
# VS2015
MSVC_VERSION_GUESS=14
!endif
!if "$(_NMAKE_VER)" == "14.16.27034.0"
# VS2017 or VS2019 (Toolset v141)
MSVC_VERSION_GUESS=15
MS_TOOLSET_VERSION_GUESS=14.16.27034
!endif
!if "$(_NMAKE_VER)" == "14.16.27043.0"
# VS2017 or VS2019 (Toolset v141)
MSVC_VERSION_GUESS=15
MS_TOOLSET_VERSION_GUESS=14.16.27034
!endif
!if "$(_NMAKE_VER)" == "14.24.28314.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.24.28314
!endif
!if "$(_NMAKE_VER)" == "14.24.28315.0"
# VS2019 (Toolset v142 - update)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.24.28315
!endif
!if "$(_NMAKE_VER)" == "14.24.28316.0"
# VS2019 (Toolset v142 - update)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.24.28316
!endif
!if "$(_NMAKE_VER)" == "14.25.28614.0"
# VS2019 (Toolset v142 - update)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.25.28614
!endif
!if "$(_NMAKE_VER)" == "14.26.28805.0"
# VS2019 (Toolset v142 - update)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.26.28805
!endif
!if "$(_NMAKE_VER)" == "14.26.28806.0"
# VS2019 (Toolset v142 - update)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.26.28806
!endif
!if "$(_NMAKE_VER)" == "14.27.29111.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.27.29111
!endif
!if "$(_NMAKE_VER)" == "14.27.29112.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.27.29112
!endif
!if "$(_NMAKE_VER)" == "14.28.29333.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29334.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29335.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29336.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29910.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29913.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29914.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.28.29915.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.28.29333
!endif
!if "$(_NMAKE_VER)" == "14.29.30038.1"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30037
!endif
!if "$(_NMAKE_VER)" == "14.29.30133.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30136.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30137.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30139.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30140.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30141.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30142.1"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30145.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30146.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30147.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30148.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30152.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30153.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30154.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30156.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30158.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.29.30159.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.29.30133
!endif
!if "$(_NMAKE_VER)" == "14.37.32822.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.37.32822.0
!endif
!if "$(_NMAKE_VER)" == "14.38.33133.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.38.33133.0
!endif
!if "$(_NMAKE_VER)" == "14.38.33134.0"
# VS2019 (Toolset v142)
MSVC_VERSION_GUESS=16
MS_TOOLSET_VERSION_GUESS=14.38.33134.0
!endif
!if "$(_NMAKE_VER)" == "14.39.33523.0"
# VS2022 (Toolset v143)
MSVC_VERSION_GUESS=17
MS_TOOLSET_VERSION_GUESS=14.38.33519.0
!endif
!if "$(_NMAKE_VER)" == "14.41.34120.0"
# VS2022 (Toolset v143)
MSVC_VERSION_GUESS=17
MS_TOOLSET_VERSION_GUESS=14.41.34120.0
!endif
!if "$(_NMAKE_VER)" == "14.44.35208.0"
# VS2022 (Toolset v143)
MSVC_VERSION_GUESS=17
MS_TOOLSET_VERSION_GUESS=14.44.35208
!endif
!if "$(_NMAKE_VER)" == "14.44.35211.0"
# VS2022 (Toolset v143)
MSVC_VERSION_GUESS=17
MS_TOOLSET_VERSION_GUESS=14.44.35211
!endif
!if "$(_NMAKE_VER)" == "14.44.35214.0"
# VS2022 (Toolset v143)
MSVC_VERSION_GUESS=17
MS_TOOLSET_VERSION_GUESS=14.44.35214
!endif
!if "$(_NMAKE_VER)" == "14.44.35215.0"
# VS2022 (Toolset v143)
MSVC_VERSION_GUESS=17
MS_TOOLSET_VERSION_GUESS=14.44.35215
!endif
!endif
# Visual Studio 2019 and 2022 at least (16 and 17) now sets some
# helpful environment variables for us:
# VisualStudioDir=C:\Users\Robin\Documents\Visual Studio 2022
# VisualStudioEdition=Microsoft Visual Studio Community 2022
# VisualStudioVersion=17.0
# The command prompt also sets:
# VCToolsVersion=14.29.30133
# Let's use these to refine our guessing.
!if "$(VisualStudioVersion)" == "16.0"
MSVC_VERSION_GUESS=16
!endif
!if "$(VisualStudioVersion)" == "17.0"
MSVC_VERSION_GUESS=17
!endif
!if "$(VCToolsVersion)" != ""
MS_TOOLSET_VERSION_GUESS=$(VCToolsVersion).0
!endif
# We allow MSVC_VERSION to be defined by the caller, and
# only override it by our guess if it hasn't already been
# set.
!ifndef MSVC_VERSION
MSVC_VERSION=$(MSVC_VERSION_GUESS)
!endif
# We allow MS_TOOLSET_VERSION to be defined by the caller, and
# only override it by our guess if it hasn't already been
# set.
!ifndef MS_TOOLSET_VERSION
MS_TOOLSET_VERSION=$(MS_TOOLSET_VERSION_GUESS)
!endif
!if "$(MSVC_VERSION)" == ""
!MESSAGE Could not determine MSVC_VERSION! Guessing at an ancient one.
!MESSAGE Unknown nmake version: $(_NMAKE_VER)
MSVC_VERSION=6
!endif
!ifndef MSVC_MINOR_VERSION
MSVC_MINOR_VERSION=0
!endif
# Define the drive, directory, and compiler name for the Microsoft C files.
# COMPDIR contains the compiler and linker (normally \msdev\bin).
# MSINCDIR contains the include files (normally \msdev\include).
# LIBDIR contains the library files (normally \msdev\lib).
# COMP is the full C compiler path name (normally \msdev\bin\cl).
# COMPCPP is the full C++ compiler path name (normally \msdev\bin\cl).
# COMPAUX is the compiler name for DOS utilities (normally \msdev\bin\cl).
# RCOMP is the resource compiler name (normallly \msdev\bin\rc).
# LINK is the full linker path name (normally \msdev\bin\link).
# Note that when MSINCDIR and LIBDIR are used, they always get a '\' appended,
# so if you want to use the current directory, use an explicit '.'.
!if $(MSVC_VERSION) == 4
! ifndef DEVSTUDIO
DEVSTUDIO=c:\msdev
! endif
COMPBASE=$(DEVSTUDIO)
SHAREDBASE=$(DEVSTUDIO)
!endif
!if $(MSVC_VERSION) == 5
! ifndef DEVSTUDIO
DEVSTUDIO=C:\Program Files\Devstudio
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\SharedIDE
!endif
!endif
!if $(MSVC_VERSION) == 6
! ifndef DEVSTUDIO
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
COMPBASE=$(DEVSTUDIO)\VC98
SHAREDBASE=$(DEVSTUDIO)\Common\MSDev98
!endif
!endif
!if $(MSVC_VERSION) == 7
! ifndef DEVSTUDIO
!if $(MSVC_MINOR_VERSION) == 0
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio .NET
!else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio .NET 2003
!endif
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
COMPBASE=$(DEVSTUDIO)\Vc7
SHAREDBASE=$(DEVSTUDIO)\Vc7
!endif
!endif
!if $(MSVC_VERSION) == 8
! ifndef DEVSTUDIO
!if $(BUILD_SYSTEM) == 64
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 8
!else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 8
!endif
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\VC
!ifdef WIN64
COMPDIR64=$(COMPBASE)\bin\amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\AMD64"
!endif
!endif
!endif
!if $(MSVC_VERSION) == 9
! ifndef DEVSTUDIO
!if $(BUILD_SYSTEM) == 64
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 9.0
!else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 9.0
!endif
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
# There are at least 4 different values:
# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
! ifdef MSSDK
RCDIR=$(MSSDK)\bin
! else
RCDIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
! endif
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\VC
!ifdef WIN64
COMPDIR64=$(COMPBASE)\bin\amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\AMD64"
!endif
!endif
!endif
!if $(MSVC_VERSION) == 10
! ifndef DEVSTUDIO
!if $(BUILD_SYSTEM) == 64
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 10.0
!else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 10.0
!endif
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
# There are at least 4 different values:
# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
! ifdef MSSDK
! ifdef WIN64
RCDIR=$(MSSDK)\bin\x64
! else
RCDIR=$(MSSDK)\bin
! endif
! else
!ifdef WIN64
RCDIR=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\bin
!else
RCDIR=C:\Program Files\Microsoft SDKs\Windows\v7.0\bin
!endif
! endif
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\VC
!ifdef WIN64
!if $(BUILD_SYSTEM) == 64
COMPDIR64=$(COMPBASE)\bin\amd64
LINKLIBPATH=/LIBPATH:"$(MSSDK)\lib\x64" /LIBPATH:"$(COMPBASE)\lib\amd64"
!else
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\x64"
!endif
!endif
!endif
!endif
!if $(MSVC_VERSION) == 11
! ifndef DEVSTUDIO
!if $(BUILD_SYSTEM) == 64
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 11.0
!else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 11.0
!endif
! endif
!if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
!else
# There are at least 4 different values:
# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
! ifdef MSSDK
! ifdef WIN64
RCDIR=$(MSSDK)\bin\x64
! else
RCDIR=$(MSSDK)\bin
! endif
! else
!if $(BUILD_SYSTEM) == 64
RCDIR=C:\Program Files (x86)\Windows Kits\8.0\bin\x64
!else
RCDIR=C:\Program Files\Windows Kits\8.0\bin\x86
!endif
! endif
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\VC
!ifdef WIN64
!if $(BUILD_SYSTEM) == 64
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(MSSDK)\lib\x64" /LIBPATH:"$(COMPBASE)\lib\amd64"
!else
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\x64"
!endif
!endif
!endif
!endif
!if $(MSVC_VERSION) == 12
! ifndef DEVSTUDIO
! if $(BUILD_SYSTEM) == 64
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 12.0
! else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 12.0
! endif
! endif
! if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
! else
# There are at least 4 different values:
# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
! ifdef MSSDK
! ifdef WIN64
RCDIR=$(MSSDK)\bin\x64
! else
RCDIR=$(MSSDK)\bin
! endif
! else
! if $(BUILD_SYSTEM) == 64
RCDIR=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin
! else
RCDIR=C:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin
! endif
! endif
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\VC
! ifdef WIN64
! if $(BUILD_SYSTEM) == 64
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64"
! else
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\x64"
! endif
! endif
! endif
!endif
!if $(MSVC_VERSION) == 14
! ifndef DEVSTUDIO
! if $(BUILD_SYSTEM) == 64
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 14.0
! else
DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 14.0
! endif
! endif
! if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
! else
# There are at least 4 different values:
# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
! ifdef MSSDK
! ifdef WIN64
RCDIR=$(MSSDK)\bin\x64
! else
RCDIR=$(MSSDK)\bin
! endif
! else
! if $(BUILD_SYSTEM) == 64
RCDIR=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\Bin
! else
RCDIR=C:\Program Files\Microsoft SDKs\Windows\v10.0A\Bin
! endif
! endif
COMPBASE=$(DEVSTUDIO)\VC
SHAREDBASE=$(DEVSTUDIO)\VC
! ifdef WIN64
! if $(BUILD_SYSTEM) == 64
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64"
! else
COMPDIR64=$(COMPBASE)\bin\x86_amd64
LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\x64"
! endif
! endif
! endif
!endif
!if $(MSVC_VERSION) == 15
! ifndef DEVSTUDIO
DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\$(MS_TOOLSET_VERSION)
! endif
! if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
! else
! if $(BUILD_SYSTEM) == 64
DEVSTUDIO_HOST=Hostx64
! else
DEVSTUDIO_HOST=Hostx86
! endif
! ifdef WIN64
DEVSTUDIO_TARGET=x64
! else
DEVSTUDIO_TARGET=x86
! endif
COMPDIR=$(DEVSTUDIO)\bin\$(DEVSTUDIO_HOST)\$(DEVSTUDIO_TARGET)
RCDIR=
LINKLIBPATH=/LIBPATH:"$(DEVSTUDIO)\lib\$(DEVSTUDIO_TARGET)"
! endif
!endif
!if $(MSVC_VERSION) == 16
! ifndef DEVSTUDIO
! ifdef VCToolsInstallDir
DEVSTUDIO=$(VCToolsInstallDir)
! else
DEVSTUDIO_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019
! if "$(VisualStudioEdition)" == "Microsoft Visual Studio Community 2019"
DEVSTUDIO_VARIANT=Community
! else
! if "$(VisualStudioEdition)" == "Microsoft Visual Studio Professional 2019"
DEVSTUDIO_VARIANT=Professional
! else
! if exist("$(DEVSTUDIO_PATH)\Professional")
DEVSTUDIO_VARIANT=Professional
! else
DEVSTUDIO_VARIANT=Community
! endif
! endif
! endif
DEVSTUDIO=$(DEVSTUDIO_PATH)\$(DEVSTUDIO_VARIANT)\VC\Tools\MSVC\$(MS_TOOLSET_VERSION)
! endif
! endif
! if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
! else
! if $(BUILD_SYSTEM) == 64
DEVSTUDIO_HOST=Hostx64
! else
DEVSTUDIO_HOST=Hostx86
! endif
! ifdef WIN64
DEVSTUDIO_TARGET=x64
! else
DEVSTUDIO_TARGET=x86
! endif
COMPDIR=$(DEVSTUDIO)\bin\$(DEVSTUDIO_HOST)\$(DEVSTUDIO_TARGET)
RCDIR=
LINKLIBPATH=/LIBPATH:"$(DEVSTUDIO)\lib\$(DEVSTUDIO_TARGET)"
! endif
!endif
!if $(MSVC_VERSION) == 17
! ifndef DEVSTUDIO
! ifdef VCToolsInstallDir
DEVSTUDIO=$(VCToolsInstallDir)
! else
DEVSTUDIO_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2022
! if "$(VisualStudioEdition)" == "Microsoft Visual Studio Community 2022"
DEVSTUDIO_VARIANT=Community
! else
! if "$(VisualStudioEdition)" == "Microsoft Visual Studio Professional 2022"
DEVSTUDIO_VARIANT=Professional
! else
! if exist("$(DEVSTUDIO_PATH)\Professional")
DEVSTUDIO_VARIANT=Professional
! else
DEVSTUDIO_VARIANT=Community
! if !exist("$(DEVSTUDIO_PATH)\Community")
! if exist("$(DEVSTUDIO_PATH)\BuildTools")
DEVSTUDIO_VARIANT=BuildTools
! endif
! endif
! endif
! endif
! endif
DEVSTUDIO=$(DEVSTUDIO_PATH)\$(DEVSTUDIO_VARIANT)\VC\Tools\MSVC\$(MS_TOOLSET_VERSION)
! endif
! endif
! if "$(DEVSTUDIO)"==""
COMPBASE=
SHAREDBASE=
! else
! if $(BUILD_SYSTEM) == 64
DEVSTUDIO_HOST=Hostx64
! else
DEVSTUDIO_HOST=Hostx86
! endif
! ifdef WIN64
DEVSTUDIO_TARGET=x64
! else
DEVSTUDIO_TARGET=x86
! endif
COMPDIR=$(DEVSTUDIO)\bin\$(DEVSTUDIO_HOST)\$(DEVSTUDIO_TARGET)
RCDIR=
LINKLIBPATH=/LIBPATH:"$(DEVSTUDIO)\lib\$(DEVSTUDIO_TARGET)"
! endif
!endif
!if "$(ARM)"=="1"
VCINSTDIR=$(VS110COMNTOOLS)..\..\VC\
!ifndef WINSDKVER
WINSDKVER=8.0
!endif
!ifndef WINSDKDIR
WINSDKDIR=$(VS110COMNTOOLS)..\..\..\Windows Kits\$(WINSDKVER)
!endif
COMPAUX__="$(VCINSTDIR)\bin\cl.exe"
COMPAUXCFLAGS=/I"$(VCINSTDIR)\INCLUDE" /I"$(VCINSTDIR)\ATLMFC\INCLUDE" \
/I"$(WINSDKDIR)\include\shared" /I"$(WINSDKDIR)\include\um" \
/I"$(WINDSKDIR)include\winrt"
COMPAUXLDFLAGS=/LIBPATH:"$(VCINSTDIR)\LIB" \
/LIBPATH:"$(VCINSTDIR)\ATLMFC\LIB" \
/LIBPATH:"$(WINSDKDIR)\lib\win8\um\x86"
COMPAUX=$(COMPAUX__) $(COMPAUXCFLAGS)
!else
COMPAUXLDFLAGS=""
!endif
# Some environments don't want to specify the path names for the tools at all.
# Typical definitions for such an environment would be:
# MSINCDIR= LIBDIR= COMP=cl COMPAUX=cl RCOMP=rc LINK=link
# COMPDIR, LINKDIR, and RCDIR are irrelevant, since they are only used to
# define COMP, LINK, and RCOMP respectively, but we allow them to be
# overridden anyway for completeness.
!ifndef COMPDIR
!if "$(COMPBASE)"==""
COMPDIR=
!else
!ifdef WIN64
COMPDIR=$(COMPDIR64)
!else
COMPDIR=$(COMPBASE)\bin
!endif
!endif
!endif
!ifndef LINKDIR
!if "$(COMPBASE)"==""
LINKDIR=
!else
!ifdef WIN64
LINKDIR=$(COMPDIR64)
!else
LINKDIR=$(COMPBASE)\bin
!endif
!endif
!endif
!ifndef RCDIR
!if "$(SHAREDBASE)"==""
RCDIR=
!else
RCDIR=$(SHAREDBASE)\bin
!endif
!endif
!ifndef MSINCDIR
!if "$(COMPBASE)"==""
MSINCDIR=
!else
MSINCDIR=$(COMPBASE)\include
!endif
!endif
!ifndef LIBDIR
!if "$(COMPBASE)"==""
LIBDIR=
!else
!ifdef WIN64
LIBDIR=$(COMPBASE)\lib\amd64
!else
LIBDIR=$(COMPBASE)\lib
!endif
!endif
!endif
!ifndef COMP
!if "$(COMPDIR)"==""
COMP=cl
!else
COMP="$(COMPDIR)\cl"
!endif
!endif
!ifndef COMPCPP
COMPCPP=$(COMP)
!endif
!ifndef COMPAUX
!ifdef WIN64
COMPAUX=$(COMP)
!else
COMPAUX=$(COMP)
!endif
!endif
!ifndef RCOMP
!if "$(RCDIR)"==""
RCOMP=rc
!else
RCOMP="$(RCDIR)\rc"
!endif
!endif
!ifndef LINK
!if "$(LINKDIR)"==""
LINK=link
!else
LINK="$(LINKDIR)\link"
!endif
!endif
# nmake does not have a form of .BEFORE or .FIRST which can be used
# to specify actions before anything else is done. If LIB and INCLUDE
# are not defined then we want to define them before we link or
# compile. Here is a kludge which allows us to to do what we want.
# nmake does evaluate preprocessor directives when they are encountered.
# So the desired set statements are put into dummy preprocessor
# directives.
!ifndef INCLUDE
!if "$(MSINCDIR)"!=""
!if [set INCLUDE=$(MSINCDIR)]==0
!endif
!endif
!endif
!ifndef LIB
!if "$(LIBDIR)"!=""
!if [set LIB=$(LIBDIR)]==0
!endif
!endif
!endif
!ifndef LINKLIBPATH
LINKLIBPATH=
!endif
# Define the processor architecture. (i386, ppc, alpha)
!ifndef CPU_FAMILY
CPU_FAMILY=i386
#CPU_FAMILY=ppc
#CPU_FAMILY=alpha # not supported yet - we need someone to tweak
!endif
# Define the processor (CPU) type. Allowable values depend on the family:
# i386: 386, 486, 586
# ppc: 601, 604, 620
# alpha: not currently used.
!ifndef CPU_TYPE
CPU_TYPE=486
#CPU_TYPE=601
!endif
# Define special features of CPUs
# We'll assume that if you have an x86 machine, you've got a modern
# enough one to have SSE2 instructions. If you don't, then predefine
# DONT_HAVE_SSE2 when calling this makefile
!ifndef ARM
!if "$(CPU_FAMILY)" == "i386"
!ifndef DONT_HAVE_SSE2
!ifndef HAVE_SSE2
!message **************************************************************
!message * Assuming that target has SSE2 instructions available. If *
!message * this is NOT the case, define DONT_HAVE_SSE2 when building. *
!message **************************************************************
!endif
HAVE_SSE2=1
CFLAGS=$(CFLAGS) /DHAVE_SSE2
# add "/D__SSE__" here, but causes crashes just now
JPX_SSE_CFLAGS=
!endif
!endif
!endif
# Define the .dev module that implements thread and synchronization
# primitives for this platform. Don't change this unless you really know
# what you're doing.
!ifndef SYNC
SYNC=winsync
!endif
# OpenJPEG compiler flags
#
!if "$(JPX_LIB)" == "openjpeg"
!ifndef JPXSRCDIR
JPXSRCDIR=openjpeg
!endif
!ifndef JPX_CFLAGS
!ifdef WIN64
JPX_CFLAGS=-DMUTEX_pthread=0 -DUSE_OPENJPEG_JP2 -DUSE_JPIP $(JPX_SSE_CFLAGS) -DOPJ_STATIC -DWIN64
!else
JPX_CFLAGS=-DMUTEX_pthread=0 -DUSE_OPENJPEG_JP2 -DUSE_JPIP $(JPX_SSE_CFLAGS) -DOPJ_STATIC -DWIN32
!endif
!else
JPX_CFLAGS = $JPX_CFLAGS -DUSE_JPIP -DUSE_OPENJPEG_JP2 -DOPJ_STATIC
!endif
!endif
|