MAXIMUM_NT_TARGET_VERSION
Use the MAXIMUM_NT_TARGET_VERSION variable in your Makefile file to prevent the Build utility from building the driver or sample for a later version of the operating system than is necessary.
For example, if you have a driver or sample code that you want to build for Windows XP, but not for Windows Vista, you can define MAXIMUM_NT_TARGET_VERSION in the Makefile file in your source directory. The MAXIMUM_NT_TARGET_VERSION setting must be defined before the !Include command that includes the Makefile*.def* file.
MAXIMUM_NT_TARGET_VERSION=0x601
!INCLUDE $(NTMAKEENV)\Makefile.def
When MAXIMUM_NT_TARGET_VERSION is defined, the Build utility issues a warning instead of trying to build a driver or sample for a later version of the target operating system. The same warning is issued when you use the DDK_BLOCK_ON_AMD64, DDK_BLOCK_ON_IA64, or DDK_BLOCK_ON_X86 settings for architectures that are not supported.
You can use the MINIMUM_NT_TARGET_VERSION variable to prevent the Build utility from building the driver or sample for an earlier version of the operating system than is necessary.
You can also use the _NT_TARGET_VERSION_XXX constants and values that are defined for the _NT_TARGET_VERSION macro.
Important Starting with the WDK for Windows 7, you can no longer set MAXIMUM _TARGET_VERSION to a macro or value that is less than $(_NT_TARGET_VERSION_WINXP) or 0x501.
See Also
Send comments about this topic to Microsoft
Build date: 5/3/2011