Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

makefile.new

By: a guest on Mar 20th, 2010  |  syntax: None  |  size: 352.40 KB  |  hits: 2,981  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. !IF 0
  3.  
  4. Copyright (c) Microsoft Corporation
  5.  
  6. Module Name:
  7.  
  8.     makefile.def
  9.  
  10. Abstract:
  11.  
  12.     This is the standard makefile for the components of the NT project.
  13.     It includes the following files:
  14.  
  15.         .\sources.      - developer supplies this file.  It defines the
  16.                           required TARGETNAME, TARGETTYPE and
  17.                           SOURCES as well as optional macros that control
  18.                           the behavior of the compiler and linker:
  19.  
  20.         $(OBJ_PATH)\$O\_objects.mac  - built by BUILD.EXE from .\sources.
  21.  
  22.  
  23. Targets:
  24.  
  25.     all       - Builds all targets in this make file
  26.  
  27.  
  28. Useful Variables Set:
  29.  
  30.     CPUTYPE={I386|IA64|AMD64|ARM}
  31.  
  32. Optional Controls Variables (partial list), these are environment variables,
  33. remember they can be set with env=value on the command line as well:
  34.  
  35. NOTE:  xxx_... is {MSC|386|ia64|amd64} where MSC_ applies to the C compiler
  36.        independent of the cpu type.  Specific cpu_ will take precedence
  37.        over the equivalent MSC_ variable.
  38.  
  39.     NTKERNEL=filename
  40.  
  41.     UMAPPL=filename
  42.  
  43.     NT_UP
  44.             Define as 0 in environment to turn on MP.
  45.             If undefined or equal to 1, you get UP.
  46.  
  47.     xxx_warning_level
  48.  
  49.     xxx_optimization
  50.  
  51.     xxx_STDCALL = 1 use _stdcall calling convention
  52.                   0 use _cdecl calling convention
  53.  
  54.     NTDEBUG
  55.  
  56.     BROWSER_INFO
  57.  
  58.     NT_INST - set to turn on instrumentation
  59.  
  60.     BASEDIR - \nt or \ntrel (default \nt)
  61.  
  62.     PRECOMPILED_CXX=1 - do precompiled headers for CXX instead of C files
  63.                         note: precompiled headers can not be used on both
  64.                         c and cxx files in a single directory.
  65. !ENDIF
  66.  
  67.  
  68. #
  69. # Managed code is x86 and is very slow on IA64, doubling build times.
  70. # Turn off some of the build tools that use managed code.
  71. # More critical x86 tools remain -- csc.exe, managed C++ cl.exe.
  72. #
  73. !if "$(HOST_PROCESSOR_ARCHITECTURE)" == "ia64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
  74.  
  75. DISABLE_CV=1
  76. !undef DO_LSBUILD
  77.  
  78. !endif
  79.  
  80. # Store away the original value of %_NTTREE% so we can use it later
  81. # for things like LCG creation that binplace extra generated files
  82. # to a different root under %_NTTREE% with %_ALT_TARGET_PATH% (if set)
  83. # appended after that.
  84. !if [set NTTREE_ORIG=$(_NTTREE)]
  85. !endif
  86.  
  87. !ifdef BINPLACE_LOG
  88. BUILD_LOGS=$(BINPLACE_LOG)\..
  89. !if !exist($(BUILD_LOGS)\sidebyside)
  90. !if [mkdir $(BUILD_LOGS)\sidebyside 2>nul]
  91. !endif
  92. !endif
  93. !endif
  94.  
  95. # See if the user wants BROWSER_INFO.
  96. !ifdef BROWSER_INFO
  97. USER_ENV_BROWSER_INFO=1
  98. !endif
  99.  
  100. !ifndef MUI
  101. MUI=1
  102. !endif
  103.  
  104. #
  105. # Select build target and set platform specific variables.
  106. #
  107.  
  108. !ifdef BUILD_ALLOW_ALL_WARNINGS
  109. BUILD_ALLOW_LINKER_WARNINGS=1
  110. BUILD_ALLOW_COMPILER_WARNINGS=1
  111. !endif
  112. BUILD_ALLOW_MIDL_WARNINGS=1
  113.  
  114. !ifndef BUILD_ALLOW_LINKER_WARNINGS
  115. LINKER_WX_SWITCH=/WX
  116. !else
  117. LINKER_WX_SWITCH=
  118. !endif
  119.  
  120. !ifndef BUILD_ALLOW_COMPILER_WARNINGS
  121. COMPILER_WX_SWITCH=/WX
  122. !else
  123. COMPILER_WX_SWITCH=
  124. !endif
  125.  
  126. !ifndef BUILD_ALLOW_MIDL_WARNINGS
  127. MIDL_WX_SWITCH=/WX
  128. !else
  129. MIDL_WX_SWITCH=
  130. !endif
  131.  
  132. !include $(NTMAKEENV)\makefile.plt
  133.  
  134. !ifndef MASTER_VERSION_FILE
  135. !if "$(POCKETPC)" == ""
  136. MASTER_VERSION_FILE = $(SDK_INC_PATH)\ntverp.h
  137. !endif
  138. DEFAULT_VERSION_FILE=1
  139. !endif
  140.  
  141. !if exist($(OBJECT_ROOT)\$O\ntverpmk.inc)
  142. !include $(OBJECT_ROOT)\$O\ntverpmk.inc
  143. !endif
  144.  
  145. !ifdef OFFICIAL_BUILD_MACHINE
  146. TARGET_DBG_DEFINES=$(TARGET_DBG_DEFINES) /DOFFICIAL_BUILD=1
  147. BBT_BINPLACE_PREBBT=1
  148. !endif
  149.  
  150. BINPLACE_INSTRUMENTED_BINARIES=1
  151.  
  152. #
  153. # Optionally include version and public key information from generated file.
  154. # The file is large and slow to be processed by nmake so we only use it if
  155. # it is asked for.
  156. #
  157. !if defined(USE_VERSIONS)
  158. !if "$(USE_VERSIONS)" != "1"
  159. !error The only legal value for USE_VERSIONS is 1.
  160. !endif
  161. !if exist($(OBJECT_ROOT)\$O\versionsmk.inc)
  162. !include $(OBJECT_ROOT)\$O\versionsmk.inc
  163. !endif
  164. !endif
  165.  
  166. !ifndef LANGUAGE
  167. LANGUAGE=usa
  168. !endif
  169.  
  170. #
  171. # Include the developer supplied file that defines the TARGETNAME,
  172. # TARGETTYPE and SOURCES macros.  Make sure it defines them.
  173. #
  174.  
  175. !ifdef USE_CAPK
  176. # Kernel profiling - icecap api's come from the kernel or from rtl\icecap.c when building the kernel/hal/ntdll
  177. USE_ICECAP4=1
  178. PERFLIBS=
  179. !endif
  180.  
  181. !if defined(USE_ICECAP) || defined(USE_ICECAP4) || defined(USE_DLP)
  182. ! ifdef USE_ICECAP
  183. PERFFLAGS=-Gh
  184. PERFLIBS=$(SDK_LIB_PATH)\icap.lib
  185. ! else
  186. !  ifdef USE_ICECAP4
  187. PERFFLAGS=/fastcap
  188. !  else # USE_DLP
  189. PERFFLAGS=/dlp
  190. !  endif
  191. !  ifndef PERFLIBS
  192. PERFLIBS=$(SDK_LIB_PATH)\icecap.lib
  193. !  endif
  194. ! endif
  195. ! if $(FREEBUILD)
  196. NTDEBUG=ntsdnodbg
  197. ! else
  198. NTDEBUG=ntsd
  199. ! endif
  200. NTDEBUGTYPE=windbg
  201. !endif
  202.  
  203. #
  204. # If you want to run on an older version of the OS, then set
  205. # _NT_TARGET_VERSION to one of the below in your sources file
  206. #
  207.  
  208. _NT_TARGET_VERSION_LATEST   =$(__LATEST_NT_TARGET_VERSION)
  209. _NT_TARGET_VERSION_WIN7     =0x601
  210. _NT_TARGET_VERSION_VISTA    =0x600
  211. _NT_TARGET_VERSION_LONGHORN =0x600
  212. _NT_TARGET_VERSION_WS03     =0x502
  213. _NT_TARGET_VERSION_WINXP    =0x501
  214. _NT_TARGET_VERSION_WIN2K    =0x500
  215. _NT_TARGET_VERSION_NT4      =0x400
  216.  
  217. #
  218. # Most current defaults for version info, can be overridden explicitly or
  219. # by setting _NT_TARGET_VERSION in your sources file
  220. #
  221.  
  222. LATEST_NTDDI_VERSION        =0x06010000
  223.  
  224. LATEST_WIN32_IE_VERSION     =0x0800
  225. LATEST_WIN32_WINNT_VERSION  =0x0601
  226.  
  227. LATEST_WIN32_WIN95_VERSION  =0x0400
  228. LATEST_WIN32_WCE_VERSION    =0x0300
  229. LATEST_SUBSYSTEM_VERSION    =6.01
  230.  
  231. #
  232. # Run miscfiles rules during both compile and link phases.  Sources file
  233. # can override by setting this a value other than 0
  234. #
  235.  
  236. MISCFILES_DURING_LINK=0
  237.  
  238. # Validate INTL_DEPOT if it's set
  239. !if defined (INTL_DEPOT)
  240. ! if "$(INTL_DEPOT)" != "1"
  241. !  error INTL_DEPOT can only be set to 1
  242. ! endif
  243. !endif
  244.  
  245. #
  246. # Special macros used to point to things in %_NTTREE%\loc\src.
  247. # Can be used throughout this makefile and in sources files.
  248. #
  249. LOC_DIR=loc
  250. LOC_SRC=$(LOC_DIR)\src
  251. LOC_BIN=$(LOC_SRC)\bin
  252. LOC_MULTI=$(LOC_SRC)\multi
  253. LOC_LCG=$(LOC_SRC)\LCG
  254. !if "$(INTL_DEPOT)" == "1"
  255. LOC_PRELOC=$(LOC_DIR)\bindrop
  256. !else
  257. LOC_PRELOC=$(LOC_SRC)\preloc
  258. !endif
  259.  
  260. #
  261. # Set LOC_UA properly so it can be used in sources files. NOTE: This is _not_
  262. # for use in the rest of this makefile. We do this here to allow PRELOC_LANG
  263. # or PRELOC_BASE_LANG to be set in project.mk and have that affect what LOC_UA
  264. # is set to in their sources files. This is how the UA bits in the Intl depots work.
  265. #
  266. !if defined(PRELOC_LANG)
  267. LOC_UA=$(LOC_PRELOC)\$(PRELOC_LANG)\UA
  268. LOC_EULA=$(LOC_PRELOC)\$(PRELOC_LANG)
  269. !else
  270. # This covers the case of PRELOC_BASE_LANG=1 and of neither PRELOC_BASE_LANG
  271. # or PRELOC_LANG being set - we default to the same location in both cases.
  272. LOC_UA=$(LOC_BIN)\UA
  273. LOC_EULA=$(LOC_BIN)
  274. !endif
  275.  
  276.  
  277.  
  278. !INCLUDE .\sources
  279. SOURCES_USED=$(SOURCES_USED) .\sources
  280.  
  281. #
  282. # Attempt to include the sources file from the target subdirectory.
  283. #
  284. !IF EXIST(.\$(TARGET_DIRECTORY)\sources)
  285. !message BUILDMSG: $(MAKEDIR): this directory includes .\$(TARGET_DIRECTORY)\sources.  This may override macros specificed in $(MAKEDIR)\sources.
  286. ! INCLUDE .\$(TARGET_DIRECTORY)\sources
  287. SOURCES_USED=$(SOURCES_USED) .\$(TARGET_DIRECTORY)\sources
  288. !ENDIF
  289.  
  290. #
  291. # Attempt to include the sources file from the parent target subdirectory.
  292. #
  293.  
  294. !IF EXIST(..\$(TARGET_DIRECTORY)\sources)
  295. !message BUILDMSG: $(MAKEDIR): this directory includes ..\$(TARGET_DIRECTORY)\sources.  This may override macros specificed in $(MAKEDIR)\sources.
  296. ! INCLUDE ..\$(TARGET_DIRECTORY)\sources
  297. SOURCES_USED=$(SOURCES_USED) ..\$(TARGET_DIRECTORY)\sources
  298. !ENDIF
  299.  
  300.  
  301. # move into build.exe for perf
  302.  
  303. #
  304. # People tend to think that just because their C++ code #includes some midl output, they need BUILD_PASS0_CONSUMES, or
  305. # that all managed code needs BUILD_PASS0_CONSUMES or BUILD_CONSUMES. These are false.
  306. #
  307. !if defined(BUILD_PASS0_CONSUMES)
  308. # net\peernet\collabspaces\src\collabhookhost uses $(TARGET_DIRECTORY)_SOURCES
  309. # some directories do use capital .IDL
  310. # CONSIDER: move this into build.exe.
  311. !if !defined(NTTARGETFILE0) \
  312.     && "$(SOURCES:.idl=)"       == "$(SOURCES)"       && "$(SOURCES:.odl=)"       == "$(SOURCES)"       \
  313.     && "$(SOURCES:.IDL=)"       == "$(SOURCES)"       && "$(SOURCES:.ODL=)"       == "$(SOURCES)"       \
  314.     && "$(I386_SOURCES:.idl=)"  == "$(I386_SOURCES)"  && "$(I386_SOURCES:.odl=)"  == "$(I386_SOURCES)"  \
  315.     && "$(I386_SOURCES:.IDL=)"  == "$(I386_SOURCES)"  && "$(I386_SOURCES:.ODL=)"  == "$(I386_SOURCES)"  \
  316.     && "$(AMD64_SOURCES:.IDL=)" == "$(AMD64_SOURCES)" && "$(AMD64_SOURCES:.ODL=)" == "$(AMD64_SOURCES)" \
  317.     && "$(AMD64_SOURCES:.idl=)" == "$(AMD64_SOURCES)" && "$(AMD64_SOURCES:.odl=)" == "$(AMD64_SOURCES)" \
  318.     && "$(IA64_SOURCES:.idl=)"  == "$(IA64_SOURCES)"  && "$(IA64_SOURCES:.odl=)"  == "$(IA64_SOURCES)"  \
  319.     && "$(IA64_SOURCES:.IDL=)"  == "$(IA64_SOURCES)"  && "$(IA64_SOURCES:.ODL=)"  == "$(IA64_SOURCES)"
  320. !message $(MAKEDIR) BUILD_PASS0_CONSUMES is not needed here and is counterproductive; remove it.
  321. !endif
  322. !endif
  323.  
  324. !if defined(BUILD_PASS0_PRODUCES)
  325. !if !defined(NTTARGETFILE0) && "$(SOURCES:.idl=)" == "$(SOURCES)" && "$(SOURCES:.mc=)" == "$(SOURCES)" && "$(SOURCES:.odl=)" == "$(SOURCES)" \
  326.     && "$(SOURCES:.IDL=)" == "$(SOURCES)" && "$(SOURCES:.MC=)" == "$(SOURCES)" && "$(SOURCES:.ODL=)" == "$(SOURCES)" \
  327.     && !defined(EVENTS_MANIFEST) && !defined(SLS_LICENSING_MANIFEST) && !defined(PASS0_PUBLISH)
  328. !message $(MAKEDIR) BUILD_PASS0_PRODUCES is not needed here and is counterproductive; remove it.
  329. !endif
  330. !endif
  331.  
  332. !if (defined(BUILD_CONSUMES) || defined(BUILD_PRODUCES)) && ("$(TARGETTYPE)" == "PROGRAM" || "$(TARGETTYPE)" == "DRIVER")
  333. !message BUILDMSG: $(MAKEDIR): BUILD_CONSUMES/PRODUCES is unnecessary, remove it.
  334. !endif
  335.  
  336. #
  337. # move into build.exe for perf and then write result into _objects.mac
  338. #
  339. !if !defined(USE_DLLDEF_OBJECTS) && defined(DLLDEF_OBJECTS)
  340. USE_DLLDEF_OBJECTS=1
  341. !elseif !defined(USE_DLLDEF_OBJECTS)
  342. USE_DLLDEF_OBJECTS=0
  343. !elseif "$(USE_DLLDEF_OBJECTS)" != "0" && "$(USE_DLLDEF_OBJECTS)" != "1"
  344. !  error USE_DLLDEF_OBJECTS may only be 0 or 1 or not defined.
  345. USE_DLLDEF_OBJECTS=0
  346. !endif
  347.  
  348. !if defined(MCPP_TYPE) && "$(MCPP_TYPE)" != "pure" && "$(MCPP_TYPE)" != "safe"
  349. !error $(MAKEDIR) MCPP_TYPE must be pure or safe or not defined, but it is $(MCPP_TYPE).
  350. !endif
  351.  
  352. !if defined(INLCUDES)
  353. !error $(MAKEDIR): INLCUDES does nothing. Remove it.
  354. !endif
  355.  
  356. !if defined(PRECOMPILED_CXX) && "$(PRECOMPILED_CXX)" != "" && "$(PRECOMPILED_CXX)" != "1"
  357. !error $(MAKEDIR): PRECOMPILED_CXX has an invalid value, change it to 1.
  358. !endif
  359.  
  360. !if defined(USE_NATIVE_EH) && "$(USE_NATIVE_EH)" != "1" && "$(USE_NATIVE_EH)" != "ASYNC" && "$(USE_NATIVE_EH)" != "CTHROW"
  361. !error $(MAKEDIR): USE_NATIVE_EH has an invalid value, change it to 1.
  362. !endif
  363.  
  364.  
  365. !if defined(NTTEST)
  366. !error $(MAKEDIR): NTTEST does nothing. Remove it.
  367. !endif
  368.  
  369. #
  370. # Link binaries instrumented with IceCAP to NTOSKRNl.EXE or NTDLL.DLL to
  371. # obtain __CAP imports. Do not set C_DEFINES for catalogs.
  372. #
  373. !if defined(USE_CAPK)
  374. ! if "$(TARGETTYPE)" != "CATALOG"
  375. C_DEFINES=$(C_DEFINES) /D_CAPKERN=1
  376. ASM_DEFINES=$(ASM_DEFINES) /D_CAPKERN=1
  377. ! endif
  378. ! if defined(MANAGED_CXX)
  379. PERFFLAGS=$(PERFFLAGS:/fastcap=)
  380. ! endif
  381. ! if defined(USE_ICECAP4)
  382. !  if "$(TARGETTYPE)" == "PROGRAM" || "$(TARGETTYPE)" == "DYNLINK"
  383. !   if "$(TARGETLIBS)" == "$(TARGETLIBS:ntdll.lib=)"
  384. TARGETLIBS=$(SDK_LIB_PATH)\ntdll.lib $(TARGETLIBS)
  385. !   endif
  386. !  endif
  387. !  if "$(TARGETTYPE)" == "DRIVER" || "$(TARGETTYPE)" == "GDI_DRIVER" || "$(TARGETTYPE)" == "MINIPORT"
  388. !   if "$(TARGETLIBS)" == "$(TARGETLIBS:ntoskrnl.lib=)"
  389. TARGETLIBS=$(DDK_LIB_PATH)\ntoskrnl.lib $(TARGETLIBS)
  390. !   endif
  391. !  endif
  392. ! endif
  393. !endif
  394.  
  395. !if "$(USE_RUNTIME_CHECKS)" == "1" && !defined(RESOURCE_ONLY_DLL)
  396. ! if !defined(MANAGED_CXX)
  397. USER_C_FLAGS=$(USER_C_FLAGS) /RTCcsu /wd4748 /DMSC_NOOPT
  398. MSC_OPTIMIZATION=/Oi
  399. DEFAULT_MSC_OPT=/Oi
  400. 386_OPTIMIZATION=/Oi
  401. ! endif
  402. ! if !defined(MCPP_TYPE) && "$(TARGETTYPE)" != "CATALOG"
  403. !  if defined(NTKERNEL)
  404. KERNEL_LIBS=$(KERNEL_LIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\RuntimeChecks.lib
  405. !  elseif ("$(TARGETNAME)" == "ntdll" && "$(TARGETTYPE)" == "DYNLINK" && !defined(TEST_CODE))
  406. TARGETLIBS=$(TARGETLIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\RuntimeChecks.lib
  407. !  elseif defined(BOOTAPPNAME)
  408. TARGETLIBS=$(TARGETLIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\RuntimeChecks.lib
  409. !  elseif "$(TARGETTYPE)" == "DRIVER" \
  410.        || "$(TARGETTYPE)" == "MINIPORT" \
  411.        || "$(TARGETTYPE)" == "GDI_DRIVER" \
  412.        || "$(TARGETTYPE)" == "EXPORT_DRIVER"
  413. TARGETLIBS=$(TARGETLIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\RuntimeChecks.lib $(DDK_LIB_PATH)\ntoskrnl_dbgprintex.lib
  414. !  else
  415. TARGETLIBS=$(TARGETLIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\RuntimeChecks.lib $(SDK_LIB_PATH)\ntdll.lib
  416. !  endif
  417. ! endif
  418. !endif
  419.  
  420. !if defined(PASS_INDEPENDENT_TARGETS)
  421. !undef SOURCES
  422. !undef LANGUAGE_NEUTRAL_MANAGED_RESOURCES
  423. !undef LANGUAGE_SPECIFIC_MANAGED_RESOURCES
  424. !endif
  425.  
  426. #
  427. # _EVENTS_MANIFEST is passed on the nmake command line by build.exe to indicate
  428. # if believes EVENTS_MANIFEST is defined, even if it was in !if $(386) or such.
  429. #
  430. !if (  defined(EVENTS_MANIFEST) \
  431.     || defined(_EVENTS_MANIFEST) \
  432.     || defined(SLS_LICENSING_MANIFEST) \
  433.     || defined(_SLS_LICENSING_MANIFEST) \
  434.     ) && !defined(MANIFESTONLY)
  435.  
  436. !undef BUILD_PASS_INDEPENDENT
  437.  
  438. !endif
  439.  
  440. #
  441. # move into build.exe for perf
  442. #
  443. !if defined(TARGET_DESTINATION)
  444. _TARGET_DESTINATION_WITHOUT_QUOTES=$(TARGET_DESTINATION:"=)
  445. !endif
  446.  
  447. !ifndef PASS_INDEPENDENT_TARGETS
  448. ! if  !exist($(OBJ_PATH)\$O\_objects.mac)
  449. !  if [-build /O]
  450. !  endif
  451. ! endif
  452. ! include $(OBJ_PATH)\$O\_objects.mac
  453. !endif
  454.  
  455. # CONFIG_CONCURRENCY_MIDL is from the config file -- true or false
  456. # CONCURRENT_MIDL is an override in the source file -- 0 or 1
  457.  
  458. !if ("$(CONFIG_CONCURRENCY_MIDL)" == "true") \
  459.     && ("$(CONCURRENT_MIDL)" != "0") \
  460.     && !defined(SYNCHRONIZE_PASS0_BLOCK) \
  461.     && defined(_CONCURRENT_MIDL_UUID) \
  462.     && defined(_CONCURRENT_MIDL_LOCKDIR) \
  463.  
  464. !  if [mkdir $(_CONCURRENT_MIDL_LOCKDIR)]
  465. !  endif
  466.  
  467. _CONCURRENT_MIDL_RUN=run_concurrent $(_CONCURRENT_MIDL_LOCKDIR)
  468. _CONCURRENT_MIDL_JOIN=join_concurrent $(_CONCURRENT_MIDL_LOCKDIR)
  469.  
  470. !endif
  471.  
  472.  
  473. #
  474. # Translate old redundant public symbols to new internal somewhat redundant symbols.
  475. #
  476. !if defined(MANAGED_CODE)
  477. _C_SHARP=1
  478. !endif
  479. !if defined(MANAGED_VB)
  480. _VB=1
  481. !endif
  482.  
  483. !if "$(TARGETTYPE)" == "CATALOG" || \
  484.     "$(TARGETTYPE)" == "MSI"
  485.  
  486. !  if defined(C_DEFINES)
  487. !     error C_DEFINES may not be defined with TARGETTYPE == $(TARGETTYPE).
  488. !  endif
  489. !  if defined(INCLUDES)
  490. !     error INCLUDES may not be defined with TARGETTYPE == $(TARGETTYPE).
  491. !  endif
  492. !  if defined(TARGETEXT)
  493. !     error TARGETEXT may not be defined with TARGETTYPE == $(TARGETTYPE).
  494. !  endif
  495. !  if defined(DLLDEF_OBJECTS)
  496. !     error DLLDEF_OBJECTS may not be defined with TARGETTYPE == $(TARGETTYPE).
  497. !  endif
  498. !  if defined(LINKLIBS)
  499. !     error LINKLIBS may not be defined with TARGETTYPE == $(TARGETTYPE).
  500. !  endif
  501. !  if defined(TARGETLIBS)
  502. !     error TARGETLIBS may not be defined with TARGETTYPE == $(TARGETTYPE).
  503. !  endif
  504. !  if defined(_C_SHARP)
  505. !     error TARGETTYPE == $(TARGETTYPE) may not include SOURCES=*.cs.
  506. !  endif
  507. !  if defined(MANAGED_CXX)
  508. !     error MANAGED_CXX may not be defined with TARGETTYPE == $(TARGETTYPE).
  509. !  endif
  510. !  if defined(_VB)
  511. !     error TARGETTYPE == $(TARGETTYPE) may not include SOURCES=*.vb.
  512. !  endif
  513. !  if defined(_TLBIMP)
  514. !     error SOURCES=*.tlb may not used with TARGETTYPE == $(TARGETTYPE).
  515. !  endif
  516. !  if defined(UMLIBS)
  517. !     error UMLIBS may not be defined with TARGETTYPE == $(TARGETTYPE).
  518. !  endif
  519. !  if defined(USE_MSVCRT)
  520. !     error USE_MSVCRT may not be defined with TARGETTYPE == $(TARGETTYPE).
  521. !  endif
  522. #...
  523. !else
  524.  
  525. !if defined(COMBOX_SANDBOX)
  526. C_DEFINES = $(C_DEFINES) /DCOMBOX_SANDBOX
  527. !endif
  528.  
  529.  
  530. !endif
  531.  
  532.  
  533. !ifndef PASS_INDEPENDENT_TARGETS
  534.  
  535. !if defined(TARGETPATH)
  536. ! message $(MAKEDIR): TARGETPATH is $(TARGETPATH)
  537. !endif
  538.  
  539. !if defined(TARGETPATHLIB)
  540. ! message $(MAKEDIR): TARGETPATHLIB is $(TARGETPATHLIB)
  541. !endif
  542.  
  543. !if defined(MANAGED_RESOURCES) && defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)
  544. !  error $(MAKEDIR) MANAGED_RESOURCES and LANGUAGE_SPECIFIC_MANAGED_RESOURCES may not both be defined.
  545. !endif
  546.  
  547. !if defined(MANAGED_RESOURCES) && defined(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)
  548. !  error $(MAKEDIR) MANAGED_RESOURCES and LANGUAGE_NEUTRAL_MANAGED_RESOURCES may not both be defined.
  549. !endif
  550.  
  551. !if defined(MANAGED_WIN32_RESOURCE_FILE)
  552. #!  error $(MAKEDIR) MANAGED_WIN32_RESOURCE_FILE in use.
  553. !  message JKSEP2005MARK $(MAKEDIR) MANAGED_WIN32_RESOURCE_FILE in use.
  554. !endif
  555.  
  556.  
  557. !if defined(_C_SHARP) || defined(MANAGED_CXX) || defined(_VB) || defined(_TLBIMP)
  558. _PROJECT_BUILDS_MANAGED_CODE=1
  559. !else
  560.  
  561. # set USE_PHOENIX_GLOBAL=1 (env) to turn on phoenix for everything otherwise default to UTC
  562. !if "$(USE_PHOENIX_GLOBAL)" == "1" && "$(USE_PHOENIX)" == ""
  563. USE_PHOENIX=1
  564. !endif
  565.  
  566. ! if "$(USE_PHOENIX)" == "1"
  567. !  error $(MAKEDIR): Phoenix compiler is no longer supported. Please do not specify USE_PHOENIX.
  568. ! endif
  569.  
  570. !endif
  571.  
  572. !if defined(MSBUILD_XAMLFILES) || defined(MSBUILD_APPDEFFILE) || defined(MSBUILD_RESOURCE) || defined(MSBUILD_TARGETTYPE)
  573. XAML_COMPILATION=1
  574.  
  575. #
  576. # If there is no msbuild project available in current directory, it will compile xaml files to
  577. # the corresponding .g.cs (or .g.vb) and .baml files, all those baml files and the related
  578. # resource files will be embedded into a single targetname.g.resources file.
  579. #
  580. # This .g.resources could be language netrual or language specific, depends on user's setting.
  581. # by default, it is language specific.
  582.  
  583. !  if defined(MSBUILD_XAMLFILES) || defined(MSBUILD_RESOURCE)
  584.  
  585. !   if "$(GENERATE_TEMP_TARGET_FOR_LOCAL_TYPE_REF)" != "true"
  586. MSBUILD_GENERATED_RESOURCE_FILE=$(OBJ_PATH)\$(O)\$(TARGETNAME).g.resources
  587. !    if "$(MSBUILD_GENERATE_LANGUAGE_NEUTRAL_RESOURCE)" == "true"
  588. !     if "$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)" == ""
  589. LANGUAGE_NEUTRAL_MANAGED_RESOURCES=$(MSBUILD_GENERATED_RESOURCE_FILE)
  590. !     else
  591. LANGUAGE_NEUTRAL_MANAGED_RESOURCES=$(MSBUILD_GENERATED_RESOURCE_FILE);$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)
  592. !     endif
  593. !    else
  594.  
  595. !     if "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)" == ""
  596. LANGUAGE_SPECIFIC_MANAGED_RESOURCES=$(MSBUILD_GENERATED_RESOURCE_FILE)
  597. !     else
  598. LANGUAGE_SPECIFIC_MANAGED_RESOURCES=$(MSBUILD_GENERATED_RESOURCE_FILE);$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)
  599. !     endif
  600. !    endif
  601. !   endif   # Not for Local Reference
  602. MSBUILD_GENERATED_FILE_TARGET=$(MSBUILD_GENERATED_RESOURCE_FILE)
  603.  
  604. !  else if defined(MSBUILD_APPDEFFILE)
  605. MSBUILD_GENERATED_FILE_TARGET=$(MSBUILD_APPDEFFILE:.xaml=.g.cs)
  606. !  endif
  607. !endif
  608.  
  609.  
  610. #
  611. # LOCALIZE_NO_MUI is the preferred way to tell the build process that you do
  612. # not want to MUI split something, but that you do want to localize it. This should
  613. # only be used for projects targeting pre-Vista platforms - anything on Vista or
  614. # above should be MUI split and the resulting MUI file is what should be localized.
  615. #
  616. !if defined(LOCALIZE_NO_MUI)
  617. !message LCG: LOCALIZE_NO_MUI: $(LOCALIZE_NO_MUI)
  618. ! if "$(LOCALIZE_NO_MUI)" != "1" && "$(LOCALIZE_NO_MUI)" != "0"
  619. !  error LOCALIZE_NO_MUI must be empty, 1, or 0
  620. ! endif
  621. ! if "$(LOCALIZE_NO_MUI)" == "1"
  622. # NOTE: We can't do this because $(MUI) is set to 1 automatically before the sources file is included, and people test
  623. # for the value of $(MUI) in their sources files. If they set LOCALIZE_NO_MUI=1, we have to assume they wanted no MUI
  624. # and just turn it off - we have no way to distinguish between what was automatically set above vs. what people set
  625. # in their sources file.
  626. #!  if "$(MUI)" == "1"
  627. #!    error LOCALIZE_NO_MUI=1 and MUI=1 are mutally exclusive
  628. #!  endif
  629. BUILD_LCG=1
  630. MUI=0
  631. !  if defined(MUI_COMMENT)
  632. MUI_COMMENT=MUI splitting turned off by LOCALIZE_NO_MUI : $(MUI_COMMENT)
  633. !  else
  634. MUI_COMMENT=MUI splitting turned off by LOCALIZE_NO_MUI
  635. !  endif
  636. ! endif
  637. # See above notes about $(MUI) and sources files
  638. #!else
  639. #! ifndef MUI
  640. #MUI=1
  641. #! endif
  642. !endif
  643.  
  644.  
  645.  
  646. #
  647. # LOCALIZE_NO_MUI_MULTI is the preferred way to tell the build process that you do
  648. # not want to MUI split something, but that you do want to localize it as multilingual.
  649. # This should only be used for projects targeting pre-Vista platforms - anything on Vista
  650. # or above should be MUI split and the resulting MUI file is what should be localized.
  651. #
  652. !if defined(LOCALIZE_NO_MUI_MULTI)
  653. !message LCG: LOCALIZE_NO_MUI_MULTI: $(LOCALIZE_NO_MUI_MULTI)
  654. ! if "$(LOCALIZE_NO_MUI_MULTI)" != "1" && "$(LOCALIZE_NO_MUI_MULTI)" != "0"
  655. !  error LOCALIZE_NO_MUI_MULTI must be empty, 1, or 0
  656. ! endif
  657. ! if "$(LOCALIZE_NO_MUI_MULTI)" == "1"
  658. !  if "$(LOCALIZE_NO_MUI)" == "1"
  659. !   error LOCALIZE_NO_MUI_MULTI=1 and LOCALIZE_NO_MUI=1 are mutally exclusive
  660. !  endif
  661. BUILD_LCG=1
  662. MUI=0
  663. !  if defined(MUI_COMMENT)
  664. MUI_COMMENT=MUI splitting turned off by LOCALIZE_NO_MUI_MULTI : $(MUI_COMMENT)
  665. !  else
  666. MUI_COMMENT=MUI splitting turned off by LOCALIZE_NO_MUI_MULTI
  667. !  endif
  668. ! endif
  669. !endif
  670.  
  671.  
  672. #
  673. # LOCALIZE_MUI_MULTI is the preferred way to tell the build process that you want
  674. # to localize your .mui files as multilingual.
  675. #
  676. !if defined(LOCALIZE_MUI_MULTI)
  677. !message LCG: LOCALIZE_MUI_MULTI: $(LOCALIZE_MUI_MULTI)
  678. ! if "$(LOCALIZE_MUI_MULTI)" != "1" && "$(LOCALIZE_MUI_MULTI)" != "0"
  679. !  error LOCALIZE_MUI_MULTI must be empty, 1, or 0
  680. ! endif
  681. ! if "$(LOCALIZE_MUI_MULTI)" == "1"
  682. !  if "$(LOCALIZE_NO_MUI)" == "1"
  683. !   error LOCALIZE_MUI_MULTI=1 and LOCALIZE_NO_MUI=1 are mutally exclusive
  684. !  endif
  685. !  if "$(LOCALIZE_NO_MUI_MULTI)" == "1"
  686. !   error LOCALIZE_MUI_MULTI=1 and LOCALIZE_NO_MUI_MULTI=1 are mutally exclusive
  687. !  endif
  688. BUILD_LCG=1
  689. MUI=1
  690. BINPLACE_FLAGS=$(BINPLACE_FLAGS) /G5 $(LOC_MULTI)
  691. ! endif
  692. !endif
  693.  
  694.  
  695.  
  696.  
  697. #
  698. # Ban LINKER_FLAGS containing managed resource stuff unless it is test code or language neutral.
  699. # Ban USER_CS_FLAGS <ditto>.
  700. #
  701. !if !defined(TEST_CODE) && "$(MUI)" != "0" && "$(LANGUAGE_NEUTRAL)" != "0" # { {
  702.  
  703. !if "$(LINKER_FLAGS)" != "" # { {
  704.  
  705. _LINKER_FLAGS_LOWERCASE=$(LINKER_FLAGS)
  706.  
  707. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:A=a)
  708. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:B=b)
  709. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:C=c)
  710. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:D=d)
  711. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:E=e)
  712. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:F=f)
  713. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:G=g)
  714. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:H=h)
  715. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:I=i)
  716. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:J=j)
  717. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:K=k)
  718. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:L=l)
  719. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:M=m)
  720. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:N=n)
  721. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:O=o)
  722. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:P=p)
  723. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:Q=q)
  724. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:R=r)
  725. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:S=s)
  726. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:T=t)
  727. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:U=u)
  728. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:V=v)
  729. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:W=w)
  730. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:X=x)
  731. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:Y=y)
  732. _LINKER_FLAGS_LOWERCASE=$(_LINKER_FLAGS_LOWERCASE:Z=z)
  733.  
  734. _LINKER_FLAGS_LOWERCASE_SLASH=$(_LINKER_FLAGS_LOWERCASE:-=/)
  735.  
  736. !if "$(_LINKER_FLAGS_LOWERCASE_SLASH:/assemblyresource=)" != "$(_LINKER_FLAGS_LOWERCASE_SLASH)"
  737. ! error $(MAKEDIR) LINKER_FLAGS may not contain /assemblyresource. Use LANGUAGE_NEUTRAL_MANAGED_RESOURCES instead.
  738. !endif
  739.  
  740. !if "$(_LINKER_FLAGS_LOWERCASE_SLASH:/assemblylinkresource=)" != "$(_LINKER_FLAGS_LOWERCASE_SLASH)"
  741. ! error $(MAKEDIR) LINKER_FLAGS may not contain /assemblylinkresource. Use embedded resources instead, via LANGUAGE_NEUTRAL_MANAGED_RESOURCES.
  742. !endif
  743.  
  744. !endif # } }
  745.  
  746. !if "$(USER_CS_FLAGS)" != "" # { {
  747.  
  748. _USER_CS_FLAGS_LOWERCASE=$(USER_CS_FLAGS)
  749. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:A=a)
  750. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:B=b)
  751. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:C=c)
  752. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:D=d)
  753. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:E=e)
  754. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:F=f)
  755. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:G=g)
  756. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:H=h)
  757. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:I=i)
  758. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:J=j)
  759. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:K=k)
  760. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:L=l)
  761. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:M=m)
  762. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:N=n)
  763. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:O=o)
  764. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:P=p)
  765. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:Q=q)
  766. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:R=r)
  767. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:S=s)
  768. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:T=t)
  769. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:U=u)
  770. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:V=v)
  771. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:W=w)
  772. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:X=x)
  773. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:Y=y)
  774. _USER_CS_FLAGS_LOWERCASE=$(_USER_CS_FLAGS_LOWERCASE:Z=z)
  775.  
  776. _USER_CS_FLAGS_LOWERCASE_SLASH=$(_USER_CS_FLAGS_LOWERCASE:-=/)
  777.  
  778. !if "$(_USER_CS_FLAGS_LOWERCASE_SLASH:/res=)" != "$(_USER_CS_FLAGS_LOWERCASE_SLASH)"
  779. ! message $(MAKEDIR) USER_CS_FLAGS may not contain /resources, use LANGUAGE_NEUTRAL_MANAGED_RESOURCES or LANGUAGE_SPECIFIC_MANAGED_RESOURCES instead.
  780. !endif
  781.  
  782. !if "$(_USER_CS_FLAGS_LOWERCASE_SLASH:/linkres=)" != "$(_USER_CS_FLAGS_LOWERCASE_SLASH)"
  783. ! message $(MAKEDIR) USER_CS_FLAGS may not contain /linkresource. Use embedded resources instead, via and LANGUAGE_NEUTRAL_MANAGED_RESOURCES, or embed resources into a satellite assembly using LANGUAGE_SPECIFIC_MANAGED_RESOURCES.
  784. !endif
  785.  
  786. !if "$(_USER_CS_FLAGS_LOWERCASE_SLASH:/win32res=)" != "$(_USER_CS_FLAGS_LOWERCASE_SLASH)"
  787. ! message $(MAKEDIR) USER_CS_FLAGS may not contain /win32res. Use LANGUAGE_SPECIFIC_MANAGED_WIN32_RESOURCE_FILE or LANGUAGE_NEUTRAL_MANAGED_WIN32_RESOURCE_FILE.
  788. !endif
  789.  
  790. !endif # } }
  791.  
  792. !endif # } }
  793.  
  794.  
  795. !if defined(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)
  796.  
  797. ! if "$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)" == ""
  798. !  error LANGUAGE_NEUTRAL_MANAGED_RESOURCES may not be empty.
  799. ! endif
  800.  
  801. ! if !defined(_PROJECT_BUILDS_MANAGED_CODE)
  802. !  error LANGUAGE_NEUTRAL_MANAGED_RESOURCES may not be defined without MANAGED_CXX | SOURCES=*.cs | SOURCES=*.vb.
  803. ! endif
  804. ! if "$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES: -=)" != "$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)" \
  805.         || "$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES:/=)" != "$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES)"
  806. !   error LANGUAGE_NEUTRAL_MANAGED_RESOURCES may not contain switches (no dash or forward slash).
  807. ! endif
  808.  
  809. ! if defined(MANAGED_CXX)
  810. _LANGUAGE_NEUTRAL_MANAGED_RESOURCES_LINKER_FLAGS=$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES: =)
  811. _LANGUAGE_NEUTRAL_MANAGED_RESOURCES_LINKER_FLAGS=/assemblyresource:$(_LANGUAGE_NEUTRAL_MANAGED_RESOURCES_LINKER_FLAGS:;= /assemblyresource:)
  812. LINKER_FLAGS=$(LINKER_FLAGS) $(_LANGUAGE_NEUTRAL_MANAGED_RESOURCES_LINKER_FLAGS) # TBD remove this line
  813. ! else
  814. _LANGUAGE_NEUTRAL_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS=$(LANGUAGE_NEUTRAL_MANAGED_RESOURCES: =)
  815. _LANGUAGE_NEUTRAL_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS=/resource:$(_LANGUAGE_NEUTRAL_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS:;= /resource:)
  816. ! endif
  817.  
  818. !endif
  819.  
  820. !if defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)
  821.  
  822. ! if "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)" == ""
  823. !  error LANGUAGE_SPECIFIC_MANAGED_RESOURCES may not be empty.
  824. ! endif
  825.  
  826. ! if !defined(_PROJECT_BUILDS_MANAGED_CODE)
  827. !  error LANGUAGE_SPECIFIC_MANAGED_RESOURCES may not be defined without MANAGED_CXX | SOURCES=*.cs | SOURCES=*.vb.
  828. ! endif
  829. ! if "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES: -=)" != "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)" \
  830.         || "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES:/=)" != "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)"
  831. !   error LANGUAGE_SPECIFIC_MANAGED_RESOURCES may not contain switches (no dash or forward slash).
  832. ! endif
  833.  
  834. _LANGUAGE_SPECIFIC_MANAGED_RESOURCES_AL_FLAGS=$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES: =)
  835. _LANGUAGE_SPECIFIC_MANAGED_RESOURCES_AL_FLAGS=/embedresource:$(_LANGUAGE_SPECIFIC_MANAGED_RESOURCES_AL_FLAGS:;= /embedresource:)
  836.  
  837. ! if defined(MANAGED_CXX)
  838. _LANGUAGE_SPECIFIC_MANAGED_RESOURCES_LINKER_FLAGS=$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES: =)
  839. _LANGUAGE_SPECIFIC_MANAGED_RESOURCES_LINKER_FLAGS=/assemblyresource:$(_LANGUAGE_SPECIFIC_MANAGED_RESOURCES_LINKER_FLAGS:;= /assemblyresource:)
  840. LINKER_FLAGS=$(LINKER_FLAGS) $(_LANGUAGE_SPECIFIC_MANAGED_RESOURCES_LINKER_FLAGS) # TBD remove this line
  841. ! else
  842. _LANGUAGE_SPECIFIC_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS=$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES: =)
  843. _LANGUAGE_SPECIFIC_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS=/resource:$(_LANGUAGE_SPECIFIC_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS:;= /resource:)
  844. ! endif
  845.  
  846. ! if "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES:,=)" != "$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)"
  847. !  message JKSEP2005MARK $(MAKEDIR) unable to state _MANAGED_RESOURCES_SATELLITE_ASSEMBLY_DEPENDENCIES.
  848. _MANAGED_RESOURCES_SATELLITE_ASSEMBLY_DEPENDENCIES=$(SOURCES_USED) $(SOURCES)
  849. ! else
  850. _MANAGED_RESOURCES_SATELLITE_ASSEMBLY_DEPENDENCIES=$(LANGUAGE_SPECIFIC_MANAGED_RESOURCES:;= )
  851. ! endif
  852.  
  853. !endif
  854.  
  855. !if defined(USE_STL) && !defined(STL_VER)
  856. STL_VER=70
  857. !endif
  858.  
  859. #
  860. # SUPPRESS_STL_WARNINGS should be cleaned out of the tree in
  861. # deference to specific uses of MSC_WARNING_LEVEL.
  862. #
  863. !if defined(SUPPRESS_STL_WARNINGS) && "$(SUPPRESS_STL_WARNINGS)" != "1"
  864. !  error $(MAKEDIR) SUPPRESS_STL_WARNINGS must be 1 or not defined.
  865. !endif
  866.  
  867. !if defined(SUPPRESS_STL_WARNINGS) && "$(STL_VER)" != "70"
  868. !  error $(MAKEDIR) SUPPRESS_STL_WARNINGS is only valid when STL_VER == 70.
  869. !endif
  870.  
  871. !if defined(SUPPRESS_STL_WARNINGS)
  872. #
  873. # 4018 signed/unsigned mismatch
  874. # 4114 same type qualifier used more than once
  875. # 4146 unary minus operator applied to unsigned type, result still unsigned
  876. # 4244 conversion, possible loss of data
  877. # 4245 combination of 4018 and 4244
  878. # 4290 C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
  879. #
  880. # /D_STL70_ at end seems wrong but there is some problem with precompiled headers otherwise.
  881. #
  882. _STL70_WARNINGS=/wd4018 /wd4144 /wd4146 /wd4244 /wd4245 /wd4290 /D_STL70_
  883. !endif
  884.  
  885. !if defined(OLD_AUTO_PTR) && defined(USE_STL) && "$(STL_VER)" == "70"
  886. _STL70_WARNINGS=$(_STL70_WARNINGS) /D_OLD_AUTO_PTR
  887. !endif
  888.  
  889. !if defined(_AUTO_PTR_HAZARD) && defined(USE_STL) && "$(STL_VER)" == "70"
  890. _STL70_WARNINGS=$(_STL70_WARNINGS) /D_AUTO_PTR_HAZARD
  891. !endif
  892.  
  893. !if defined(_STREAM_WCHAR_T_HAZARD) && defined(USE_STL)
  894. _STL70_WARNINGS=$(_STL70_WARNINGS) /D_STREAM_WCHAR_T_HAZARD
  895. !endif
  896.  
  897. !ifdef PASS1_LINK
  898. MAKEDLL=1
  899. !undef NOLINK
  900. !endif
  901. !if defined(_C_SHARP) || defined(_VB) || defined(_TLBIMP)
  902. MAKEDLL=1
  903. !undef NOLINK
  904. !undef PASS1_NOLIB
  905. !endif
  906.  
  907. !if defined(MCPP_TYPE) && !defined(MANAGED_CXX)
  908. !  error MCPP_TYPE cannot be defined without MANAGED_CXX.
  909. !endif
  910. !if defined(MCPP_TYPE) && "$(URT_VER)" < "2."
  911. !  error MCPP_TYPE cannot be defined for URT_VER < 2.
  912. !endif
  913. !if defined(MANAGED_CXX) && defined(USE_STL) && "$(STL_VER)" != "70"
  914. !  error If managed C++ uses STL, it must use the default STL -- remove STL_VER.
  915. !endif
  916.  
  917. !if defined(MANAGED_CXX) && "$(URT_VER)" >= "2.0"
  918. _USE_LIBCMMT=1
  919. !endif
  920.  
  921. !endif # PASS_INDEPENDENT_TARGETS
  922.  
  923. !if "$(URT_VER)" != "2.0"
  924. _URTRUN_20=$(_PERL) $(RAZZLETOOLPATH)\urtrun.pl 2.0
  925. !else
  926. _URTRUN_20=
  927. !endif
  928.  
  929. !if $(USE_OBJECT_ROOT) # { {
  930.  
  931. !if "$(DLLDEF)" == "$O\$(TARGETNAME).def"
  932. DLLDEF=$(OBJ_PATH)\$O\$(TARGETNAME).def
  933. !elseif "$(DLLDEF)" == "$O\$(TARGETNAME).DEF"
  934. DLLDEF=$(OBJ_PATH)\$O\$(TARGETNAME).DEF
  935. !endif
  936.  
  937. !if "$(TARGETPATH)" == "" || "$(TARGETPATH)" == "obj" || "$(TARGETPATH)" == "OBJ" || "$(TARGETPATH)" == "$(_OBJ_DIR)"
  938. TARGETPATH=$(OBJ_PATH)\$(_OBJ_DIR)
  939. !endif
  940.  
  941. !if "$(TARGETPATHLIB)" == "obj" || "$(TARGETPATHLIB)" == "OBJ" || "$(TARGETPATHLIB)" == "$(_OBJ_DIR)"
  942. TARGETPATHLIB=$(OBJ_PATH)\$(_OBJ_DIR)
  943. !endif
  944.  
  945. !if "$(TARGETPATH)" == "..\$(_OBJ_DIR)"
  946. TARGETPATH=$(OBJ_PATH)\..\$(_OBJ_DIR)
  947. !endif
  948.  
  949. !if "$(TARGETPATHLIB)" == "..\$(_OBJ_DIR)"
  950. TARGETPATHLIB=$(OBJ_PATH)\..\$(_OBJ_DIR)
  951. !endif
  952.  
  953. !if "$(MC_SOURCEDIR)" == "$O"
  954. MC_SOURCEDIR=$(OBJ_PATH)\$(O)
  955. !endif
  956.  
  957. !if "$(PASS0_HEADERDIR)" == "$O"
  958. PASS0_HEADERDIR=$(OBJ_PATH)\$(O)
  959. !endif
  960.  
  961. !if "$(PASS0_CLIENTDIR)" == "$O"
  962. PASS0_CLIENTDIR=$(OBJ_PATH)\$(O)
  963. !endif
  964.  
  965. !if "$(PASS0_SERVERDIR)" == "$O"
  966. PASS0_SERVERDIR=$(OBJ_PATH)\$(O)
  967. !endif
  968.  
  969. !if "$(PASS0_SOURCEDIR)" == "$O"
  970. PASS0_SOURCEDIR=$(OBJ_PATH)\$(O)
  971. !endif
  972.  
  973. !if "$(MIDL_TLBDIR)" == "$O"
  974. MIDL_TLBDIR=$(OBJ_PATH)\$O
  975. !endif
  976.  
  977. !if "$(MIDL_UUIDDIR)" == "$O"
  978. MIDL_UUIDDIR=$(OBJ_PATH)\$O
  979. !endif
  980.  
  981. !else  # } {
  982.  
  983. OBJ_PATH=$(MAKEDIR)
  984.  
  985. !if "$(TARGETPATH)" == "" || "$(TARGETPATH)" == "obj" || "$(TARGETPATH)" == "OBJ"
  986. TARGETPATH=$(_OBJ_DIR)
  987. !endif
  988.  
  989. !if "$(TARGETPATHLIB)" == "obj" || "$(TARGETPATHLIB)" == "OBJ"
  990. TARGETPATHLIB=$(_OBJ_DIR)
  991. !endif
  992.  
  993. !endif # } }
  994.  
  995. !if defined(ALT_PROJECT_TARGET)
  996. ALT_PROJECT_TARGET_OBJ=$(OBJ_PATH)\$(ALT_PROJECT_TARGET)
  997. !endif
  998.  
  999. !if "$(TARGETPATH)" != ""
  1000. ! if !exist($(TARGETPATH)\$(TARGET_DIRECTORY))
  1001. !  if [mkdir $(TARGETPATH)\$(TARGET_DIRECTORY) 2>nul]
  1002. !  endif
  1003. ! endif
  1004. !endif
  1005.  
  1006. !if "$(TARGETPATHLIB)" != ""
  1007. ! if !exist($(TARGETPATHLIB)\$(TARGET_DIRECTORY))
  1008. !  if [mkdir $(TARGETPATHLIB)\$(TARGET_DIRECTORY) 2>nul]
  1009. !  endif
  1010. ! endif
  1011. !endif
  1012.  
  1013. !if !$(WIN64)
  1014. SUBSYSTEM_400 = 4.00
  1015. SUBSYSTEM_410 = 4.10
  1016. SUBSYSTEM_500 = 5.00
  1017. SUBSYSTEM_501 = 5.01
  1018. !else
  1019. SUBSYSTEM_400 = 5.02
  1020. SUBSYSTEM_410 = 5.02
  1021. SUBSYSTEM_500 = 5.02
  1022. SUBSYSTEM_501 = 5.02
  1023. !endif
  1024. SUBSYSTEM_502 = 5.02
  1025. SUBSYSTEM_600 = 6.00
  1026. SUBSYSTEM_601 = 6.01
  1027.  
  1028. LINKER_APP_VERSION          =6.1
  1029. LINKER_OS_VERSION           =6.1
  1030.  
  1031.  
  1032. !if defined(_NT_TARGET_VERSION)
  1033. _CHECK_NT_TARGET_VERSION=$(_NT_TARGET_VERSION)
  1034. _CHECK_NT_TARGET_VERSION=$(_CHECK_NT_TARGET_VERSION: =)
  1035. _CHECK_NT_TARGET_VERSION=$(_CHECK_NT_TARGET_VERSION:0x0=0x)
  1036. !if "$(_CHECK_NT_TARGET_VERSION)" != "$(_NT_TARGET_VERSION_WINXP)" \
  1037.     && "$(_CHECK_NT_TARGET_VERSION)" != "$(_NT_TARGET_VERSION_WS03)" \
  1038.     && "$(_CHECK_NT_TARGET_VERSION)" != "$(_NT_TARGET_VERSION_VISTA)" \
  1039.     && "$(_CHECK_NT_TARGET_VERSION)" != "$(_NT_TARGET_VERSION_WIN7)" \
  1040.     && "$(_CHECK_NT_TARGET_VERSION)" != "$(_NT_TARGET_VERSION_LATEST)"
  1041. # multi line errors require the older !message style
  1042. !message NMAKE : _NT_TARGET_VERSION value is unknown.
  1043. !message NMAKE : _NT_TARGET_VERSION is misspecified.
  1044. !message NMAKE : The valid values are:
  1045. !message NMAKE : $$(_NT_TARGET_VERSION_WINXP)
  1046. !message NMAKE : $$(_NT_TARGET_VERSION_WS03)
  1047. !message NMAKE : $$(_NT_TARGET_VERSION_VISTA)
  1048. !message NMAKE : $$(_NT_TARGET_VERSION_WIN7)
  1049. !message NMAKE : $$(_NT_TARGET_VERSION_LATEST)
  1050. # This is usually defaulted in makefile.plt and the default is not exposed.
  1051. # If we don't change the value here, we get a nonsensical error message.
  1052. _NT_TARGET_VERSION=$(__LATEST_NT_TARGET_VERSION)
  1053. !endif
  1054. !else
  1055. _NT_TARGET_VERSION=$(__LATEST_NT_TARGET_VERSION)
  1056. !endif
  1057.  
  1058.  
  1059. LIB_WLH=1
  1060.  
  1061. #
  1062. # Set versions correctly for NT4/2000/XP/Longhorn
  1063. #
  1064.  
  1065.  
  1066. !if $(WIN64) && \
  1067.      (($(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_WINXP)) || \
  1068.       ($(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_WIN2K)) || \
  1069.       ($(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_NT4)))
  1070. # Lowest NT_TARGET_VERSION for Win64 is WS03
  1071. _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WS03)
  1072. LIB_WLH=0
  1073. !endif
  1074.  
  1075.  
  1076. !if $(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_WIN7)         ## Windows "7" ##
  1077. CURRENT_NTDDI_VERSION       =$(LATEST_NTDDI_VERSION)
  1078. CURRENT_WIN32_IE_VERSION    =$(LATEST_WIN32_IE_VERSION)
  1079. CURRENT_WIN32_WINNT_VERSION =$(LATEST_WIN32_WINNT_VERSION)
  1080. SUBSYSTEM_VERSION_LATEST    =6.01
  1081. SUBSYSTEM_VERSION_CURRENT   =$(SUBSYSTEM_VERSION_LATEST)
  1082. CATALOG_OS_VERSION          =2:6.1
  1083.  
  1084. !elseif $(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_VISTA)    ## Windows Vista ##
  1085. CURRENT_NTDDI_VERSION       =0x06000100
  1086. CURRENT_WIN32_IE_VERSION    =0x0700
  1087. CURRENT_WIN32_WINNT_VERSION =0x0600
  1088. SUBSYSTEM_VERSION_LATEST    =6.00
  1089. CATALOG_OS_VERSION          =2:6.0
  1090.  
  1091. !elseif $(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_WS03)     ## Windows Server 2003 ##
  1092. CURRENT_NTDDI_VERSION       =0x05020100
  1093. # Server 2003 gold has _WIN32_IE=0x0602, and Server 2003 SP1 has _WIN32_IE=0x0603
  1094. CURRENT_WIN32_IE_VERSION    =0x0603
  1095. CURRENT_WIN32_WINNT_VERSION =0x0502
  1096. SUBSYSTEM_VERSION_LATEST    =5.02
  1097. CATALOG_OS_VERSION          =2:5.2
  1098.  
  1099.  
  1100. !message BUILDMSG: _NT_TARGET_VERSION SET TO WS03
  1101. SDK_LIB_DEST=$(BASEDIR)\lib\wnet
  1102. DDK_LIB_DEST=$(SDK_LIB_DEST)
  1103. IFSKIT_LIB_DEST=$(SDK_LIB_DEST)
  1104. SDK_LIB_PATH=$(BASEDIR)\lib\wnet\*
  1105. DDK_LIB_PATH=$(SDK_LIB_PATH)
  1106. HALKIT_LIB_PATH=$(SDK_LIB_PATH)
  1107. IFSKIT_LIB_PATH=$(SDK_LIB_PATH)
  1108. LIB_WLH=0
  1109.  
  1110.  
  1111. !elseif $(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_WINXP)    ## Windows XP ##
  1112. # XP gold has _WIN32_IE=0x0600, XP SP1 has _WIN32_IE=0x0601, and XPSP2 _WIN32_IE=0x0603
  1113. CURRENT_NTDDI_VERSION       =0x05010200
  1114. CURRENT_WIN32_IE_VERSION    =0x0603
  1115. CURRENT_WIN32_WINNT_VERSION =0x0501
  1116. SUBSYSTEM_VERSION_LATEST    =$(SUBSYSTEM_501)
  1117. CATALOG_OS_VERSION          =2:5.1
  1118.  
  1119.  
  1120.  
  1121. !message BUILDMSG: _NT_TARGET_VERSION SET TO WINXP
  1122. SDK_LIB_DEST=$(BASEDIR)\lib\wxp
  1123. DDK_LIB_DEST=$(SDK_LIB_DEST)
  1124. IFSKIT_LIB_DEST=$(SDK_LIB_DEST)
  1125. SDK_LIB_PATH=$(BASEDIR)\lib\wxp\*
  1126. DDK_LIB_PATH=$(SDK_LIB_PATH)
  1127. HALKIT_LIB_PATH=$(SDK_LIB_PATH)
  1128. IFSKIT_LIB_PATH=$(SDK_LIB_PATH)
  1129. LIB_WLH=0
  1130.  
  1131.  
  1132. !elseif $(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_WIN2K)    ## Windows 2000 ##
  1133. CURRENT_NTDDI_VERSION      =0x05000400
  1134. CURRENT_WIN32_IE_VERSION   =0x0501
  1135. CURRENT_WIN32_WINNT_VERSION=0x0500
  1136. SUBSYSTEM_VERSION_LATEST   =$(SUBSYSTEM_500)
  1137. CATALOG_OS_VERSION          =2:5.0
  1138.  
  1139. !elseif $(_NT_TARGET_VERSION) == $(_NT_TARGET_VERSION_NT4)      ## Windows NT 4 ##
  1140. CURRENT_NTDDI_VERSION      =0x04000600
  1141. CURRENT_WIN32_IE_VERSION   =0x0200
  1142. CURRENT_WIN32_WINNT_VERSION=0x0400
  1143. SUBSYSTEM_VERSION_LATEST   =$(SUBSYSTEM_400)
  1144. !else
  1145. !message NMAKE : Uxxxx: _NT_TARGET_VERSION value is unknown.  Update Makefile.def to understand the new version.
  1146. !endif # _NT_TARGET_VERSION
  1147.  
  1148.  
  1149. !if "$(POCKETPC)" != ""
  1150. ! if "$(POCKETPC_EMULATION)" != ""
  1151. WINCE_IMAGE = -WINDOWSCE:EMULATION
  1152. ! else
  1153. WINCE_IMAGE = -WINDOWSCE
  1154. ! endif
  1155. CVTRES_PLATFORM_FLAGS = $(WINCE_IMAGE)
  1156. !endif
  1157.  
  1158. !if defined(TEST_CODE)
  1159. C_DEFINES=$(C_DEFINES) /DTEST_CODE
  1160. !else if $(WIN64) && !defined(NTTESTENV)
  1161. LINK_TIME_CODE_GENERATION=1
  1162. !endif
  1163.  
  1164. #
  1165. # move into build.exe for perf
  1166. #
  1167. !if defined(TEST_CODE) && "$(MAKEDIR_LOWERCASE:\testsrc\=)" == "$(MAKEDIR_LOWERCASE)"
  1168. !  message $(MAKEDIR) building test code in dev tree
  1169. !endif
  1170.  
  1171. BINPLACE_FLAGS=$(BINPLACE_FLAGS) /:CVTCIL
  1172.  
  1173. !if (defined(LINK_TIME_CODE_GENERATION) && !defined(FORCENATIVEOBJECT)) && \
  1174.     (defined(LTCG_NTNOPCH) || \
  1175.     (defined(PASS1_PUBLISH) && \
  1176.     "$(BUILD_PASS)" != "PASS0" && \
  1177.     "$(BUILD_PASS)" != "PASS2" && \
  1178.     !defined(NOLIB) && \
  1179.     "$(TARGETTYPE)" != "DYNLINK" && \
  1180.     "$(TARGETTYPE)" != "PROGLIB" && \
  1181.     "$(TARGETTYPE)" != "EXPORT_DRIVER"))
  1182. # LTCG with PCH encodes a hardcoded path to the PCH file - disable pch if publishing.
  1183. NTNOPCH=1
  1184. !endif
  1185.  
  1186. !if "$(_TARGET_DESTINATION_WITHOUT_QUOTES)" != ""
  1187. BINPLACE_TARGET_FLAGS= /:DEST $(TARGET_DESTINATION)
  1188. !endif
  1189.  
  1190. # Support to compile licensing manifest
  1191. !if defined(SLS_LICENSING_MANIFEST)
  1192. !    include $(RAZZLETOOLPATH)\licensing.inc
  1193. !endif
  1194.  
  1195. #
  1196. # LocStudio-related settings that have to be set very early
  1197. #
  1198.  
  1199.  
  1200. # The parser LSBuild uses can be specified on a per-project
  1201. # basis by defining LSBUILD_PARSER_ID in the sources file.
  1202. !if defined(LSBUILD_PARSER_ID)
  1203. LSBUILD_PARSER_ID_OPTION=/p:$(LSBUILD_PARSER_ID)
  1204. !else
  1205. LSBUILD_PARSER_ID_OPTION=
  1206. !endif
  1207.  
  1208. # We need to use a specific parser for files we know are managed code.
  1209. !if defined(LSBUILD_PARSER_ID_MANAGED)
  1210. LSBUILD_PARSER_ID_OPTION_MANAGED=/p:$(LSBUILD_PARSER_ID_MANAGED)
  1211. !else
  1212. LSBUILD_PARSER_ID_OPTION_MANAGED=/p:211
  1213. !endif
  1214.  
  1215. # The alternate LCI directory can be specified on a per-project
  1216. # basis by defining ALT_LCI_DIR in the sources file.
  1217. !if defined(ALT_LCI_DIR)
  1218. ALT_LCI_DIR_OPTION=/d:$(ALT_LCI_DIR)
  1219. !else
  1220. ALT_LCI_DIR_OPTION=
  1221. !endif
  1222.  
  1223. # LSBUILD generated LCG files binplace to $(_NTTREE)\$(LCG_BINPLACE_ROOT)
  1224. !if "$(LCG_BINPLACE_ROOT: =)" == ""
  1225. LCG_BINPLACE_ROOT=$(LOC_LCG)
  1226. LCG_BINPLACE_ROOT_MANAGED=$(LCG_BINPLACE_ROOT)\managed
  1227. !endif
  1228.  
  1229. # Adjust the LCG binplace root as needed...
  1230. !if "$(ALT_PROJECT_TARGET)" == ""
  1231. LCG_BINPLACE_TARGET=$(LCG_BINPLACE_ROOT)
  1232. LCG_BINPLACE_TARGET_MANAGED=$(LCG_BINPLACE_ROOT_MANAGED)
  1233. !else
  1234. LCG_BINPLACE_TARGET=$(LCG_BINPLACE_ROOT)\$(ALT_PROJECT_TARGET)
  1235. LCG_BINPLACE_TARGET_MANAGED=$(LCG_BINPLACE_ROOT_MANAGED)\$(ALT_PROJECT_TARGET)
  1236. !endif
  1237.  
  1238. # Define the right binplace locations for the localizable and neutral perf counters
  1239. PERF_INI_DIR_LS=perfINI_LS
  1240. PERF_INI_DIR_LN=perfINI_LN
  1241. LOC_PERF_COUNTERS_TARGET_DESTINATION=$(LOC_BIN)\$(PERF_INI_DIR_LS)
  1242. PERF_COUNTERS_TARGET_DESTINATION=$(PERF_INI_DIR_LN)
  1243. ! if "$(_TARGET_DESTINATION_WITHOUT_QUOTES)" != "" && "$(_TARGET_DESTINATION_WITHOUT_QUOTES)" != "retail"
  1244. LOC_PERF_COUNTERS_TARGET_DESTINATION=$(LOC_PERF_COUNTERS_TARGET_DESTINATION)\$(TARGET_DESTINATION)
  1245. PERF_COUNTERS_TARGET_DESTINATION=$(PERF_COUNTERS_TARGET_DESTINATION)\$(TARGET_DESTINATION)
  1246. ! endif
  1247.  
  1248. # Define the right binplace locations for the localizable and neutral msc files
  1249. MSC_FILES_DIR_LS=MSCFiles_LS
  1250. MSC_FILES_DIR_LN=MSCFiles_LN
  1251. LOC_MSC_FILES_TARGET_DESTINATION=$(LOC_BIN)\$(MSC_FILES_DIR_LS)
  1252. MSC_FILES_TARGET_DESTINATION=$(MSC_FILES_DIR_LN)
  1253. ! if "$(_TARGET_DESTINATION_WITHOUT_QUOTES)" != "" && "$(_TARGET_DESTINATION_WITHOUT_QUOTES)" != "retail"
  1254. LOC_MSC_FILES_TARGET_DESTINATION=$(LOC_MSC_FILES_TARGET_DESTINATION)\$(TARGET_DESTINATION)
  1255. MSC_FILES_TARGET_DESTINATION=$(MSC_FILES_TARGET_DESTINATION)\$(TARGET_DESTINATION)
  1256. ! endif
  1257.  
  1258. #
  1259. # Decide if we should build LCG files for CMI_MANIFESTS.
  1260. # This is similar to setting BUILD_LCG.
  1261. #
  1262. # We will create LCG files if:
  1263. #
  1264. # - one of the following is true:
  1265. #   - The developer specifies BUILD_CMI_LCG=1 in their sources file
  1266. #   - We are NOT building test code
  1267. #
  1268. !if "$(BUILD_CMI_LCG)" != ""
  1269. !message LCG: BUILD_CMI_LCG: $(BUILD_CMI_LCG)
  1270. ! if "$(BUILD_CMI_LCG)" != "1" && "$(BUILD_CMI_LCG)" != "0"
  1271. !  error BUILD_CMI_LCG must be empty, 1, or 0
  1272. ! endif
  1273.  
  1274. !elseif defined(TEST_CODE)
  1275. BUILD_CMI_LCG=0
  1276.  
  1277. !else
  1278. BUILD_CMI_LCG=1
  1279. !endif
  1280.  
  1281. #
  1282. # LOCALIZE_BASE_FILE is for forcing the base file (after MUI splitting)
  1283. # to get localized as a multilingual file. It is expected to be used with
  1284. # "driver" or "kernel" style MUI splitting where a copy of the resources
  1285. # is left in the "base" DLL/EXE/etc. as well as a copy being placed into
  1286. # the .MUI file. This is needed for printer drivers that need to be
  1287. # localized because in that case we need to localize both the base DLL
  1288. # _and_ the MUI file. Setting this will cause an LCG file to get created
  1289. # for the base file and cause the base file to be binplaced to such that
  1290. # it passes through the multi-lingual localization process. The binplacing
  1291. # of the .mui file and it's associated LCG is not affected.
  1292. #
  1293. !if defined(LOCALIZE_BASE_FILE)
  1294. !message LCG: LOCALIZE_BASE_FILE: $(LOCALIZE_BASE_FILE)
  1295. ! if "$(LOCALIZE_BASE_FILE)" != "1" && "$(LOCALIZE_BASE_FILE)" != "0"
  1296. !  error LOCALIZE_BASE_FILE must be empty, 1, or 0
  1297. ! endif
  1298. ! if "$(LOCALIZE_NO_MUI)" == "1"
  1299. !  error LOCALIZE_BASE_FILE cannot be used if LOCALIZE_NO_MUI is turned on (LOCALIZE_NO_MUI=1)
  1300. ! endif
  1301. ! if "$(MUI)" != "1"
  1302. !  error LOCALIZE_BASE_FILE cannot be used if MUI splitting is turned off (MUI=0)
  1303. ! endif
  1304. !endif
  1305.  
  1306. # Make sure we don't use LOCALIZE_BASE_FILE when it should not be used
  1307. !if "$(LOCALIZE_BASE_FILE)" == "1"
  1308. ! if ("$(TARGET_DESTINATION::=)" != "$(TARGET_DESTINATION)")
  1309. !  error LOCALIZE_BASE_FILE can not be used with multiple target destinations
  1310. ! endif
  1311. !endif
  1312.  
  1313. # Make sure no older/unsupported macros get used
  1314. !if defined(LANG_MISCFILES)
  1315. ! error LANG_MISCFILES has been deprecated. Use the proper PASSx_LANG_MISCFILES version instead.
  1316. !endif
  1317.  
  1318. !if defined(LOC_MISCFILES) || defined(I386_LOC_MISCFILES) || defined(IA64_LOC_MISCFILES) || defined(AMD64_LOC_MISCFILES)
  1319. ! error LOC_MISCFILES has been deprecated. Use the proper PASSx_LOC_MISCFILES version instead.
  1320. !endif
  1321.  
  1322. !if defined(MULTI_MISCFILES)
  1323. ! error MULTI_MISCFILES has been deprecated. Use the proper PASSx_MULTI_MISCFILES version instead.
  1324. !endif
  1325.  
  1326. #
  1327. # These are very special macros that are created based on the pass currently running
  1328. # based on the content of the PASS# variants of each macro. The code block we run
  1329. # in each pass is identical and they never run at the same time, so this enables us
  1330. # to re-use and not duplicate as much of the infrastructure as possible. It reduces
  1331. # the per-pass differences to these specific if blocks that _are_ pass specific.
  1332. #
  1333. !if "$(BUILD_PASS)" == "PASS0"
  1334. ! if defined(PASS0_LANG_MISCFILES)
  1335. LANG_MISCFILES=$(PASS0_LANG_MISCFILES)
  1336. LANG_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_lang_miscfiles.log
  1337. ! endif
  1338. ! if defined(PASS0_LOC_MISCFILES)
  1339. LOC_MISCFILES=$(PASS0_LOC_MISCFILES)
  1340. LOC_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_loc_miscfiles.log
  1341. LOC_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass0_loc_miscfiles.lcg.binplace.txt
  1342. ! endif
  1343. ! if defined(PASS0_LOC_MUI_MISCFILES)
  1344. LOC_MUI_MISCFILES=$(PASS0_LOC_MUI_MISCFILES)
  1345. LOC_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_loc_mui_miscfiles.log
  1346. LOC_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass0_loc_mui_miscfiles_neutral.lst
  1347. LOC_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass0_loc_mui_miscfiles_resource.lst
  1348. LOC_MUI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass0_loc_mui_miscfiles.lcg.binplace.txt
  1349. ! endif
  1350. ! if defined(PASS0_PRELOC_MISCFILES)
  1351. PRELOC_MISCFILES=$(PASS0_PRELOC_MISCFILES)
  1352. PRELOC_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_preloc_miscfiles.log
  1353. ! endif
  1354. ! if defined(PASS0_PRELOC_MUI_MISCFILES)
  1355. PRELOC_MUI_MISCFILES=$(PASS0_PRELOC_MUI_MISCFILES)
  1356. PRELOC_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_preloc_mui_miscfiles.log
  1357. PRELOC_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass0_preloc_mui_miscfiles_neutral.lst
  1358. PRELOC_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass0_preloc_mui_miscfiles_resource.lst
  1359. ! endif
  1360. ! if defined(PASS0_PRELOC_MUI_ONLY_MISCFILES)
  1361. PRELOC_MUI_ONLY_MISCFILES=$(PASS0_PRELOC_MUI_ONLY_MISCFILES)
  1362. PRELOC_MUI_ONLY_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_preloc_mui_only_miscfiles.log
  1363. PRELOC_MUI_ONLY_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass0_loc_mui_only_miscfiles_neutral.lst
  1364. PRELOC_MUI_ONLY_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass0_loc_mui_only_miscfiles_resource.lst
  1365. ! endif
  1366. ! if defined(PASS0_MULTI_MISCFILES)
  1367. MULTI_MISCFILES=$(PASS0_MULTI_MISCFILES)
  1368. MULTI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_multi_miscfiles.log
  1369. MULTI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass0_multi_miscfiles.lcg.binplace.txt
  1370. ! endif
  1371. ! if defined(PASS0_MULTI_MUI_MISCFILES)
  1372. MULTI_MUI_MISCFILES=$(PASS0_MULTI_MUI_MISCFILES)
  1373. MULTI_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass0_multi_mui_miscfiles.log
  1374. MULTI_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass0_multi_mui_miscfiles_neutral.lst
  1375. MULTI_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass0_multi_mui_miscfiles_resource.lst
  1376. MULTI_MUI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass0_multi_mui_miscfiles.lcg.binplace.txt
  1377. ! endif
  1378. !endif
  1379.  
  1380.  
  1381. !if "$(BUILD_PASS)" == "PASS1"
  1382. ! if defined(PASS1_LANG_MISCFILES)
  1383. LANG_MISCFILES=$(PASS1_LANG_MISCFILES)
  1384. LANG_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_lang_miscfiles.log
  1385. ! endif
  1386. ! if defined(PASS1_LOC_MISCFILES)
  1387. LOC_MISCFILES=$(PASS1_LOC_MISCFILES)
  1388. LOC_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_loc_miscfiles.log
  1389. LOC_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass1_loc_miscfiles.lcg.binplace.txt
  1390. ! endif
  1391. ! if defined(PASS1_LOC_MUI_MISCFILES)
  1392. LOC_MUI_MISCFILES=$(PASS1_LOC_MUI_MISCFILES)
  1393. LOC_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_loc_mui_miscfiles.log
  1394. LOC_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass1_loc_mui_miscfiles_neutral.lst
  1395. LOC_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass1_loc_mui_miscfiles_resource.lst
  1396. LOC_MUI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass1_loc_mui_miscfiles.lcg.binplace.txt
  1397. ! endif
  1398. ! if defined(PASS1_PRELOC_MISCFILES)
  1399. PRELOC_MISCFILES=$(PASS1_PRELOC_MISCFILES)
  1400. PRELOC_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_preloc_miscfiles.log
  1401. ! endif
  1402. ! if defined(PASS1_PRELOC_MUI_MISCFILES)
  1403. PRELOC_MUI_MISCFILES=$(PASS1_PRELOC_MUI_MISCFILES)
  1404. PRELOC_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_preloc_mui_miscfiles.log
  1405. PRELOC_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass1_preloc_mui_miscfiles_neutral.lst
  1406. PRELOC_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass1_preloc_mui_miscfiles_resource.lst
  1407. ! endif
  1408. ! if defined(PASS1_PRELOC_MUI_ONLY_MISCFILES)
  1409. PRELOC_MUI_ONLY_MISCFILES=$(PASS1_PRELOC_MUI_ONLY_MISCFILES)
  1410. PRELOC_MUI_ONLY_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_preloc_mui_only_miscfiles.log
  1411. PRELOC_MUI_ONLY_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass1_loc_mui_only_miscfiles_neutral.lst
  1412. PRELOC_MUI_ONLY_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass1_loc_mui_only_miscfiles_resource.lst
  1413. ! endif
  1414. ! if defined(PASS1_MULTI_MISCFILES)
  1415. MULTI_MISCFILES=$(PASS1_MULTI_MISCFILES)
  1416. MULTI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_multi_miscfiles.log
  1417. MULTI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass1_multi_miscfiles.lcg.binplace.txt
  1418. ! endif
  1419. ! if defined(PASS1_MULTI_MUI_MISCFILES)
  1420. MULTI_MUI_MISCFILES=$(PASS1_MULTI_MUI_MISCFILES)
  1421. MULTI_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass1_multi_mui_miscfiles.log
  1422. MULTI_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass1_multi_mui_miscfiles_neutral.lst
  1423. MULTI_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass1_multi_mui_miscfiles_resource.lst
  1424. MULTI_MUI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass1_multi_mui_miscfiles.lcg.binplace.txt
  1425. ! endif
  1426. !endif
  1427.  
  1428. !if "$(BUILD_PASS)" == "PASS2"
  1429. ! if defined(PASS2_LANG_MISCFILES)
  1430. LANG_MISCFILES=$(PASS2_LANG_MISCFILES)
  1431. LANG_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_lang_miscfiles.log
  1432. ! endif
  1433. ! if defined(PASS2_LOC_MISCFILES)
  1434. LOC_MISCFILES=$(PASS2_LOC_MISCFILES)
  1435. LOC_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_loc_miscfiles.log
  1436. LOC_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass2_loc_miscfiles.lcg.binplace.txt
  1437. ! endif
  1438. ! if defined(PASS2_LOC_MUI_MISCFILES)
  1439. LOC_MUI_MISCFILES=$(PASS2_LOC_MUI_MISCFILES)
  1440. LOC_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_loc_mui_miscfiles.log
  1441. LOC_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass2_loc_mui_miscfiles_neutral.lst
  1442. LOC_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass2_loc_mui_miscfiles_resource.lst
  1443. LOC_MUI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass2_loc_mui_miscfiles.lcg.binplace.txt
  1444. ! endif
  1445. ! if defined(PASS2_PRELOC_MISCFILES)
  1446. PRELOC_MISCFILES=$(PASS2_PRELOC_MISCFILES)
  1447. PRELOC_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_preloc_miscfiles.log
  1448. ! endif
  1449. ! if defined(PASS2_PRELOC_MUI_MISCFILES)
  1450. PRELOC_MUI_MISCFILES=$(PASS2_PRELOC_MUI_MISCFILES)
  1451. PRELOC_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_preloc_mui_miscfiles.log
  1452. PRELOC_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass2_preloc_mui_miscfiles_neutral.lst
  1453. PRELOC_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass2_preloc_mui_miscfiles_resource.lst
  1454. ! endif
  1455. ! if defined(PASS2_PRELOC_MUI_ONLY_MISCFILES)
  1456. PRELOC_MUI_ONLY_MISCFILES=$(PASS2_PRELOC_MUI_ONLY_MISCFILES)
  1457. PRELOC_MUI_ONLY_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_preloc_mui_only_miscfiles.log
  1458. PRELOC_MUI_ONLY_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass2_loc_mui_only_miscfiles_neutral.lst
  1459. PRELOC_MUI_ONLY_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass2_loc_mui_only_miscfiles_resource.lst
  1460. ! endif
  1461. ! if defined(PASS2_MULTI_MISCFILES)
  1462. MULTI_MISCFILES=$(PASS2_MULTI_MISCFILES)
  1463. MULTI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_multi_miscfiles.log
  1464. MULTI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass2_multi_miscfiles.lcg.binplace.txt
  1465. ! endif
  1466. ! if defined(PASS2_MULTI_MUI_MISCFILES)
  1467. MULTI_MUI_MISCFILES=$(PASS2_MULTI_MUI_MISCFILES)
  1468. MULTI_MUI_MISCFILES_LOG=$(OBJ_PATH)\$O\pass2_multi_mui_miscfiles.log
  1469. MULTI_MUI_MISCFILES_NEUTRAL_LIST=$(OBJ_PATH)\$O\pass2_multi_mui_miscfiles_neutral.lst
  1470. MULTI_MUI_MISCFILES_RESOURCE_LIST=$(OBJ_PATH)\$O\pass2_multi_mui_miscfiles_resource.lst
  1471. MULTI_MUI_MISCFILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\pass2_multi_mui_miscfiles.lcg.binplace.txt
  1472. ! endif
  1473. !endif
  1474.  
  1475. # For prelocalized files, we need to know what language they are. Note that this is
  1476. # intentionally different from the somewhat ambigiously used $(LANG) variable...
  1477. !if defined(PRELOC_MISCFILES)          || \
  1478.     defined(PRELOC_MUI_MISCFILES)      || \
  1479.     defined(PRELOC_MUI_ONLY_MISCFILES) || \
  1480.     defined(PRELOC_PRINTER_INFS)       || \
  1481.     "$(TARGETTYPE)" == "USER_ASSISTANCE"
  1482.  
  1483. # Validate PRELOC_BASE_LANG if it's set
  1484. !if defined (PRELOC_BASE_LANG)
  1485. ! if "$(PRELOC_BASE_LANG)" != "1" && "$(PRELOC_BASE_LANG)" != "0"
  1486. !  error PRELOC_BASE_LANG can only be set to 1 or 0
  1487. ! endif
  1488. !endif
  1489.  
  1490. # Validate we have something for the language for prelocalized files
  1491. ! if "$(PRELOC_LANG: =)" == "" && "$(PRELOC_BASE_LANG)" != "1"
  1492. # multi line errors require the older !message style
  1493. !  message error : If using any of the PASSx_PRELOC_MISCFILES, PASSx_PRELOC_MUI_MISCFILES,
  1494. !  message error : PASSx_PRELOC_MUI_ONLY_MISCFILES, or PRELOC_PRINTER_INFS macros, or
  1495. !  message error : TARGETTYPE=USER_ASSISTANCE, you must do one of the following in your
  1496. !  message error : sources file:
  1497. !  message error :  - Set PRELOC_LANG to a valid language
  1498. !          error :  - Set PRELOC_BASE_LANG=1
  1499. ! endif
  1500.  
  1501. # Validate things are not in conflict
  1502. ! if defined(PRELOC_LANG) && "$(PRELOC_BASE_LANG)" == "1"
  1503. !  error You cannot set PRELOC_BASE_LANG=1 and set PRELOC_LANG.
  1504. ! endif
  1505.  
  1506. # Make sure we set the right binplace directory for prelocalized files
  1507. # NOTE: Rebuild these values from scratch and do not re-use $(LOC_UA)
  1508. !if defined(PRELOC_LANG)
  1509. PRELOC_BINPLACE_DIR=$(LOC_PRELOC)\$(PRELOC_LANG)
  1510. UA_BINPLACE_DIR=$(LOC_PRELOC)\$(PRELOC_LANG)\UA
  1511. !else
  1512. PRELOC_BINPLACE_DIR=$(LOC_BIN)
  1513. UA_BINPLACE_DIR=$(LOC_BIN)\UA
  1514. !endif
  1515.  
  1516. # For UA files, check for obvious errors and get them binplacing correctly
  1517. !if "$(TARGETTYPE)" == "USER_ASSISTANCE"
  1518. ! if "$(ALT_PROJECT_TARGET)" != "" && "$(ALT_PROJECT_TARGET)" != "."
  1519. !  error Must not define ALT_PROJECT_TARGET with TARGETYPE=USER_ASSISTANCE.
  1520. ! else
  1521. ALT_PROJECT_TARGET=$(UA_BINPLACE_DIR)
  1522. ! endif
  1523. !endif
  1524.  
  1525. !endif # PRELOC_*
  1526.  
  1527. !if defined(LOC_PLA_XML_FILES)
  1528. LOC_PLA_XML_FILES_LOG=$(OBJ_PATH)\$O\loc_pla_xml_files.log
  1529. LOC_PLA_XML_FILES_RESOURCE_LIST=$(OBJ_PATH)\$O\loc_pla_xml_files_resource.lst
  1530. LOC_PLA_XML_FILES_LCG_BINPLACE_TXT=$(OBJ_PATH)\$(O)\loc_pla_xml_files.lcg.binplace.txt
  1531. !endif
  1532.  
  1533. # Validate that there is no conflict between the *_MUI_MISCFILES macros and the MUI macro.
  1534. !if defined(LOC_MUI_MISCFILES) || \
  1535.     defined(MULTI_MUI_MISCFILES) || \
  1536.     defined(PRELOC_MUI_MISCFILES) || \
  1537.     defined(PRELOC_MUI_ONLY_MISCFILES)
  1538. ! if "$(MUI)" == "0"
  1539. !  error You cannot set MUI=0 if you are using any of the *_MUI_MISCFILE macros.
  1540. ! endif # MUI==0
  1541. !endif # defined(*_MUI_MISCFILES)
  1542.  
  1543.  
  1544. # Support to compile CMI manifests
  1545. !if (    defined(CMI_MANIFESTS) \
  1546.       || defined(CMI_WOW64_MANIFESTS) \
  1547.       || defined(CMI_MULTI_MANIFESTS) \
  1548.       || defined(CMI_MULTI_WOW64_MANIFESTS) \
  1549.       || defined(EVENTS_MANIFEST) \
  1550.       || defined(CMI_PROD_MANIFESTS) \
  1551.       || defined(CMI_WOW64_PROD_MANIFESTS) \
  1552.       || defined(CMI_EDITION_MANIFESTS) \
  1553.     ) && !defined(MANIFEST_COMPILER_CMD)
  1554. MANIFEST_COMPILER_CMD=cscript //nologo $(RAZZLETOOLPATH)\ManifestCompiler.vbs $(RAZZLETOOLPATH)\ManifestCompiler.xsl
  1555. !endif
  1556.  
  1557.  
  1558. # Support for components that use manifest-generated events or direct calls
  1559. # to ETW APIs that aren't defined in ntetw.h, but want to use the Etw*
  1560. # routines in ntdll.dll rather than the Win32 forwarders in advapi32.dll.
  1561.  
  1562. !IF "$(MANPP_USE_NTDLL_EVENT_FUNCTIONS)" == "1"
  1563. C_DEFINES=$(C_DEFINES) \
  1564.     -DEventActivityIdControl=EtwEventActivityIdControl \
  1565.     -DEventEnabled=EtwEventEnabled \
  1566.     -DEventProviderEnabled=EtwEventProviderEnabled \
  1567.     -DEventRegister=EtwEventRegister \
  1568.     -DEventUnregister=EtwEventUnregister \
  1569.     -DEventWrite=EtwEventWrite \
  1570.     -DEventWriteEx=EtwEventWriteEx \
  1571.     -DEventWriteEndScenario=EtwEventWriteEndScenario \
  1572.     -DEventWriteStartScenario=EtwEventWriteStartScenario \
  1573.     -DEventWriteString=EtwEventWriteString \
  1574.     -DEventWriteTransfer=EtwEventWriteTransfer \
  1575.     -DGetTraceLoggerHandle=EtwGetTraceLoggerHandle \
  1576.     -DGetTraceEnableLevel=EtwGetTraceEnableLevel \
  1577.     -DGetTraceEnableFlags=EtwGetTraceEnableFlags \
  1578.     -DRegisterTraceGuidsA=EtwRegisterTraceGuidsA \
  1579.     -DRegisterTraceGuidsW=EtwRegisterTraceGuidsW \
  1580.     -DTraceEvent=EtwLogTraceEvent \
  1581.     -DTraceMessage=EtwTraceMessage \
  1582.     -DUnregisterTraceGuids=EtwUnregisterTraceGuids
  1583. !ENDIF
  1584.  
  1585. !IF defined(CMI_MANIFESTS)
  1586. SOURCE_MANIFEST = $(OBJ_PATH)\$O\source_manifest.log
  1587. !ENDIF
  1588.  
  1589. !IF $(386) && defined(CMI_WOW64_MANIFESTS)
  1590. WOW64_SOURCE_MANIFEST = $(OBJ_PATH)\$O\wow64_source_manifest.log
  1591. !ENDIF
  1592.  
  1593. !IF defined(CMI_MULTI_MANIFESTS)
  1594. MULTI_SOURCE_MANIFEST = $(OBJ_PATH)\$O\multi_source_manifest.log
  1595. !ENDIF
  1596.  
  1597. !IF $(386) && defined(CMI_MULTI_WOW64_MANIFESTS)
  1598. MULTI_WOW64_SOURCE_MANIFEST = $(OBJ_PATH)\$O\multi_wow64_source_manifest.log
  1599. !ENDIF
  1600.  
  1601. !IF defined(CMI_PROD_MANIFESTS)
  1602. PROD_SOURCE_MANIFEST = $(OBJ_PATH)\$O\prod_source_manifest.log
  1603. INTERNAL_SOURCE_MANIFEST = $(OBJ_PATH)\$O\internal_source_manifest.log
  1604. !ENDIF
  1605.  
  1606. !IF $(386) && defined(CMI_WOW64_PROD_MANIFESTS)
  1607. PROD_WOW64_SOURCE_MANIFEST = $(OBJ_PATH)\$O\prod_wow64_source_manifest.log
  1608. INTERNAL_WOW64_SOURCE_MANIFEST = $(OBJ_PATH)\$O\internal_wow64_source_manifest.log
  1609. !ENDIF
  1610.  
  1611. !IF defined(CMI_EDITION_MANIFESTS)
  1612. EDITION_SOURCE_MANIFEST = $(OBJ_PATH)\$O\edition_source_manifest.log
  1613. !ENDIF
  1614.  
  1615. !IF defined(CMI_WINPE_MANIFESTS)
  1616. WINPE_SOURCE_MANIFEST = $(OBJ_PATH)\$O\winpe_source_manifest.log
  1617. !ENDIF
  1618.  
  1619. !ifndef MANIFEST_COMPILER_CMD
  1620. MANIFEST_COMPILER_CMD=cscript //nologo $(RAZZLETOOLPATH)\ManifestCompiler.vbs $(RAZZLETOOLPATH)\ManifestCompiler.xsl
  1621. !endif
  1622.  
  1623. !ifndef MANIFEST_RCPARSER_CMD
  1624. MANIFEST_RCPARSER_CMD=rcmanparse
  1625. !endif
  1626.  
  1627. !if defined(MT_SKIP_MANIFEST_VALIDATION)
  1628. !else
  1629. MT_OPTIONS=$(MT_OPTIONS) -validate_manifest
  1630. !endif
  1631.  
  1632. MT_FIXUP_LIST=FixDefWildcardAttributes,FixSystem32Path,FixBuildAssemblyPath,CorralRegistryData,FixResourceStrings,ConvertNegativeRegDwordValues,MapDirIdToDirectoryName,CanonicalizeRegistryKeyNames,AddMissingManifestVersionAttribute,AddMissingPublicKeyTokenToDefId,ExpandShortRootKeyNames,MergeDuplicateRegistryKeys,RemoveDuplicateComClasses,RemoveDuplicateProgIds,RemoveDuplicateDependencies,RemoveDuplicateRegistryValues,FixResourceStrings,IgnoreDrivers,AddMissingSecurityDescriptors,RemoveFileDependencies,RemovePrerequisiteDependencies,RemoveRedirectInfo
  1633.  
  1634. !ifndef MT_NO_COPYRIGHT_FIXUP
  1635. MT_FIXUP_LIST=$(MT_FIXUP_LIST),ForceMicrosoftCopyright
  1636. !endif
  1637.  
  1638. !if defined(MT_SKIP_MANIFEST_FIXUPS)
  1639. !else
  1640. MT_OPTIONS=$(MT_OPTIONS) -fix_bogus_manifests:$(MT_FIXUP_LIST)
  1641. !endif
  1642.  
  1643. !ifndef PASS_INDEPENDENT_TARGETS
  1644. ! ifdef _PROJECT_BUILDS_MANAGED_CODE
  1645. !  ifdef MANAGED_CXX
  1646. !   if "$(TARGETTYPE)" == "LIBRARY" || "$(TARGETTYPE)" == "NOTARGET"
  1647. _MANAGED_CXX_LIBRARY=1
  1648. !   endif
  1649. !   if "$(MANAGED_TARGET_TYPE)" == "module"
  1650. !    if "$(URT_VER)" >= "2.0"
  1651. USER_C_FLAGS=$(USER_C_FLAGS) /LN
  1652. !    endif # } }
  1653. LINKER_FLAGS=$(LINKER_FLAGS) /NoAssembly
  1654. !   endif
  1655. !  endif
  1656.  
  1657.  
  1658. ! endif
  1659. !endif  # PASS_INDEPENDENT_TARGETS
  1660.  
  1661.  
  1662. #
  1663. # set up NO_BINPLACE early so everyone that wants to check this can check it
  1664. # Two reasons not to binplace:
  1665. # 1) since we're generating binary drops of this source there's no need to
  1666. # binplace the files.  The files should be binplaced from the binary_release
  1667. # directory.
  1668. # 2) there's nowhere to move the files to
  1669. #
  1670. !if defined(BINARY_PUBLISH) || \
  1671.     defined(BINARY_PUBLISH_DIR) || \
  1672.     !defined(_NTTREE) || \
  1673.     (defined(TEST_CODE) && defined(NO_TEST_BINPLACE))
  1674. NO_BINPLACE=1
  1675. !endif
  1676.  
  1677. !ifndef PASS_INDEPENDENT_TARGETS
  1678.  
  1679. !if defined(MANIFESTS) && "$(MANIFESTS: =)" == ""
  1680. !  error error If MANIFESTS is defined, it must not be empty.
  1681. # And just containing spaces is the same as empty.
  1682. !endif
  1683.  
  1684. !if ((defined(_PROJECT_BUILDS_MANAGED_CODE) && ("$(BUILD_PRODUCT)" == "NT")) \
  1685.     || defined(MANIFESTS) \
  1686.     || defined(ASSEMBLY_IDENTITY_NAME)) \
  1687.   && !defined(_MAKING_ASMID_INC) \
  1688.   && !defined(_MANAGED_CXX_LIBRARY) \
  1689.   && "$(MANAGED_TARGET_TYPE)" != "module"
  1690.  
  1691. !if defined(MANAGED_PLATFORM_SPECIFIC) && "$(MANAGED_PLATFORM_SPECIFIC)" != "1"
  1692. !error MANAGED_PLATFORM_SPECIFIC must be set to 1 or not defined
  1693. !endif
  1694.  
  1695. WINDOWS_ASSEMBLY_VERSION=$(WINDOWS_VERSION)
  1696. !  include $(OBJECT_ROOT)\$O\translate_asmid.inc
  1697.  
  1698. #
  1699. # Run idtool.
  1700. #
  1701. !  if [nmake.exe /nologo /f $(NTMAKEENV)\makefile.def _ASSEMBLY_IDENTITY=$(_ASSEMBLY_IDENTITY) _MAKING_ASMID_INC=1 $(OBJ_PATH)\$O\_asmid.inc]
  1702. !  endif
  1703. !  include $(OBJ_PATH)\$O\_asmid.inc
  1704. !endif
  1705.  
  1706. !if defined(COM_VISIBLE) && "$(COM_VISIBLE)" != "0" && "$(COM_VISIBLE)" != "1"
  1707. !  error COM_VISIBLE must be 0 or 1 or not defined.
  1708. !endif
  1709.  
  1710. !if defined(COM_VISIBLE) && !defined(_PROJECT_BUILDS_MANAGED_CODE)
  1711. !  error COM_VISIBLE can only be defined for managed code.
  1712. # Review -- just ignore it?
  1713. !endif
  1714.  
  1715. # SXS_NO_BINPLACE will be deprecated.
  1716. # It will be replaced by reversing the default and introducing a new macro for the other case:
  1717. #  ASSEMBLY_IS_SXS=1
  1718. # which defaults to 1 for managed code and it set explicitly for comctl32.dll, etc.
  1719. !if defined(SXS_NO_BINPLACE) && "$(SXS_NO_BINPLACE)" != "1"
  1720. ! error SXS_NO_BINPLACE must be 1 or not defined.
  1721. !endif
  1722.  
  1723. #
  1724. # TARGEXT is .lib in pass1 building PROGLIB, DYNLINK
  1725. # but LINK_TARGETEXT is not.
  1726. #
  1727. # TBD: The logic for TARGETEXT should move up to here and provide this.
  1728. # This is just a small subset.
  1729. #
  1730. # EXPORT_DRIVER DRIVER MINIPORT DYNLINK LIBRARY DRIVER_LIBRARY..
  1731. #
  1732. !if "$(TARGETTYPE)" == "PROGRAM" || "$(TARGETTYPE)" == "PROGLIB"
  1733. LINK_TARGETEXT=exe
  1734. !else
  1735. LINK_TARGETEXT=dll
  1736. !endif
  1737.  
  1738. !if defined(NTKERNEL)
  1739. __TARGETNAME=$(NTKERNEL)
  1740. __TARGETEXT=exe
  1741. !else
  1742. __TARGETNAME=$(TARGETNAME)
  1743. __TARGETEXT=$(TARGETEXT)
  1744. !endif
  1745.  
  1746. #
  1747. # Deal with referencing public keys from the global build initialization data
  1748. # generated from the rather misnamed "versions.xml" into various includable forms
  1749. !if "$(BUILD_PRODUCT)" == "NT"
  1750. !  ifdef USE_PUBLIC_KEY_REFERENCES
  1751. !    ifdef _PROJECT_BUILDS_MANAGED_CODE
  1752. REFERENCES=$(REFERENCES);$(SDK_REF_PATH)\Microsoft.Windows.Identity.dll
  1753. !    else
  1754. !      error USE_PUBLIC_KEY_REFERENCES only supports managed code
  1755. !    endif
  1756. !  endif
  1757. !endif
  1758.  
  1759.  
  1760. #
  1761. # Where did the name ".asmmeta" come from?
  1762. #   ".asm" == "assembly source code", not just x86, ia64, amd64, etc., but also il.
  1763. #   ".meta" == "metadata only .dll"
  1764. #     => ".asmmeta" == "assembly source code to metadata only .dll"
  1765. #
  1766. # ".meta" is also sometimes known as "dehydrated .dll" or "dehydrated assembly".
  1767. # (assembly has another meaning -- "unit of deployment", ".dll", "self described .dll", ".dll + .xml manifest")
  1768. #
  1769. # For our purposes, we drop the term ".meta" and instead refer to "metadata only .dlls" (or .exes).
  1770. #
  1771. # Asmmeta.exe is basically a stripped down ildasm.
  1772. # It removes all code (leaving "ret" instructions) but leaves in all the declarations, all the metadata.
  1773. #
  1774. # Asmmeta.exe's output includes version numbers.
  1775. #
  1776. # Version numbers must be changable fairly rapidly, must be changed rapidly, else the ability
  1777. #   to change them will greatly decrease.
  1778. #
  1779. # So version numbers must be removed from asmmeta.exe's output, and put back in right before running ilasm.
  1780. #
  1781. # o\foo.asmmeta_ver_pass0 has versions; it is input to ilasm in pass0.
  1782. # o\foo.asmmeta_ver_pass2 has versions; it is the output of asmmeta.exe in pass2.
  1783. # Given a steady state of no code changes, the above two files are identical.
  1784. # .\foo.asmmeta lacks versions; it is the checked in textual "source" file (though not hand written and not very readable).
  1785. #
  1786. # foo.cs => o\foo.dll => o\asmmeta_ver_pass2 => comparison/copy => .\asmmeta => o\asmmeta_ver_pass0 => o\foo.metadata_dll
  1787. #
  1788. # as long as foo.cs is unchanged:
  1789. #   pass0: .\asmmeta => o\asmmeta_ver_pass0 => o\foo.metadata_dll
  1790. #   pass2: foo.cs => o\foo.dll => o\asmmeta_ver_pass2 => comparison/(no)copy => stop
  1791. #
  1792. # if foo.cs is changed, then:
  1793. #   pass0: .\asmmeta => o\asmmeta_ver_pass0 => o\foo.metadata_dll
  1794. #   pass2: foo.cs => o\foo.dll => o\asmmeta_ver_pass2 => comparison/copy => developer must build again
  1795. #   next pass0 => .\asmmeta => o\asmmeta_ver_pass0 => o\foo.metadata_dll
  1796. #
  1797.  
  1798. # detect .asmmetas that are no longer needed
  1799. !if defined(_PROJECT_BUILDS_MANAGED_CODE) \
  1800.     && "$(TARGETTYPE)" == "PROGRAM" \
  1801.     && !defined(USE_ASMMETA) \
  1802.     && !defined(ASMMETA_INPUT) \
  1803.     && exist($(TARGETNAME).asmmeta)
  1804. ! error delete $(MAKEDIR)\$(TARGETNAME).asmmeta
  1805. !endif
  1806.  
  1807. !if defined(_PROJECT_BUILDS_MANAGED_CODE)
  1808. !  if defined(USE_ASMMETA)
  1809. !    if "$(TARGETTYPE)" == "DYNLINK"
  1810. !      message $(MAKEDIR) USE_ASMMETA=1 does nothing when TARGETTYPE == DYNLINK, remove it.
  1811. !    else
  1812. !      if "$(USE_ASMMETA)" != "1"
  1813. !        error $(MAKEDIR) USE_ASMMETA must be 1 or not defined, change it to 1.
  1814. !      endif
  1815. !    endif
  1816. !  endif
  1817. !else
  1818.  
  1819. #
  1820. # This if needs some work, it lets too much through.
  1821. #
  1822. !  if defined(USE_ASMMETA) \
  1823.     && !(defined(ASSEMBLY_IDENTITY_VERSION_NAME) || defined(URT_VER))
  1824. !    error $(MAKEDIR) USE_ASMMETA does nothing for native code; remove it.
  1825. !  endif
  1826.  
  1827. !endif
  1828.  
  1829. !if \
  1830.     ( \
  1831.         (defined(_PROJECT_BUILDS_MANAGED_CODE) && ("$(BUILD_PRODUCT)" == "NT") && ("$(TARGETTYPE)" != "PROGRAM")) \
  1832.             || defined(USE_ASMMETA) \
  1833.             || defined(ASMMETA_INPUT) \
  1834.     ) \
  1835.   && !defined(_MANAGED_CXX_LIBRARY) \
  1836.   && ("$(MANAGED_TARGET_TYPE)" != "module" || defined(ASMMETA_INPUT)) \
  1837.   && "$(TARGETEXT)" != "lib"
  1838.  
  1839. ! if exist($(TARGETNAME).asmmeta) && exist($(TARGET_DIRECTORY)\$(TARGETNAME).asmmeta)
  1840. !  message warning : delete $(MAKEDIR)\$(TARGETNAME).asmmeta or $(MAKEDIR)\$(TARGET_DIRECTORY)\$(TARGETNAME).asmmeta
  1841. ! endif
  1842.  
  1843. ! ifndef SOURCE_ASMMETA
  1844. !  if exist($(TARGET_DIRECTORY)\$(TARGETNAME).asmmeta)
  1845. SOURCE_ASMMETA=$(TARGET_DIRECTORY)\$(TARGETNAME).asmmeta
  1846. !  else
  1847. SOURCE_ASMMETA=$(TARGETNAME).asmmeta
  1848. !  endif
  1849. ! endif
  1850.  
  1851. ! if exist($(SOURCE_ASMMETA))
  1852. _O_BINARY_METADATA=$(OBJ_PATH)\$O\$(TARGETNAME).metadata_$(LINK_TARGETEXT)
  1853. ! endif
  1854. _O_ASMMETA_OUTPUT=$(OBJ_PATH)\$O\$(TARGETNAME).asmmeta_ver_pass2
  1855. _O_ASMMETA=$(OBJ_PATH)\$O\$(TARGETNAME).asmmeta
  1856.  
  1857. ! ifndef ASMMETA_INPUT
  1858. # TBD -- why isn't it always defined?
  1859. !  ifdef TARGET
  1860. ASMMETA_INPUT=$(TARGET)
  1861. !  else
  1862. ASMMETA_INPUT=$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).$(TARGETEXT:.=)
  1863. !  endif
  1864. ! endif
  1865.  
  1866. !endif
  1867.  
  1868. #
  1869. # SXS_LOCALIZE is going away.
  1870. #
  1871. #
  1872. # This would be the default but so far everyone is an exception.
  1873. #  Comctl32.dll has multiple languages in the code .dll.
  1874. #  Gdiplus.dll has no resources.
  1875. #  Rtc is using system32 fallback + explicit satellite dependency.
  1876. #
  1877. # Besides that, nobody yet needs this.
  1878. #
  1879.  
  1880. !if defined(SXS_LOCALIZE_ASSEMBLY_MUI) && "$(SXS_LOCALIZE_ASSEMBLY_MUI)" != "1"
  1881. !  error SXS_LOCALIZE_ASSEMBLY_MUI can only be set to 1.
  1882. !endif
  1883.  
  1884. !if defined(SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY) && "$(SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY)" != "1"
  1885. !  error SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY can only be set to 1.
  1886. !endif
  1887.  
  1888. !if defined(SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY) && !defined(SXS_LANGUAGE)
  1889. !  error If you set SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY, you must also set SXS_LANGUAGE, and use SXS_LANGUAGE in your assembly identity.
  1890. !endif
  1891.  
  1892.  
  1893. #
  1894. # SideBySide (SXS) Build
  1895. #
  1896. # Step by Step instructions
  1897. #
  1898. # For building a monolithic application, foo.ext (where .ext is usually .exe but for example .scr).
  1899. # For building an application that hosts arbitrary (3rd party) code.
  1900. # For building a single file component like comctl32.dll.
  1901. # For building a multiple file component.
  1902. #
  1903. # Reference
  1904. #
  1905. # An assembly contains a manifest and one or more files, usually .dlls.
  1906. # The manifest can be in a resource in one of the files, or it can be in a seperate
  1907. #   .manifest file. For purposes of fitting on an 8.3 CD, .man is allowed.
  1908. # Build.exe is generally limited to building one .dll per directory, so
  1909. #   you can be building files for an assembly without building a manifest.
  1910. #
  1911. # To build/binplace a manifest:
  1912. #
  1913. #  SXS_MANIFEST required
  1914. #    This is the source file that contains your manifest.
  1915. #    It must end in .manifest.
  1916. #    It is always preprocessed. Available macros include:
  1917. #      SXS_ASSEMBLY_NAME
  1918. #      SXS_ASSEMBLY_VERSION
  1919. #      SXS_ASSEMBLY_LANGUAGE
  1920. #      SXS_PROCESSOR_ARCHITECTURE
  1921. #
  1922. #  SXS_MANIFEST_IN_RESOURCES optional
  1923. #    This is defined or not, so you just say
  1924. #      SXS_MANIFEST_IN_RESOURCES=
  1925. #    or don't say anything.
  1926. #
  1927. #  SXS_ASSEMBLY_NAME and/or SXS_SHORT_ASSEMBLY_NAME required
  1928. #    One can be generated from the other.
  1929. #    SXS_SHORT_ASSEMBLY_NAME is used where 8.3 limits apply, like on the product CD.
  1930. #    Both of these macros can be hierarchical, using dot, dash, or underscore to seperate
  1931. #    elements. SXS_SHORT_ASSEMBLY_NAME should actually only contain 8 character elements.
  1932. #
  1933. #  SXS_ASSEMBLY_VERSION optional, defaults to 5.1.
  1934. #
  1935. #  SXS_ASSEMBLY_LANGUAGE or SXS_ASSEMBLY_LANGUAGE_INDEPENDENT required
  1936. #    SXS_ASSEMBLY_LANGUAGE_INDEPENDENT is defined or not.
  1937. #    SXS_ASSEMBLY_LANGUAGE is four digits like
  1938. #      0409 for English US
  1939. #      0009 for English
  1940. #      0000 for language independent
  1941. #    We should make this easier as is done for resources (LANGUAGE => RCCODEPAGE), but for now we don't.
  1942. #
  1943. # To build/binplace a file into an assembly, a subset of the information
  1944. # needed for manifests is needed:
  1945. #
  1946. #  SXS_ASSEMBLY_NAME and/or SXS_SHORT_ASSEMBLY_NAME
  1947. #  SXS_ASSEMBLY_VERSION
  1948. #  SXS_ASSEMBLY_LANGUAGE or SXS_ASSEMBLY_LANGUAGE_INDEPENDENT
  1949. #
  1950. # There are restrictions on the values of these macros and not all restrictions
  1951. # are currently enforced by the build. Enforcement is in verify.src.
  1952. #
  1953.  
  1954. !if "$(ALT_PROJECT)" == "WOW6432" || "$(ALT_PROJECT_TARGET)" == "WOW6432"
  1955. SXS_PDB_WOW6432_W_PREFIX=w
  1956. SXS_LOG_WOWBINS_W_ASMS_PREFIX=w
  1957. SXS_LOG_BINPLACE_WOW6432_PREFIX=wow6432^\
  1958. SXS_WOW6432=1
  1959. !endif
  1960.  
  1961. #
  1962. # There's two meta-modes of operation in SXS - Application manifest mode and component manifest mode.
  1963. # Depending on what you have defined in your sources file, you can simplify all of the build process
  1964. # down to a very minimal set of commands in your sources files and still get Fusionization goodness.
  1965. #
  1966. # Example:
  1967. #
  1968. # SXS_APPLICATION_MANIFEST=MyAppManifest.manifest
  1969. #
  1970. # (or)
  1971. #
  1972. # SXS_COMPONENT_MANIFEST=MyComponentManifest.manifest
  1973. #
  1974. # See the code below for what gets defined based on each - it's more or less the defaults, but
  1975. # explicitly spelled out.
  1976. #
  1977.  
  1978. # No fair using either app and component manifest, and specifying sxs_manifest, or using both by accident
  1979. !if defined(SXS_APPLICATION_MANIFEST) && defined(SXS_COMPONENT_MANIFEST)
  1980. ! error You can have only one of SXS_APPLICATION_MANIFEST or SXS_COMPONENT_MANIFEST, not both
  1981. !elseif defined(SXS_MANIFEST) && ( defined(SXS_APPLICATION_MANIFEST) || defined(SXS_COMPONENT_MANIFEST) )
  1982. ! error When using SXS_APPLICATION_MANIFEST or SXS_COMPONENT_MANIFEST, do not specify SXS_MANIFEST
  1983. !endif
  1984.  
  1985. # Applications get the following defaults that are not defaulted later:
  1986. # - SXS_ASSEMBLY_LANGUAGE=SXS_ASSEMBLY_LANGUAGE_INDEPENDENT
  1987. # - SXS_ASSEMBLY_NAME=Microsoft.Windows.$(PROJECT).$(TARGETNAME)
  1988. # - Manifest in resources
  1989. !ifdef SXS_APPLICATION_MANIFEST
  1990. SXS_MANIFEST=$(SXS_APPLICATION_MANIFEST)
  1991. SXS_MANIFEST_IN_RESOURCES=1
  1992. SXS_NO_BINPLACE=1
  1993. !ifndef SXS_ASSEMBLY_NAME
  1994. SXS_ASSEMBLY_NAME=Microsoft.Windows.$(_PROJECT_:\=.).$(TARGETNAME:_=-)
  1995. !endif
  1996. !ifndef SXS_ASSEMBLY_LANGUAGE
  1997. SXS_ASSEMBLY_LANGUAGE_INDEPENDENT=1
  1998. !endif
  1999.  
  2000. # Components get the following defaulted:
  2001. # - SXS_ASSEMBLY_NAME=Microsoft.Windows.$(PROJECT).$(TARGETNAME)
  2002. # - Language independent
  2003. !elseif defined(SXS_COMPONENT_MANIFEST)
  2004. SXS_MANIFEST=$(SXS_COMPONENT_MANIFEST)
  2005. !ifndef SXS_ASSEMBLY_NAME
  2006. SXS_ASSEMBLY_NAME=Microsoft.Windows.$(_PROJECT_\=.).$(TARGETNAME)
  2007. !endif
  2008. !ifndef SXS_ASSEMBLY_LANGUAGE
  2009. SXS_ASSEMBLY_LANGUAGE_INDEPENDENT=1
  2010. !endif
  2011.  
  2012. !endif
  2013.  
  2014. !include $(NTMAKEENV)\verify.src
  2015.  
  2016. !ifdef ISOLATION_AWARE_ENABLED
  2017. C_DEFINES=$(C_DEFINES) /DISOLATION_AWARE_ENABLED=1
  2018. !endif
  2019.  
  2020. #
  2021. # NO_BINPLACE implies SXS_NO_BINPLACE
  2022. #
  2023. !ifdef NO_BINPLACE
  2024. SXS_NO_BINPLACE=1
  2025. !endif
  2026.  
  2027. #
  2028. # Building an .exe implies SXS_NO_BINPLACE, no publishing
  2029. #
  2030. !if "$(TARGETTYPE)" == "PROGRAM"
  2031. SXS_NO_BINPLACE=1
  2032. ! if ((defined(PASS0_PUBLISH))  || (defined(PASS1_PUBLISH))) && !defined(PUBLISH_EXE_ALLOWED)
  2033. !  error $(MAKEDIR) directories where TARGETTYPE is set to "PROGRAM" may not publish files
  2034. ! endif
  2035. !endif
  2036.  
  2037.  
  2038. #
  2039. # We can build SXS_ASSEMBLY_NAME out of SXS_SHORT_ASSEMBLY_NAME
  2040. # and vice versa.
  2041. #
  2042.  
  2043. !if !defined(SXS_ASSEMBLY_NAME) && defined(SXS_SHORT_ASSEMBLY_NAME)
  2044. SXS_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME)
  2045. !endif
  2046.  
  2047. !if !defined(SXS_SHORT_ASSEMBLY_NAME) && defined(SXS_ASSEMBLY_NAME)
  2048. SXS_SHORT_ASSEMBLY_NAME=$(SXS_ASSEMBLY_NAME)
  2049. !endif
  2050.  
  2051. #
  2052. # Support the idea of a hierarchical 8.3 name, besides that this
  2053. # transform might be applied after the preceding assignment.
  2054. #
  2055. # eg: msft-vcrtl => msft\vcrtl
  2056. #
  2057.  
  2058. # Turn hierarchical names using [-._ ] as the element divider
  2059. # into hierarchical file system names. (Note that _ and . are not
  2060. # currently allowed in assembly names.)
  2061. SXS_SHORT_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME:-=\)
  2062. SXS_SHORT_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME:_=\)
  2063. SXS_SHORT_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME:.=\)
  2064. SXS_SHORT_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME: =\)
  2065.  
  2066. # Shorten one special name that is likely to appear in long assembly names.
  2067. SXS_SHORT_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME:Microsoft=Msft)
  2068. SXS_SHORT_ASSEMBLY_NAME=$(SXS_SHORT_ASSEMBLY_NAME:microsoft=msft)
  2069.  
  2070. !if defined(SXS_MANIFEST_IN_RESOURCES) && !defined(SXS_MANIFEST)
  2071. ! error You must specify SXS_MANIFEST if you specify SXS_MANIFEST_IN_RESOURCES.
  2072. !endif
  2073.  
  2074. !if defined(SXS_ASSEMBLY_VERSION) && !defined(SXS_ASSEMBLY_NAME)
  2075. ! error You may not specify SXS_ASSEMBLY_VERSION without SXS_ASSEMBLY_NAME or SXS_SHORT_ASSEMBLY_NAME.
  2076. !endif
  2077.  
  2078. !if (defined(SXS_ASSEMBLY_LANGUAGE) || defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT)) && !defined(SXS_ASSEMBLY_NAME)
  2079. ! error You may not specify SXS_ASSEMBLY_LANGUAGE or SXS_ASSEMBLY_LANGUAGE_INDEPENDENT without SXS_ASSEMBLY_NAME or SXS_SHORT_ASSEMBLY_NAME.
  2080. !endif
  2081.  
  2082. !if defined(SXS_BINPLACE_ALSO_ROOT) && !defined(SXS_ASSEMBLY_NAME)
  2083. ! error You may not specify SXS_BINPLACE_ALSO_ROOT without SXS_ASSEMBLY_NAME or SXS_SHORT_ASSEMBLY_NAME.
  2084. !endif
  2085.  
  2086. !if defined(_ASSEMBLY_IDENTITY) && !defined(SXS_NO_BINPLACE) # {
  2087. # nothing
  2088. !elseif defined(SXS_ASSEMBLY_NAME) # } {
  2089. #
  2090. # SXS_ASSEMBLY_VERSION may only contain dots and digits.
  2091. # Removing them should leave nothing.
  2092. #
  2093. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_ASSEMBLY_VERSION)
  2094. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:.=)
  2095. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:0=)
  2096. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:1=)
  2097. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:2=)
  2098. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:3=)
  2099. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:4=)
  2100. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:5=)
  2101. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:6=)
  2102. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:7=)
  2103. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:8=)
  2104. SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:9=)
  2105. !if "$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS)" != ""
  2106. ! error SXS_ASSEMBLY_VERSION ($(SXS_ASSEMBLY_VERSION)) may only contain dots and digits.
  2107. !endif
  2108.  
  2109. #
  2110. # ASSERT(SXS_ASSEMBLY_LANGUAGE xor SXS_ASSEMBLY_LANGUAGE_INDEPENDENT)
  2111. #
  2112. !if    (!defined(SXS_ASSEMBLY_LANGUAGE) && !defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT))
  2113. ! error Must specify SXS_ASSEMBLY_LANGUAGE or SXS_ASSEMBLY_LANGUAGE_INDEPENDENT.
  2114. !endif
  2115.  
  2116. !if ( defined(SXS_ASSEMBLY_LANGUAGE) &&  defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT))
  2117. ! error Must not specify both SXS_ASSEMBLY_LANGUAGE and SXS_ASSEMBLY_LANGUAGE_INDEPENDENT.
  2118. ! error ( SXS_ASSEMBLY_LANGUAGE=$(SXS_ASSEMBLY_LANGUAGE), SXS_ASSEMBLY_LANGUAGE_INDEPENDENT=$(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT) )
  2119. !endif
  2120.  
  2121. #
  2122. # Derive from SXS_ASSEMBLY_LANGUAGE from SXS_ASSEMBLY_LANGUAGE_INDEPENDENT.
  2123. #
  2124. !if defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT) && !defined(SXS_ASSEMBLY_LANGUAGE)
  2125. SXS_ASSEMBLY_LANGUAGE=x-ww
  2126. !endif
  2127.  
  2128. #
  2129. # This is for Fusion stuff only. It does not need to match the nt subsystem version.
  2130. #
  2131. !ifndef SXS_ASSEMBLY_VERSION
  2132. SXS_ASSEMBLY_VERSION=5.1
  2133. !endif
  2134.  
  2135. #
  2136. # SxS Versions are Major.Minor.Release.Revision
  2137. #
  2138. !ifdef SXS_ASSEMBLY_VERSION # {
  2139.  
  2140. !ifndef SXS_ASSEMBLY_VERSION_PART_3
  2141. SXS_ASSEMBLY_VERSION_PART_3=0
  2142. !endif
  2143.  
  2144. !ifndef SXS_ASSEMBLY_VERSION_PART_4
  2145. SXS_ASSEMBLY_VERSION_PART_4=0
  2146. !endif
  2147.  
  2148. #
  2149. # If this is more than eight characters or not adequately unique, the user must specify it in their sources file.
  2150. #
  2151. !if "$(SXS_EIGHT_CHARACTER_VERSION_DIRECTORY_NAME_UNIQUIFIER)" == ""
  2152. !ifndef SXS_AUTO_VERSION
  2153. !if "$(SXS_ASSEMBLY_VERSION_PART_4)" != "0"
  2154. SXS_EIGHT_CHARACTER_VERSION_DIRECTORY_NAME_UNIQUIFIER=$(SXS_ASSEMBLY_VERSION:.=)$(SXS_ASSEMBLY_VERSION_PART_3)
  2155. !else
  2156. SXS_EIGHT_CHARACTER_VERSION_DIRECTORY_NAME_UNIQUIFIER=$(SXS_ASSEMBLY_VERSION:.=)$(SXS_ASSEMBLY_VERSION_PART_3)$(SXS_ASSEMBLY_VERSION_PART_4)
  2157. !endif
  2158. !else
  2159. SXS_EIGHT_CHARACTER_VERSION_DIRECTORY_NAME_UNIQUIFIER=$(SXS_ASSEMBLY_VERSION:.=)
  2160. !endif
  2161. !endif
  2162.  
  2163. SXS_ASSEMBLY_FULL_VERSION=$(SXS_ASSEMBLY_VERSION).$(SXS_ASSEMBLY_VERSION_PART_3).$(SXS_ASSEMBLY_VERSION_PART_4)
  2164.  
  2165. !endif # }
  2166.  
  2167. !ifndef SXS_NO_BINPLACE # {
  2168. #
  2169. # We might need SXS_ASSEMBLY_LANGUAGE and even SXS_ASSEMBLY_PROCESSOR_ARCHITECTURE
  2170. # in SXS_BINPLACE_DIR, esp. for example if we have any data only assemblies with
  2171. # the same name/version as code containing assemblies.
  2172. #
  2173. # Eventually the mapping from assembly metadata to run-time paths and
  2174. # build-time paths will be exposed by sxs.dll/sxs.lib consumed
  2175. # by build tools written in C/C++ (possibly just binplace).
  2176. # Build/Make are too constraining for our needs.
  2177. # For now we get by.
  2178. #
  2179. # "asms" is very special, it is the root of where assemblies are binplaced
  2180. # and it is the root of where they appear on the XP CD, in XP service packs,
  2181. # and QFEs. "asms" was replaced by asms01.cab in Server 2003.
  2182. # This string appears in a number of places:
  2183. #   \nt\tools\PostBuildScripts
  2184. #   \nt\admin\ntsetup\inf\win4\inf\dosnet.inx
  2185. #   \nt\admin\ntsetup\inf\win4\inf\syssetup.inx
  2186. #
  2187. # We place version in front of name due to restrictions on how the manifest
  2188. # file name related to the name of leaf directory it is in.
  2189. SXS_BINPLACE_DIR2=$(SXS_EIGHT_CHARACTER_VERSION_DIRECTORY_NAME_UNIQUIFIER)\$(SXS_SHORT_ASSEMBLY_NAME)
  2190. SXS_BINPLACE_DIR3=asms\$(SXS_BINPLACE_DIR2)
  2191. SXS_BINPLACE_RESOURCES_DIR=$(SXS_BINPLACE_DIR3).Resources
  2192.  
  2193. #
  2194. # create msms destination directory
  2195. #
  2196. !ifdef SXS_GENERATE_MERGE_MODULE # {
  2197.  
  2198. #
  2199. # if the generate mode is not defined, set it default : 0
  2200. #
  2201. !ifndef SXS_MERGE_MODULE_FOR_ASSEMBLY_GROUP
  2202. SXS_MERGE_MODULE_FOR_ASSEMBLY_GROUP=0
  2203. !else
  2204. SXS_MERGE_MODULE_FOR_ASSEMBLY_GROUP=1
  2205. !endif
  2206.  
  2207. !if "$(SXS_MERGE_MODULE_GUID)" == "" || "$(SXS_MERGE_MODULE_COMPONENT_GUID)" == ""  # {
  2208. !error MergeModule GUID and MergeModule Component must be specified
  2209. !endif # }
  2210.  
  2211. !ifndef SXS_MERGE_MODULE # { use the manifest basename as the msm basename
  2212. SXS_MERGE_MODULE=$(SXS_MANIFEST_BASENAME).msm
  2213. !endif #}
  2214.  
  2215. !ifndef SXS_MERGE_MODULE_LOCATION
  2216. SXS_MERGE_MODULE_DESTINATION=asm_msm\$(SXS_BINPLACE_DIR2)
  2217. !else
  2218. #
  2219. #parse this string to generate the real path
  2220. #
  2221. SXS_MERGE_MODULE_LOCATION=$(SXS_ASSEMBLY_FULL_VERSION:.=)\$(SXS_MERGE_MODULE_LOCATION)
  2222. SXS_MERGE_MODULE_LOCATION=$(SXS_MERGE_MODULE_LOCATION:-=\)
  2223. SXS_MERGE_MODULE_LOCATION=$(SXS_MERGE_MODULE_LOCATION:_=\)
  2224. SXS_MERGE_MODULE_LOCATION=$(SXS_MERGE_MODULE_LOCATION:.=\)
  2225. SXS_MERGE_MODULE_LOCATION=$(SXS_MERGE_MODULE_LOCATION: =\)
  2226. SXS_MERGE_MODULE_LOCATION=asm_msm\$(SXS_MERGE_MODULE_LOCATION)
  2227. !endif
  2228. !endif # }
  2229.  
  2230. BINPLACE_GENERATE_PLACEFILE=1
  2231. !if "$(BINPLACE_DESTINATIONS)" == ""
  2232. BINPLACE_DESTINATIONS=$(SXS_BINPLACE_DIR3)
  2233. !else
  2234. BINPLACE_DESTINATIONS=$(BINPLACE_DESTINATIONS):$(SXS_BINPLACE_DIR3)
  2235. !endif
  2236. BINPLACE_DESTINATIONS_NORETAIL=$(BINPLACE_DESTINATIONS)
  2237. !ifdef SXS_BINPLACE_ALSO_ROOT
  2238. BINPLACE_DESTINATIONS=$(BINPLACE_DESTINATIONS):retail
  2239. !endif
  2240.  
  2241. !endif # !SXS_NO_BINPLACE }
  2242.  
  2243. #
  2244. # Optionally uniquize the .pdb names, so they can go in a flat directory (%_nttree%\symbols.pri\retail\dll)
  2245. #
  2246. !ifndef SXS_LONG_PDB_NAME
  2247. SXS_LONG_PDB_NAME=$(SXS_PDB_WOW6432_W_PREFIX)$(SXS_ASSEMBLY_NAME:.=)-$(SXS_ASSEMBLY_FULL_VERSION:.=)-$(TARGETNAME:.=)
  2248. !endif
  2249. !ifndef SXS_NO_BINPLACE #{
  2250. !if !defined(TARGETPDB) && "$(SXS_USE_LONG_PDB_NAME)" == "1" && !defined(SXS_AUTO_VERSION)
  2251. LINKER_FLAGS=$(LINKER_FLAGS) /pdb:$(TARGETPATH)\$(TARGET_DIRECTORY)\$(SXS_LONG_PDB_NAME).pdb
  2252. !endif
  2253. SXS_BINPLACE_FLAGS=/ChangeAsmsToRetailForSymbols
  2254. !endif #}
  2255.  
  2256. !endif # !SXS_ASSEMBLY_NAME }
  2257.  
  2258. !if defined(BINPLACE_LOG) && !defined(NO_SXS_LOG)
  2259. !if !defined(NO_BINPLACE) && ("$(TARGETTYPE)" == "NOTARGET" || "$(MAKEDLL)" != "" || "$(BUILD_PASS)" == "PASS2")
  2260. SXS_LOG_PASS=1
  2261. SXS_LOG_CMD= ( echo. )
  2262. !endif
  2263. !endif
  2264.  
  2265. !if defined(SXS_LOG_PASS) && !defined(APPEND_TOOL)
  2266. APPEND_TOOL=appendtool
  2267. !endif
  2268.  
  2269. !ifdef SXS_MANIFEST # {
  2270.  
  2271. #
  2272. # If removing .manifest or .Manifest from SXS_MANIFEST leaves it unchanged,
  2273. # it doesn't contain either one and is invalid.
  2274. #
  2275. !if "$(SXS_MANIFEST:.Manifest=)" == "$(SXS_MANIFEST)" \
  2276.     && "$(SXS_MANIFEST:.manifest=)" == "$(SXS_MANIFEST)"
  2277. ! error SXS_MANIFEST ($(SXS_MANIFEST)) must contain ".Manifest", it must end in ".Manifest"
  2278. !endif
  2279.  
  2280. SXS_MANIFEST_SOURCE_FILENAME=$(SXS_MANIFEST:..\=)
  2281.  
  2282. SXS_MANIFEST_BASENAME=$(SXS_MANIFEST_SOURCE_FILENAME)
  2283. SXS_MANIFEST_BASENAME=$(SXS_MANIFEST_BASENAME:.manifest=)
  2284. SXS_MANIFEST_BASENAME=$(SXS_MANIFEST_BASENAME:.Manifest=)
  2285. SXS_MANIFEST_BASENAME=$(SXS_MANIFEST_BASENAME:.man=)
  2286. SXS_MANIFEST_BASENAME=$(SXS_MANIFEST_BASENAME:.Man=)
  2287.  
  2288. #
  2289. # Always make .man file in the obj directory.
  2290. #
  2291. SXS_MANIFEST_OBJ1=$(OBJ_PATH)\$O\$(SXS_MANIFEST_BASENAME).o_manifest
  2292.  
  2293. #
  2294. # If TARGETPDB is defined, we'll use the linker's default PDB name.
  2295. # if SXS_AUTO_VERSION is on, derive the PDB name from ntverp.h & sxsmanifest.h
  2296. # by preprocessing a .lnk file to provide the right /pdb flag to LINKER
  2297. #
  2298. !if defined(SXS_AUTO_VERSION) && !defined(TARGETPDB) && "$(SXS_USE_LONG_PDB_NAME)" == "1" && !defined(RESOURCE_ONLY_DLL)
  2299. SXS_PDB_NAMER=$(OBJ_PATH)\$O\$(SXS_MANIFEST_BASENAME)_pdb.lnk
  2300. !endif
  2301.  
  2302. !ifndef SXS_MANIFEST_IN_RESOURCES # {
  2303.  
  2304. #
  2305. # OBJ is files in obj\i386.
  2306. # BIN is binplaced files, possibly also in obj\i386.
  2307. #
  2308. # The binplaced file must be 8.3 in XP.
  2309. # The obj\i386 file
  2310. #  - should allow .exes to be run from obj\i386 that don't have manifest-in-resources
  2311. #  - not override manifest-in-resources
  2312. #
  2313. SXS_MANIFEST_BIN_FILENAME=$(SXS_MANIFEST_BASENAME).man
  2314.  
  2315. !if !defined(NO_BINPLACE) && !defined(SXS_NO_BINPLACE) && ("$(BUILD_PASS)" == "PASS1" || "$(BUILD_PASS)" == "PASSALL")
  2316. SXS_MISCFILES=$(SXS_MISCFILES) $(OBJ_PATH)\$O\$(SXS_MANIFEST_BASENAME).man
  2317. !endif
  2318.  
  2319. # Make a .manifest file identical to the .man file (we just copy it).
  2320. !if "$(TARGETTYPE)" != "NOTARGET" && ("$(MAKEDLL)" != "" || "$(BUILD_PASS)" == "PASS2")
  2321.  
  2322. SXS_MANIFEST_OBJ2=$(OBJ_PATH)\$O\$(TARGETNAME).$(TARGETEXT).manifest
  2323.  
  2324. !endif
  2325.  
  2326. !else # } SXS_MANIFEST_IN_RESOURCES { #
  2327.  
  2328. SXS_MANIFEST_BIN_FILENAME=$(TARGETNAME).$(TARGETEXT)
  2329.  
  2330. !ifndef SXS_MANIFEST_RESOURCE_ID # {
  2331. !if defined(ISOLATION_AWARE_ENABLED) || "$(TARGETTYPE)" == "DYNLINK"
  2332. SXS_MANIFEST_RESOURCE_ID=ISOLATIONAWARE_MANIFEST_RESOURCE_ID
  2333. !elseif "$(TARGETTYPE)" == "PROGRAM" || "$(TARGETTYPE)" == "PROGLIB" || "$(TARGETTYPE)" == "UMAPPL_NOLIB"
  2334. SXS_MANIFEST_RESOURCE_ID=CREATEPROCESS_MANIFEST_RESOURCE_ID
  2335. !endif
  2336. !endif # }
  2337.  
  2338. # Enforce icon sizes and bit depths by turning on "audit" mode
  2339. # Only x86 for now because icocomp, which fixes audit violations, is only checked in for x86
  2340. !ifndef NO_RC_AUDIT
  2341. !if $(386)
  2342. RCOPTIONS=/a $(RCOPTIONS)
  2343. !endif
  2344. !endif
  2345.  
  2346. #
  2347. # Putting manifests in resources requires no editing of the .rc file.
  2348. # We can do this via forceinclude-file or forceinclude-string.
  2349. # I thought rc.exe had a forceinclude-file feature like the C++ compiler.
  2350. # By the time I realized that it doesn't, it seemed better to press ahead
  2351. # with simulating it than not depend on it. There is unlikely any other way
  2352. # to support SXS_MANIFEST_IN_RESOURCES without requiring "nonlocal" .rc file
  2353. # edits (ie: without further fanning out how many files need to touched in how
  2354. # many places by clients who want to build sxs assemblies).
  2355. #
  2356. RCOPTIONS=-DSXS_MANIFEST_OBJ1="\"$(SXS_MANIFEST_OBJ1:\=/)\"" $(RCOPTIONS)
  2357. INCPATHRC=$(INCPATHRC)
  2358. RC_FORCE_INCLUDE_STRING=$(RC_FORCE_INCLUDE_STRING)^
  2359. ^#include "windows.h"^
  2360. ^/* RT_MANIFEST is in winuser.h and winuser.rh */^
  2361. $(SXS_MANIFEST_RESOURCE_ID) RT_MANIFEST SXS_MANIFEST_OBJ1
  2362. #RC_FORCE_INCLUDE_FILES=$(RC_FORCE_INCLUDE_FILES);$(BASE_INC_PATH)\SxsManifestInResource.rc2
  2363. #RC_FORCE_INCLUDE_STRING=
  2364.  
  2365. !endif # } SXS_MANIFEST_IN_RESOURCES
  2366.  
  2367. !ifdef SXS_LOG_PASS # {
  2368. #
  2369. # data for PostBuild/ManifestMangler
  2370. #
  2371.  
  2372. SXS_BINPLACE_LOG=$(BINPLACE_LOG)-sxs
  2373.  
  2374. !ifndef APPEND_CMD
  2375. APPEND_CMD=$(APPEND_TOOL) -file $(SXS_BINPLACE_LOG) -
  2376. !endif
  2377. _RUN_SXS_LOG_CMD=1
  2378. SXS_LOG_CMD= ( $(SXS_LOG_CMD) ) &                                          \
  2379.         ( echo                                                             \
  2380.         SXS_ASSEMBLY_NAME="$(SXS_ASSEMBLY_NAME)"                           \
  2381.         SXS_ASSEMBLY_VERSION="$(SXS_ASSEMBLY_FULL_VERSION)"                \
  2382.         SXS_ASSEMBLY_LANGUAGE="$(SXS_ASSEMBLY_LANGUAGE)"                   \
  2383.         SXS_MANIFEST="$(SXS_LOG_BINPLACE_WOW6432_PREFIX)$(SXS_BINPLACE_DIR3)\$(SXS_MANIFEST_BIN_FILENAME)"  \
  2384. !ifdef SXS_LOCALIZE_ASSEMBLY_MUI
  2385.         SXS_LOCALIZE_ASSEMBLY_MUI=$(SXS_LOCALIZE_ASSEMBLY_MUI) \
  2386. !endif
  2387. !ifdef SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY
  2388.         SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY=$(SXS_LOCALIZE_ASSEMBLY_SATELLITE_WITH_EXPLICIT_DEPENDENCY) \
  2389. !endif
  2390.         | $(APPEND_TOOL) -file $(BUILD_LOGS)\sidebyside\binplace_$(COMPUTERNAME).log-sxs - )
  2391.  
  2392.  
  2393. #
  2394. # Produce manifest-related, including
  2395. #       Required: catalog,
  2396. #       Optional: merge module
  2397. #
  2398. !ifndef SXS_NO_BINPLACE # {
  2399.  
  2400. !ifdef SXS_GENERATE_MERGE_MODULE   # { begin create log-file-entry for Assembly MergeModule
  2401.  
  2402. #
  2403. # the msm-log lsitfile is in the format of
  2404. #   SourceFileDirectory | Destination-MSM-Filename | MergeModuleID | MergeModuleComponent ID
  2405. #
  2406. !ifndef SXS_MERGE_MODULE_TXT_DATA   #{
  2407. SXS_MERGE_MODULE_TXT_DATA=\
  2408.  $(SXS_MERGE_MODULE_FOR_ASSEMBLY_GROUP),\
  2409.  $(SXS_MERGE_MODULE_GUID),\
  2410.  ..\$(SXS_MERGE_MODULE_LOCATION)\$(SXS_MERGE_MODULE),\
  2411.  ..\$(SXS_BINPLACE_DIR3)\$(SXS_MANIFEST_BASENAME).man,\
  2412.  $(SXS_MERGE_MODULE_COMPONENT_GUID)
  2413.  
  2414. !endif # }
  2415.  
  2416. !endif # } end create log-file-entry for Assembly MergeModule
  2417.  
  2418. !endif # SXS_NO_BINPLACE }
  2419.  
  2420. !endif # SXS_LOG_PASS }
  2421.  
  2422. !endif # SXS_MANIFEST }
  2423.  
  2424. !if defined(SXS_LOG_PASS) && defined(SXS_MERGE_MODULE_TXT_DATA) # {
  2425. SXS_MERGEMODULE_LIST_TXT=$(BUILD_LOGS)\sxsMsmList_$(COMPUTERNAME).txt
  2426. !if defined(SXS_MERGE_MODULE_TXT_DATA)
  2427. _RUN_SXS_LOG_CMD=1
  2428. SXS_LOG_CMD=( $(SXS_LOG_CMD) ) & ( echo $(SXS_MERGE_MODULE_TXT_DATA) | $(APPEND_TOOL) -file $(SXS_MERGEMODULE_LIST_TXT) - )
  2429. !endif
  2430.  
  2431. !endif # }
  2432.  
  2433. !endif # PASS_INDEPENDENT_TARGETS
  2434.  
  2435. #
  2436. # Do this independently of the presence of any other SXS options
  2437. # to aid .manifest preprocessing in the absense of any other sxs build support,
  2438. # like for users of CreateActCtx. The MultiRes test case uses this.
  2439. #
  2440. !ifndef SXS_PROCESSOR_ARCHITECTURE
  2441. !ifdef SXS_WOW6432
  2442. SXS_PROCESSOR_ARCHITECTURE=wow64
  2443. !elseif defined(_BUILDARCH)
  2444. SXS_PROCESSOR_ARCHITECTURE=$(_BUILDARCH)
  2445. !elseif $(386)
  2446. SXS_PROCESSOR_ARCHITECTURE=x86
  2447. !elseif $(IA64)
  2448. SXS_PROCESSOR_ARCHITECTURE=ia64
  2449. !else
  2450. ! error Cannot determine processorArchitecture.
  2451. !endif
  2452. !endif
  2453.  
  2454. !ifndef PASS_INDEPENDENT_TARGETS
  2455.  
  2456. !if defined(LOCALIZED_RESOURCES) && !defined(RCCODEPAGE)
  2457. ! if "$(LANGUAGE)" == "JPN" || "$(LANGUAGE)" == "jpn"
  2458. RCCODEPAGE=932
  2459. ! elseif "$(LANGUAGE)" == "KOR" || "$(LANGUAGE)" == "kor"
  2460. RCCODEPAGE=949
  2461. ! elseif "$(LANGUAGE)" == "CHS" || "$(LANGUAGE)" == "chs"
  2462. RCCODEPAGE=936
  2463. ! elseif "$(LANGUAGE)" == "CHP" || "$(LANGUAGE)" == "chp"
  2464. RCCODEPAGE=936
  2465. ! elseif "$(LANGUAGE)" == "CHT" || "$(LANGUAGE)" == "cht"
  2466. RCCODEPAGE=950
  2467. ! endif
  2468. !endif
  2469.  
  2470. #
  2471. # Set far east specific defines based on the project
  2472. #
  2473. DO_FE_SB=0
  2474.  
  2475. !endif # PASS_INDEPENDENT_TARGETS
  2476.  
  2477. !if "$(ALT_PROJECT_TARGET)" == ""
  2478. ALT_PROJECT_TARGET=.
  2479. !endif
  2480.  
  2481. !if 1 # PASS_INDEPENDENT_TARGETS
  2482.  
  2483. !if "$(ALT_PROJECT)" == "FE"  || \
  2484.     "$(ALT_PROJECT)" == "CHT" || \
  2485.     "$(ALT_PROJECT)" == "CHS" || \
  2486.     "$(ALT_PROJECT)" == "CHP" || \
  2487.     "$(ALT_PROJECT)" == "JPN" || \
  2488.     "$(ALT_PROJECT)" == "KOR" || \
  2489.     "$(ALT_PROJECT)" == "NEC_98"
  2490. C_DEFINES=$(C_DEFINES) /DDBCS /DKKBUGFIX
  2491. ASM_DEFINES=$(ASM_DEFINES) /DDBCS /DKKBUGFIX
  2492. DO_FE_SB=1
  2493. !endif
  2494.  
  2495. !if "$(ALT_PROJECT)" == "CHT"
  2496. C_DEFINES=$(C_DEFINES) /DTAIWAN
  2497. ASM_DEFINES=$(ASM_DEFINES) /DTAIWAN
  2498. !elseif "$(ALT_PROJECT)" == "CHS" || "$(ALT_PROJECT)" == "CHP"
  2499. C_DEFINES=$(C_DEFINES) /DPRC
  2500. ASM_DEFINES=$(ASM_DEFINES) /DPRC
  2501. !elseif "$(ALT_PROJECT)" == "JPN"
  2502. C_DEFINES=$(C_DEFINES) /DJAPAN
  2503. ASM_DEFINES=$(ASM_DEFINES) /DJAPAN
  2504. !elseif "$(ALT_PROJECT)" == "KOR"
  2505. C_DEFINES=$(C_DEFINES) /DKOREA
  2506. ASM_DEFINES=$(ASM_DEFINES) /DKOREA
  2507. !elseif "$(ALT_PROJECT)" == "NEC_98"
  2508. C_DEFINES=$(C_DEFINES) /DJAPAN /DNEC_98
  2509. ASM_DEFINES=$(ASM_DEFINES) /DJAPAN /DNEC_98
  2510. !elseif "$(ALT_PROJECT)" != ""
  2511. C_DEFINES=$(C_DEFINES) /D_$(ALT_PROJECT)_
  2512. !endif
  2513.  
  2514. !IF "$(ALT_PROJECT)" == "HYDRA"
  2515. ASM_DEFINES=$(ASM_DEFINES) /D_HYDRA_
  2516. HYDRA=1
  2517. !ENDIF
  2518.  
  2519. !IF "$(ALT_PROJECT)" == "JANUS"
  2520. ASM_DEFINES=$(ASM_DEFINES) /D_JANUS_
  2521. C_DEFINES=$(C_DEFINES) /D_JANUS_
  2522. JANUS=1
  2523. !ENDIF
  2524.  
  2525. !IF ("$(NO_W32_SB)" == "" && "$(W32_SB)" == "1")
  2526. DO_FE_SB=1
  2527. ! ENDIF
  2528.  
  2529. !IF "$(DO_FE_SB)" == "1"
  2530. C_DEFINES=$(C_DEFINES) /DFE_SB /DFE_IME
  2531. ASM_DEFINES=$(ASM_DEFINES) /DFE_SB
  2532. !ENDIF
  2533.  
  2534. !IF "$(ALT_PROJECT)" == "DS"
  2535. # Nothing, just /D_DS_ from above
  2536. !ENDIF
  2537.  
  2538. !ifdef RESOURCE_ONLY_DLL
  2539. # Resource only DLL's have no exports, no entrypoint, no code, no data, no debug symbolic.
  2540. LINKER_FORCE_NO_DBG_SECTION=1
  2541. NO_DLL_EXPORTS=1
  2542. !undef DLLENTRY
  2543. !undef NOLINK
  2544. !undef USE_MSVCRT
  2545. !undef USE_LIBCMT
  2546. !undef USE_LIBCNTPR
  2547. NO_BROWSER_FILE=1
  2548. LINK_NO_RELEASE=1
  2549. MAKEDLL=1
  2550. TARGETLIBS=
  2551. LINKLIBS=
  2552. DLLDEF_OBJECTS=
  2553. USE_NOLIBS=1
  2554. NO_NTDLL=1
  2555. AFX_FORCE_STDAFX=
  2556. AFX_FORCE_USRDLL=
  2557. MFC_LIBS=
  2558. ! ifndef SUBSYSTEM_VERSION
  2559. SUBSYSTEM_VERSION=$(SUBSYSTEM_VERSION_LATEST)
  2560. ! endif
  2561. !else
  2562. ! ifdef USE_INCREMENTAL_LINKING
  2563. LINKER_DBG_SECTION=/debug /debugtype:cv,pdata
  2564. ! else
  2565. LINKER_DBG_SECTION=/debug /debugtype:cv,fixup,pdata
  2566. ! endif
  2567. AFX_FORCE_STDAFX=/include:__afxForceSTDAFX
  2568. AFX_FORCE_USRDLL=/include:__afxForceUSRDLL
  2569. !endif
  2570.  
  2571. !ifdef LINKER_FORCE_NO_DBG_SECTION
  2572. LINKER_DBG_SECTION=/debug:NONE
  2573. !endif
  2574.  
  2575. !ifdef PURE_FORWARDER_DLL
  2576. BUFFER_OVERFLOW_CHECKS=0
  2577. USE_NOLIBS=1
  2578. NO_NTDLL=1
  2579. TARGETLIBS=
  2580. ! ifndef SUBSYSTEM_VERSION
  2581. SUBSYSTEM_VERSION=$(SUBSYSTEM_VERSION_LATEST)
  2582. ! endif
  2583. !endif
  2584.  
  2585. # File System drivers have different deprecation rules from regular drivers
  2586. !if defined(DEPRECATE_DDK_FUNCTIONS) && ("$(DRIVERTYPE)" != "FS") && ("$(DRIVERTYPE)" != "fs")
  2587. C_DEFINES=$(C_DEFINES) /DDEPRECATE_DDK_FUNCTIONS=1
  2588. !endif
  2589.  
  2590. !if defined(TARGETPATHLIB)
  2591. ! if ("$(TARGETTYPE)" == "DYNLINK") || ("$(TARGETTYPE)" == "EXPORT_DRIVER")
  2592. !  if "$(MAKEDLL)" == ""
  2593. # Pass 1 of a two pass build.  Make sure TargetPath is the same as targetpathlib.
  2594. NO_BROWSER_FILE=1
  2595. TARGETPATH=$(TARGETPATHLIB)
  2596. !  endif
  2597. ! endif
  2598. !else
  2599. TARGETPATHLIB=$(TARGETPATH)
  2600. !endif
  2601.  
  2602. !if ("$(TARGETPATH)" == "$(BASEDIR)\lib") || ("$(TARGETPATH)" == "$(BASEDIR)\LIB")
  2603. !  error Setting TARGETPATH=$(BASEDIR)\lib in sources is not valid -- please remove TARGETPATH.
  2604. !endif
  2605.  
  2606. !if !defined(TARGETTYPE)
  2607. !  error Your .\sources file must define the TARGETTYPE macro.
  2608. !endif
  2609.  
  2610. !if "$(TARGETTYPE)" != "NOTARGET" # { {
  2611.  
  2612. !  if !defined(TARGETNAME) # { {
  2613. !    error Your sources. file must define the TARGETNAME macro.
  2614. !  endif # } }
  2615.  
  2616. !  if !defined(SOURCES) && !defined(PASS_INDEPENDENT_TARGETS) # { {
  2617. !    error Your sources. file must define the SOURCES macro.
  2618. !  endif # } }
  2619.  
  2620. !else # } { TARGETTYPE == NOTARGET
  2621.  
  2622. !  if defined(SOURCES) && "$(SOURCES: =)" == "" # { {
  2623. #!    error $(MAKEDIR) Remove empty SOURCES macro.
  2624. !  endif # } }
  2625.  
  2626. !  if defined(TARGETNAME) && "$(TARGETNAME: =)" == "" # { {
  2627. #!    error $(MAKEDIR) Remove empty TARGETNAME macro.
  2628. !  endif # } }
  2629.  
  2630. !  if !defined(TARGETNAME) # { {
  2631. TARGETNAME=
  2632. !  endif # } }
  2633.  
  2634. !endif # } } TARGETTYPE == NOTARGET
  2635.  
  2636. #!if defined(SOURCES) && "$(SOURCES: =)" == "" && "$(TARGETTYPE)" == "NOTARGET"
  2637. #! error $(MAKEDIR) Remove empty SOURCES macro.
  2638. #!endif
  2639.  
  2640. !if defined(MC_FLAGS)
  2641. ! if   "$(MC_FLAGS:-z=)" != "$(MC_FLAGS)" \
  2642.     || "$(MC_FLAGS:/z=)" != "$(MC_FLAGS)" \
  2643.     || "$(MC_FLAGS:/Z=)" != "$(MC_FLAGS)" \
  2644.     || "$(MC_FLAGS:-Z=)" != "$(MC_FLAGS)"
  2645. !  error MC_FLAGS must not contain /z.
  2646. ! endif
  2647. !endif
  2648.  
  2649. !if defined(FORCENATIVEOBJECT)
  2650. !  if "$(FORCENATIVEOBJECT)" != "1"
  2651. !    error FORCENATIVEOBJECT must be 1 or not defined.
  2652. !  endif
  2653. !endif
  2654.  
  2655. !if defined(TEST_CODE)
  2656. !  if "$(TEST_CODE)" != "1"
  2657. !    error TEST_CODE must be 1 or not defined.
  2658. !  endif
  2659. !endif
  2660.  
  2661. !if "$(MSC_OPTIMIZATION)" != "$(MSC_OPTIMIZATION:Od=)"
  2662. # FORCENATIVEOBJECT=1
  2663. # Define MSC_NOOPT if optimizations are disabled.
  2664. C_DEFINES=$(C_DEFINES) /DMSC_NOOPT
  2665. !endif
  2666.  
  2667. !ifndef COFFBASE_TXT_FILE
  2668. COFFBASE_TXT_FILE = $(NTMAKEENV)\coffbase.txt
  2669. !endif
  2670.  
  2671. !IFNDEF UMBASE
  2672. ! IFDEF COFFBASE
  2673. UMBASE=@$(COFFBASE_TXT_FILE),$(COFFBASE)
  2674. ! ELSE
  2675. !  if $(WIN64)
  2676. !    if $(AMD64)
  2677. UMBASE=@$(COFFBASE_TXT_FILE),usermode64
  2678. !    else
  2679. #     Enable this for IA64 too
  2680. UMBASE=@$(COFFBASE_TXT_FILE),usermode
  2681. !    endif
  2682. !  else
  2683. UMBASE=@$(COFFBASE_TXT_FILE),usermode
  2684. !  endif
  2685. ! ENDIF
  2686. !ENDIF
  2687.  
  2688. LINKLIBS=$(LINKLIBS) $(PERFLIBS)
  2689.  
  2690. !if !defined(ATL_VER)
  2691. ATL_VER=71
  2692. !endif
  2693.  
  2694. !if ("$(ATL_VER)" == "70" || "$(ATL_VER)" == "71" || "$(ATL_VER)" == "80") && \
  2695.     (defined(USE_ATL) || defined(USE_STATIC_ATL))
  2696.  
  2697. ATL_INCLUDES=$(ATL_INC_ROOT)\atl71
  2698.  
  2699. ATL_DEFINES=/D_ATL_STATIC_REGISTRY
  2700. ! ifdef DEBUG_CRTS
  2701. ATL_STATIC_LIBS=$(ATL_LIB_PATH)\atlsd.lib
  2702. ATL_LIBS=
  2703. ! else
  2704. ATL_STATIC_LIBS=$(ATL_LIB_PATH)\atls.lib
  2705. ATL_LIBS=
  2706. ! endif
  2707. ATL_LIBS=$(ATL_LIBS) $(ADDITIONAL_ATL_LIBS)
  2708. ! if !defined(BUFFER_OVERFLOW_CHECKS)
  2709. BUFFER_OVERFLOW_CHECKS=1
  2710. ! endif
  2711. !else
  2712. ! ifdef USE_ATL
  2713. ATL_INCLUDES=$(ATL_INC_ROOT)\atl$(ATL_VER)
  2714. ATL_DEFINES=/D_ATL_DLL
  2715. ATL_LIBS=$(ATL_LIB_PATH)\atl.lib $(ADDITIONAL_ATL_LIBS)
  2716. ! elseif defined(USE_STATIC_ATL)
  2717. ATL_INCLUDES=$(ATL_INC_ROOT)\atl$(ATL_VER)
  2718. ATL_LIBS=$(ADDITIONAL_ATL_LIBS)
  2719. ATL_DEFINES=/D_ATL_STATIC_REGISTRY
  2720. ! endif
  2721. !endif
  2722.  
  2723. !ifdef USE_WTL
  2724. !ifdef WTL_INC_PATH
  2725. WTL_INCLUDES=$(WTL_INC_PATH)\wtl
  2726. !else
  2727. WTL_INCLUDES=$(SDK_INC_PATH)\wtl
  2728. !endif
  2729. !endif
  2730.  
  2731. !ifdef USE_TEST_LOGGING
  2732. INCLUDES=$(INCLUDES);$(SDKTOOLS_INC_PATH)
  2733. TARGETLIBS=$(SDKTOOLS_LIB_PATH)\wttlog.lib $(TARGETLIBS)
  2734. !endif
  2735.  
  2736. !if defined(USE_MSVCRT20)
  2737. ! error $(MAKEDIR): USE_MSVCRT20 does nothing. Remove it or change to USE_MSVCRT=1
  2738. !endif
  2739.  
  2740. !if defined(USE_MSVCRT40)
  2741. ! error $(MAKEDIR): USE_MSVCRT40 does nothing. Remove it or change to USE_MSVCRT=1
  2742. !endif
  2743.  
  2744. !if defined(USE_CRTDLL)
  2745. ! error $(MAKEDIR): USE_CRTDLL does nothing. Remove it or change to USE_MSVCRT=1
  2746. !endif
  2747.  
  2748. !if defined(CRTDLL)
  2749. ! error $(MAKEDIR): CRTDLL does nothing. Remove it or change to USE_MSVCRT=1
  2750. !endif
  2751.  
  2752. !if defined(USE_IERT)
  2753. ! error USE_IERT is not supported.
  2754. !endif
  2755.  
  2756. !IF DEFINED(USE_MFC) || DEFINED(USE_MFCUNICODE)
  2757.  
  2758. !if "$(PLATFORM_MFC_VER)" != "0x0600"
  2759. # MFC versions before 6.0 need NT4/Win95 values. Override at your own risk.
  2760. !ifndef WIN32_WINNT_VERSION
  2761. WIN32_WINNT_VERSION=0x0400
  2762. !endif
  2763. !ifndef WIN32_IE_VERSION
  2764. WIN32_IE_VERSION=0x0300
  2765. !endif
  2766. !else   # MFC post 6x defaults to the current version of IE/Win2k.
  2767. !ifndef WIN32_WINNT_VERSION
  2768. WIN32_WINNT_VERSION=$(CURRENT_WIN32_WINNT_VERSION)
  2769. !endif
  2770. !ifndef WIN32_IE_VERSION
  2771. WIN32_IE_VERSION=$(CURRENT_WIN32_IE_VERSION)
  2772. !endif
  2773. !endif
  2774.  
  2775. !ifndef WIN32_WIN95_VERSION
  2776. WIN32_WIN95_VERSION=$(LATEST_WIN32_WIN95_VERSION)
  2777. !endif
  2778.  
  2779. !ifndef WIN32_WCE_VERSION
  2780. WIN32_WCE_VERSION=$(LATEST_WIN32_WCE_VERSION)
  2781. !endif
  2782.  
  2783. #---------------------------------------------------------#
  2784. # this set of defines establishes the "correct" build     #
  2785. # environment for an app that needs to use MFC.  the      #
  2786. # app's sources file only needs to specify USE_MFC=1      #
  2787. # and this makefile will set the enviroment up correctly. #
  2788. #---------------------------------------------------------#
  2789.  
  2790. ! ifndef UMENTRY
  2791. !  ifdef USE_MFCUNICODE
  2792. UMENTRY=wwinmain
  2793. !  else
  2794. UMENTRY=winmain
  2795. !  endif
  2796. ! endif
  2797.  
  2798. ! if "$(TARGETTYPE)" == "DYNLINK" && !defined(RESOURCE_ONLY_DLL)
  2799. !  ifndef DLLENTRY
  2800. DLLENTRY=_DllMainCRTStartup
  2801. !  endif
  2802. ! endif
  2803.  
  2804. ! ifndef UMTYPE
  2805. UMTYPE=windows
  2806. ! endif
  2807.  
  2808. UMENTRYABS=
  2809.  
  2810. # Allow other MFC's.
  2811. #  To do so, you need to:
  2812. #    1. Define MFC_INCLUDES to point to your MFC headers.
  2813. #    2. Define MFC_LIBS to point to your MFC libraries (specifically, the dll
  2814. #       library)
  2815. #    3. Define USE_MSVCRT=1 if you don't want to link with the NT CRT DLL.
  2816. #
  2817. #  Note:
  2818. #     There is only one type of build (_AFXDLL or MFC in a DLL linking to the
  2819. #     CRT in a dll).
  2820. #     You should disable the alternate MFC's if compiling for RISC platforms.
  2821. #     You need to handle specifying the correct libs for Check/Free and
  2822. #     Ansi/Unicode.
  2823.  
  2824. ! if !defined(USE_MSVCRT) && !defined(USE_NOLIBS)
  2825. !  ifdef USE_STATIC_MFC
  2826. USE_LIBCMT=1
  2827. !  else
  2828. USE_MSVCRT=1
  2829. !  endif
  2830. ! endif
  2831.  
  2832. # Add MFC_FLAGS in just in case there's old sources files that use it.
  2833.  
  2834. MFC_DEFINES=$(MFC_DEFINES) $(MFC_FLAGS) /D_AFX_NOFORCE_LIBS /D_MFC_VER=$(PLATFORM_MFC_VER)
  2835.  
  2836. ! ifdef DEBUG_CRTS
  2837. MFC_DEFINES=$(MFC_DEFINES) /D_AFX_ENABLE_INLINES
  2838. ! endif
  2839.  
  2840. ! IFDEF USE_MFCUNICODE
  2841. MFC_DEFINES=$(MFC_DEFINES) /DUNICODE /D_UNICODE
  2842. ! ENDIF
  2843.  
  2844. # Assume Latest MFC (4.0 for now)
  2845.  
  2846. ! ifndef USE_STATIC_MFC
  2847. MFC_DEFINES=$(MFC_DEFINES) /D_AFXDLL
  2848. LINKER_FLAGS = $(LINKER_FLAGS) $(AFX_FORCE_STDAFX)
  2849. ! endif
  2850. ! ifdef MFC_USRDLL
  2851. MFC_DEFINES=$(MFC_DEFINES) /D_USRDLL
  2852. LINKER_FLAGS = $(LINKER_FLAGS) $(AFX_FORCE_USRDLL)
  2853. ! endif
  2854.  
  2855. # MFC 4 uses Native EH only
  2856.  
  2857. !ifndef USE_NATIVE_EH
  2858. USE_NATIVE_EH=1
  2859. !endif
  2860. USE_RTTI=1
  2861.  
  2862. # UNICODE must use the UNICODE entrypoint
  2863.  
  2864. ! ifdef USE_MFCUNICODE
  2865. !  if "$(UMENTRY)" == "winmain"
  2866. UMENTRY = wwinmain
  2867. !  else if "$(UMENTRY)" == "main"
  2868. UMENTRY = wmain
  2869. !  endif
  2870. ! endif
  2871.  
  2872. ! ifndef MFC_VER
  2873. MFC_VER=42
  2874. ! else if "$(MFC_VER)" == "40" && !defined(USE_STATIC_MFC)
  2875. !error $(MAKEDIR) MFC_VER=40 is not supported.
  2876. ! endif
  2877.  
  2878. !ifndef MFC_INC_PATH
  2879. MFC_INC_PATH=$(MFC_INC_ROOT)\mfc$(MFC_VER)
  2880. !endif
  2881.  
  2882. ! ifndef MFC_DAO_INC
  2883. MFC_DAO_INC=$(MFC_INC_ROOT)\dao350
  2884. ! endif
  2885.  
  2886. ! ifndef MFC_INCLUDES
  2887. MFC_INCLUDES=$(MFC_INC_PATH);$(MFC_DAO_INC)
  2888. !  ifdef MFC_LANGUAGE
  2889. MFC_INCLUDES=$(MFC_INC_PATH)\l.$(MFC_LANGUAGE);$(MFC_INCLUDES)
  2890. !  endif
  2891. ! endif
  2892.  
  2893. ! ifndef MFC_LIBS
  2894. !  ifdef USE_STATIC_MFC
  2895.  
  2896. !   ifdef DEBUG_CRTS
  2897. !    ifdef USE_MFCUNICODE
  2898. MFC_STATIC_LIB =
  2899. MFC_LIBS=$(MFC_LIB_PATH)\uafxcwd.lib
  2900. !    else
  2901. MFC_STATIC_LIB =
  2902. MFC_LIBS=$(MFC_LIB_PATH)\nafxcwd.lib
  2903. !    endif
  2904. !   else
  2905. !    ifdef USE_MFCUNICODE
  2906. MFC_STATIC_LIB =
  2907. MFC_LIBS=$(MFC_LIB_PATH)\uafxcw.lib
  2908. !    else
  2909. MFC_STATIC_LIB =
  2910. MFC_LIBS=$(MFC_LIB_PATH)\nafxcw.lib
  2911. !    endif
  2912. !   endif
  2913.  
  2914. !  else                # USE_STATIC_MFC
  2915.  
  2916. !   ifdef DEBUG_CRTS
  2917. !    ifdef USE_MFCUNICODE
  2918. MFC_STATIC_LIB = $(MFC_LIB_PATH)\mfcs$(MFC_VER)ud.lib
  2919. MFC_LIBS=$(MFC_LIB_PATH)\mfc$(MFC_VER)ud.lib  \
  2920.          $(MFC_LIB_PATH)\mfcd$(MFC_VER)ud.lib \
  2921.          $(MFC_LIB_PATH)\mfcn$(MFC_VER)ud.lib \
  2922.          $(MFC_LIB_PATH)\mfco$(MFC_VER)ud.lib
  2923. !    else
  2924. MFC_STATIC_LIB = $(MFC_LIB_PATH)\mfcs$(MFC_VER)d.lib
  2925. MFC_LIBS=$(MFC_LIB_PATH)\mfc$(MFC_VER)d.lib  \
  2926.          $(MFC_LIB_PATH)\mfcd$(MFC_VER)d.lib \
  2927.          $(MFC_LIB_PATH)\mfcn$(MFC_VER)d.lib \
  2928.          $(MFC_LIB_PATH)\mfco$(MFC_VER)d.lib
  2929. !    endif
  2930. !   else
  2931. !    ifdef USE_MFCUNICODE
  2932. MFC_STATIC_LIB = $(MFC_LIB_PATH)\mfcs$(MFC_VER)u.lib
  2933. MFC_LIBS=$(MFC_LIB_PATH)\mfc$(MFC_VER)u.lib
  2934. !    else
  2935. MFC_STATIC_LIB = $(MFC_LIB_PATH)\mfcs$(MFC_VER).lib
  2936. MFC_LIBS=$(MFC_LIB_PATH)\mfc$(MFC_VER).lib
  2937. !    endif
  2938. !   endif
  2939. MFC_LIBS=$(MFC_STATIC_LIB) $(MFC_LIBS)
  2940. # SUBSYSTEM_VERSIONX isn't available yet.
  2941. # Communicate to when it is available that MFC_LIBS comes
  2942. # from makefile.def and is not user-specified.
  2943. _PROVIDE_MFC_LIBS=1
  2944. !  endif               # USE_STATIC_MFC
  2945. ! endif                # MFC_LIBS
  2946. !endif                 # USE_MFC
  2947.  
  2948. !IFNDEF UMTYPE
  2949. !if "$(TARGETTYPE)" == "DYNLINK" || \
  2950.     "$(TARGETTYPE)" == "LIBRARY" || \
  2951.     "$(TARGETTYPE)" == "USER_ASSISTANCE" || \
  2952.     "$(TARGETTYPE)" == "NOTARGET"
  2953. UMTYPE=console
  2954. !elseif (defined(_C_SHARP) || defined(_VB) || defined(_TLBIMP)) && "$(TARGETTYPE)" == "PROGRAM"
  2955. UMTYPE=windows
  2956. !else
  2957. UMTYPE=nt
  2958. !endif
  2959. !ENDIF
  2960.  
  2961. !ifdef USE_MFC30
  2962. ! error USE_MFC30 is not supported.
  2963. !else
  2964. ! ifdef DEBUG_CRTS
  2965. DCRT=d
  2966. LIBC_DEFINES = /D_DEBUG /D_SYSCRT_DEBUG
  2967. ! else
  2968. !  if $(FREEBUILD)
  2969. DCRT=
  2970. LIBC_DEFINES = /DNDEBUG
  2971. !  else
  2972. DCRT=
  2973. LIBC_DEFINES =
  2974. !  endif
  2975. ! endif
  2976. !endif
  2977.  
  2978. !if defined(_USE_LIBCMMT)
  2979. C_DEFINES=$(C_DEFINES) /D_STATIC_MGDLIB
  2980. !endif
  2981.  
  2982. !if defined(USE_NTDLL)
  2983. ! if defined(USE_LIBCMT)
  2984. !error USE_NTDLL defined with USE_LIBCMT
  2985. ! elseif defined(USE_MSVCRT)
  2986. !error USE_NTDLL defined with USE_MSVCRT
  2987. ! elseif defined(USE_LIBCNTPR)
  2988. !error USE_NTDLL defined with USE_LIBCNTPR
  2989. ! endif
  2990. !endif
  2991.  
  2992. !if defined(USE_MSVCRT)
  2993. ! if "$(UMTYPE)" == "nt" || "$(UMTYPE)" == "ntss"
  2994. ! error USE_MSVCRT not compatible with UMTYPE=nt or ntss
  2995. ! endif
  2996.  
  2997. !  ifdef MANAGED_CXX
  2998. !   if "$(MCPP_TYPE)" == "safe"
  2999. !   elseif "$(MCPP_TYPE)" == "pure"
  3000. !    ifdef USE_PTRUST
  3001. LIBC_LIB=$(CRT_LIB_PATH)\ptrustu.lib
  3002. !    endif
  3003. FORCENATIVEOBJECT=1
  3004. NO_NTDLL=1
  3005. !   else
  3006. !    if "$(URT_VER)" >= "2.0"
  3007. LIBC_LIB=$(CRT_LIB_PATH)\msvcrt$(DCRT).lib
  3008. !     if !defined(USE_NOUUIDLIB)
  3009. LIBC_LIB=$(LIBC_LIB) $(SDK_LIB_PATH)\uuid.lib
  3010. !     endif
  3011. !    else
  3012. LIBC_LIB=$(CRT_LIB_PATH)\msvcrt$(DCRT).lib
  3013. !    endif
  3014. !   endif
  3015. !   if !defined(DLLENTRY) && "$(URT_VER)" >= "2.0" && "$(TARGETTYPE)" == "DYNLINK"
  3016. DLLENTRY=_DllMainCRTStartup
  3017. !   endif
  3018.  
  3019. LIBC_LIB=\
  3020.     $(LIBC_LIB) \
  3021.     $(SDK_LIB_PATH)\mscoree.lib \
  3022.     $(SDK_LIB_PATH)\ole32.lib
  3023.  
  3024. !  else
  3025. !   if !defined(USE_NOCRTLIBS)
  3026. LIBC_LIB=$(CRT_LIB_PATH)\msvcrt$(DCRT).lib
  3027. !   endif
  3028. !  endif
  3029.  
  3030. !  ifdef USE_IOSTREAM
  3031. LIBC_LIB=$(LIBC_LIB) $(CRT_LIB_PATH)\msvcirt$(DCRT).lib
  3032. !  endif
  3033. !  ifdef USE_STL
  3034. !   if "$(STL_VER)" == "70"
  3035. !    if (!defined(_USE_LIBCMMT) && !defined(MCPP_TYPE)) || "$(URT_VER)" == "1.1"
  3036. LIBC_LIB=$(SDK_LIB_PATH)\ntstc_msvcrt.lib $(LIBC_LIB)
  3037. !    endif
  3038. LIBC_DEFINES=$(LIBC_DEFINES) /D_STATIC_CPPLIB /D_STL70_
  3039. !   else
  3040. !    if !defined(MCPP_TYPE)
  3041. LIBC_LIB=$(CRT_LIB_PATH)\msvcprt$(DCRT).lib $(LIBC_LIB)
  3042. !    endif
  3043. !   endif
  3044. !  endif
  3045. LIBC_DEFINES=$(LIBC_DEFINES) /D_DLL=1 /D_MT=1
  3046.  
  3047. !elseif defined(USE_LIBCMT)
  3048.  
  3049. LIBC_LIB=$(CRT_LIB_PATH)\libcmt$(DCRT).lib
  3050. ! ifdef MANAGED_CXX
  3051. LIBC_LIB=$(LIBC_LIB) $(SDK_LIB_PATH)\mscoree.lib
  3052. ! endif
  3053. ! ifdef USE_IOSTREAM
  3054. LIBC_LIB=$(CRT_LIB_PATH)\libcimt$(DCRT).lib $(LIBC_LIB)
  3055. ! endif
  3056. ! ifdef USE_STL
  3057. !  if "$(STL_VER)" == "70"
  3058. !    if !defined(_USE_LIBCMMT) || "$(URT_VER)" == "1.1"
  3059. LIBC_LIB=$(SDK_LIB_PATH)\ntstc_libcmt.lib $(LIBC_LIB)
  3060. !    endif
  3061. LIBC_DEFINES=$(LIBC_DEFINES) /D_STATIC_CPPLIB /D_STL70_
  3062. !  else
  3063. !    if !defined(_USE_LIBCMMT)
  3064. LIBC_LIB=$(CRT_LIB_PATH)\libcpmt$(DCRT).lib $(LIBC_LIB)
  3065. !    endif
  3066. !  endif
  3067. ! endif
  3068. LIBC_DEFINES=$(LIBC_DEFINES) /D_MT=1
  3069.  
  3070. !elseif defined(USE_LIBCNTPR)
  3071.  
  3072. LIBC_LIB=$(SDK_LIB_PATH)\libcntpr.lib
  3073. LIBC_LIB=$(CRT_LIB_PATH)\safecrtnt.lib $(LIBC_LIB)
  3074. CRT_BUILD_FLAGS=/MT /U_MT
  3075.  
  3076. !elseif (defined(USE_NTDLL) || \
  3077.        "$(TARGETTYPE)" == "DRIVER" || \
  3078.        "$(TARGETTYPE)" == "EXPORT_DRIVER")
  3079.  
  3080. LIBC_DEFINES=$(LIBC_DEFINES) /D_DLL=1 /DNDEBUG
  3081. LIBC_LIB=
  3082.  
  3083. !elseif defined(USE_NOLIBS) || \
  3084.        "$(TARGETTYPE)" == "HAL" || \
  3085.        "$(TARGETTYPE)" == "GDI_DRIVER"
  3086.  
  3087. LIBC_DEFINES=$(LIBC_DEFINES) /DNDEBUG
  3088. NO_NTDLL=1
  3089.  
  3090. !else
  3091. LIBC_LIB=
  3092. CRT_BUILD_FLAGS=/MT /U_MT
  3093. ! ifdef USE_STL
  3094. !   error "single thread CRT with STL not supported - add USE_LIBCMT=1 or USE_MSVCRT=1"
  3095. ! endif
  3096. ! ifdef USE_IOSTREAM
  3097. !   error "single thread CRT with IOSTREAM not supported - add USE_LIBCMT=1 or USE_MSVCRT=1"
  3098. ! endif
  3099.  
  3100. !endif
  3101.  
  3102. !ifdef USE_SAFECRTNT
  3103. LIBC_LIB =  $(CRT_LIB_PATH)\safecrtnt.lib $(LIBC_LIB)
  3104. !endif
  3105.  
  3106. !ifdef USE_VCCOM
  3107. LIBC_LIB = $(SDK_LIB_PATH)\vccomsup.lib $(LIBC_LIB)
  3108. !endif
  3109.  
  3110. !ifdef _USE_LIBCMMT
  3111. !  if "$(MCPP_TYPE)" == "pure"
  3112. LIBC_LIB=$(CRT_LIB_PATH)\libcummt$(DCRT).lib $(LIBC_LIB)
  3113. !  elseif !defined(MCPP_TYPE)
  3114. !    if "$(URT_VER)" != "1.1"
  3115. LIBC_LIB=$(CRT_LIB_PATH)\libcmmt$(DCRT).lib $(LIBC_LIB)
  3116. !    endif
  3117. !  endif
  3118. !endif
  3119.  
  3120. !if defined(USE_MSVCRT) \
  3121.     && !defined(USE_LIBCMT) \
  3122.     && defined(MANAGED_CXX) \
  3123.     && "$(URT_VER)" == "1.1"
  3124. LIBC_LIB=$(CRT_LIB_PATH)\libcmmt11.lib $(LIBC_LIB)
  3125. !endif
  3126.  
  3127. !IFNDEF GPSIZE
  3128. GPSIZE= 0
  3129. !ENDIF
  3130.  
  3131. LIBRARY_PATH=$(SDK_LIB_PATH)
  3132.  
  3133. !if defined(USE_MFC) ||  defined(USE_MFCUNICODE)
  3134. LIBC_LIB = $(MFC_LIBS) $(LIBC_LIB)
  3135. !endif
  3136.  
  3137. !if defined(USE_ATL) || defined(USE_STATIC_ATL)
  3138. LIBC_LIB = $(ATL_STATIC_LIBS) $(LIBC_LIB) $(ATL_LIBS)
  3139. # Piggy back on MFC_DEFINES for now.
  3140. MFC_DEFINES = $(MFC_DEFINES) $(ATL_DEFINES)
  3141. !endif
  3142.  
  3143. !if $(386) && defined(USE_MSLU)
  3144. # MSLU goes after MFC/ATL/CRT but before everything else
  3145. LIBC_LIB = $(LIBC_LIB) $(SDK_LIB_PATH)\unicows.lib
  3146. !endif
  3147.  
  3148. !if $(LIB_WLH)
  3149. !  if $(_NT_TARGET_VERSION) >= $(_NT_TARGET_VERSION_WIN7)
  3150. NTDLL_CRT=$(SDK_LIB_PATH)\ntdllp.lib
  3151. !  else
  3152. NTDLL_CRT=$(CRT_LIB_PATH)\safecrtnt.lib $(SDK_LIB_PATH)\ntdllp.lib
  3153. !  endif
  3154. !else
  3155. NTDLL_CRT=$(CRT_LIB_PATH)\safecrtnt.lib $(SDK_LIB_PATH)\ntdll.lib
  3156. !endif
  3157.  
  3158. NT_LIBS=$(NTDLL_CRT) $(MINWIN_SDK_LIB_PATH)\nt.lib
  3159.  
  3160. !IF "$(BUILD_MINWIN)" == "1"
  3161. GUI32_LIBS=
  3162. !ELSE
  3163. GUI32_LIBS=$(SDK_LIB_PATH)\gdi32.lib \
  3164.            $(SDK_LIB_PATH)\user32.lib
  3165.  
  3166. WIN32_LIBS=$(SDK_LIB_PATH)\advapi32.lib \
  3167.            $(SDK_LIB_PATH)\kernel32.lib
  3168. !ENDIF
  3169.  
  3170. !IF "$(USE_DEFAULT_WIN32_LIBS)" == "1" || "$(USE_DEFAULT_WIN32_LIBS)" == ""
  3171. # Allow the default setting determined above to be used
  3172. !ELSEIF "$(USE_DEFAULT_WIN32_LIBS)" == "0"
  3173. WIN32_LIBS=
  3174. !ELSE
  3175. !ERROR USE_DEFAULT_WIN32_LIBS must be either 1 or 0
  3176. !ENDIF
  3177.  
  3178. !IF "$(USE_DEFAULT_GUI32_LIBS)" == "1" || "$(USE_DEFAULT_GUI32_LIBS)" == ""
  3179. # Allow the default setting determined above to be used
  3180. !ELSEIF "$(USE_DEFAULT_GUI32_LIBS)" == "0"
  3181. GUI32_LIBS=
  3182. !ELSE
  3183. !ERROR USE_DEFAULT_GUI32_LIBS must be either 1 or 0
  3184. !ENDIF
  3185.  
  3186. NTSS_LIBS=$(NT_LIBS) $(BASE_LIB_PATH)\smdll.lib
  3187.  
  3188. !if "$(DRIVERTYPE)" == "wdm" || "$(DRIVERTYPE)" == "WDM"
  3189. # Building a WDM driver.  Default the subsystem version to the DDK version # (currently 1.0)
  3190. ! ifndef SUBSYSTEM_VERSION
  3191. SUBSYSTEM_VERSION=1.10
  3192. ! endif
  3193. !endif
  3194.  
  3195. !ifndef SUBSYSTEM_VERSION
  3196. SUBSYSTEM_WINVER   =$(SUBSYSTEM_VERSION_LATEST)
  3197. SUBSYSTEM_CONVER   =$(SUBSYSTEM_VERSION_LATEST)
  3198. SUBSYSTEM_NATVER   =$(SUBSYSTEM_VERSION_LATEST)
  3199. !else
  3200. SUBSYSTEM_WINVER   =$(SUBSYSTEM_VERSION)
  3201. SUBSYSTEM_CONVER   =$(SUBSYSTEM_VERSION)
  3202. SUBSYSTEM_NATVER   =$(SUBSYSTEM_VERSION)
  3203. !endif
  3204.  
  3205. #
  3206. # Set NTDDI_VERSION
  3207. #
  3208.  
  3209. !if "$(NTDDI_VERSION)" == ""
  3210.  
  3211. # Default
  3212. C_DEFINES=$(C_DEFINES) /DNTDDI_VERSION=$(CURRENT_NTDDI_VERSION)
  3213. !else
  3214.  
  3215. # User specified
  3216. C_DEFINES=$(C_DEFINES) /DNTDDI_VERSION=$(NTDDI_VERSION)
  3217. !endif
  3218.  
  3219. !if "$(TARGETTYPE)" == "DYNLINK" || \
  3220.     "$(TARGETTYPE)" == "LIBRARY" || \
  3221.     "$(TARGETTYPE)" == "PROGRAM" || \
  3222.     "$(TARGETTYPE)" == "PROGLIB"
  3223. !  if "$(_NT_TARGET_VERSION)" < "$(_NT_TARGET_VERSION_WIN7)" || \
  3224.       ("$(SUBSYSTEM_VERSION)" != "" && \
  3225.        "$(SUBSYSTEM_VERSION)" < "$(SUBSYSTEM_601)")
  3226. !    ifndef PRECOMPILED_INCLUDE
  3227. # downlevel psapi uses version 1 of the psapi header
  3228. C_DEFINES=$(C_DEFINES) /DPSAPI_VERSION=1
  3229. !    endif
  3230. !  endif
  3231. !endif
  3232.  
  3233. CRT_INCLUDES=$(CRT_INC_PATH)
  3234. !ifdef USE_IOSTREAM
  3235. CRT_INCLUDES=$(CRT_INCLUDES);$(IOSTREAMS_INC_PATH)
  3236. !endif
  3237. !ifdef USE_STL
  3238. ! if "$(STL_VER)" == "70"
  3239. CRT_INCLUDES=$(CRT_INCLUDES);$(STL7_INC_PATH)
  3240. ! else
  3241. CRT_INCLUDES=$(CRT_INCLUDES);$(STL6_INC_PATH)
  3242. ! endif
  3243. !endif
  3244.  
  3245. !IF "$(UMTYPE)" == "nt"
  3246.  
  3247. SUBSYSTEM_VERSIONX=$(SUBSYSTEM_NATVER)
  3248. SUBSYSTEM=native,$(SUBSYSTEM_NATVER)
  3249. UMINCL=$(CRT_INCLUDES)
  3250.  
  3251. #
  3252. #  Setup the program entry and libs if its native
  3253. #
  3254.  
  3255. !if !defined(NO_NATIVE_LIBS)
  3256.  
  3257. STD_CALL_ENTRY=1
  3258.  
  3259. ! IF "$(UMENTRY)" == "wmain"
  3260. UMENTRY=/entry:NtProcessStartupW
  3261. ! ELSE
  3262. UMENTRY=/entry:NtProcessStartup
  3263. ! ENDIF
  3264.  
  3265. UMLIBS=$(UMLIBS) $(NT_LIBS)
  3266. !endif
  3267.  
  3268. NOT_TERMINAL_SERVER_AWARE=1
  3269.  
  3270. !ELSEIF "$(UMTYPE)" == "windows"
  3271.  
  3272. SUBSYSTEM_VERSIONX=$(SUBSYSTEM_WINVER)
  3273. SUBSYSTEM=windows,$(SUBSYSTEM_WINVER)
  3274. UMINCL=$(CRT_INCLUDES)
  3275.  
  3276. ! IF "$(UMENTRY)" == "winmain"
  3277. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3278. !   error managed code should use unicode, specify UMENTRY=wwinmain
  3279. !  else
  3280. UMENTRY=/entry:WinMainCRTStartup
  3281. !  endif
  3282. ! ELSEIF "$(UMENTRY)" == "wwinmain"
  3283. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3284. UMENTRY=/entry:?wWinMainCRTStartup@@$$$$FYMHXZ
  3285. !  else
  3286. UMENTRY=/entry:wWinMainCRTStartup
  3287. !  endif
  3288. ! ELSEIF "$(UMENTRY)" == "wmain"
  3289. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3290. UMENTRY=/entry:?wmainCRTStartup@@$$$$FYMHXZ
  3291. !  else
  3292. UMENTRY=/entry:wmainCRTStartup
  3293. !  endif
  3294. ! ELSEIF "$(UMENTRYABS)" == ""
  3295. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3296. !   error managed code should use unicode, specify UMENTRY=wmain
  3297. !  else
  3298. UMENTRY=/entry:mainCRTStartup
  3299. !  endif
  3300. ! ELSE
  3301. UMENTRY=/entry:$(UMENTRYABS)
  3302. ! ENDIF
  3303.  
  3304. UMLIBS=$(UMLIBS) $(WIN32_LIBS) $(GUI32_LIBS)
  3305.  
  3306. !ELSEIF "$(UMTYPE)" == "console"
  3307.  
  3308. SUBSYSTEM_VERSIONX=$(SUBSYSTEM_CONVER)
  3309. SUBSYSTEM=console,$(SUBSYSTEM_CONVER)
  3310. UMINCL=$(CRT_INCLUDES)
  3311.  
  3312. ! IF "$(UMENTRY)" == "winmain"
  3313. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3314. !   error managed code should use unicode, specify UMENTRY=wwinmain
  3315. !  else
  3316. UMENTRY=/entry:WinMainCRTStartup
  3317. !  endif
  3318. ! ELSEIF "$(UMENTRY)" == "wwinmain"
  3319. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3320. UMENTRY=/entry:?wWinMainCRTStartup@@$$$$FYMHXZ
  3321. !  else
  3322. UMENTRY=/entry:wWinMainCRTStartup
  3323. !  endif
  3324. ! ELSEIF "$(UMENTRY)" == "wmain"
  3325. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3326. UMENTRY=/entry:?wmainCRTStartup@@$$$$FYMHXZ
  3327. !  else
  3328. UMENTRY=/entry:wmainCRTStartup
  3329. !  endif
  3330. ! ELSEIF "$(UMENTRYABS)" == ""
  3331. !  if "$(MCPP_TYPE)" == "pure" && "$(TARGETTYPE)" == "PROGRAM"
  3332. !   error managed code should use unicode, specify UMENTRY=wmain
  3333. !  else
  3334. UMENTRY=/entry:mainCRTStartup
  3335. !  endif
  3336. ! ELSE
  3337. UMENTRY=/entry:$(UMENTRYABS)
  3338. ! ENDIF
  3339.  
  3340. UMLIBS=$(UMLIBS) $(WIN32_LIBS)
  3341.  
  3342. !ELSEIF "$(UMTYPE)" == "ntss"
  3343.  
  3344. SUBSYSTEM_VERSIONX=$(SUBSYSTEM_NATVER)
  3345. SUBSYSTEM=native,$(SUBSYSTEM_NATVER)
  3346. UMINCL=$(CRT_INCLUDES)
  3347.  
  3348. STD_CALL_ENTRY=1
  3349.  
  3350. ! IF "$(UMENTRY)" == "wmain"
  3351. UMENTRY=/entry:NtProcessStartupW
  3352. ! ELSE
  3353. UMENTRY=/entry:NtProcessStartup
  3354. ! ENDIF
  3355.  
  3356. NOT_TERMINAL_SERVER_AWARE=1
  3357.  
  3358. UMLIBS=$(UMLIBS) $(NTSS_LIBS)
  3359.  
  3360. !ELSEIF "$(UMTYPE)" == "posix"
  3361.  
  3362. #
  3363. # This is only for base\sfu.
  3364. #
  3365. !  if "$(MAKEDIR_RELATIVE_TO_BASEDIR:base\sfu\=)" == "$(MAKEDIR_RELATIVE_TO_BASEDIR)"
  3366. !    error $(MAKEDIR) UMTYPE == posix is only supported in $(BASEDIR)\base\sfu.
  3367. !  endif
  3368.  
  3369. SUBSYSTEM=posix$(SUBSYSTEM_POSIXVER)
  3370. UMINCL=$(SDK_INC_PATH)\posix;$(CRT_INC_PATH)
  3371.  
  3372. UMENTRY=-entry:__PosixProcessStartup
  3373.  
  3374. UMLIBS=$(UMLIBS) $(POSIX_LIBS)
  3375.  
  3376. !ELSE
  3377. ! ERROR Invalid UMTYPE value - $(UMTYPE)
  3378. !ENDIF  # UMTYPE tests
  3379.  
  3380.  
  3381. NTINCLUDES=$(OAK_INC_PATH);$(SDK_INC_PATH);$(MINWIN_SDK_INC_PATH)
  3382.  
  3383. #
  3384. # Let drivers include files such as ntddk.h.
  3385. # WDM drivers\libs can only include wdm.h type of files though ...
  3386. # DDK_INC_PATH must be first for precedence.
  3387. #
  3388. !IF "$(DRIVERTYPE)" == "wdm" || "$(DRIVERTYPE)" == "WDM"
  3389. NTINCLUDES=$(NTINCLUDES);$(WDM_INC_PATH)
  3390. !ELSEIF "$(DRIVERTYPE)" == "fs" || "$(DRIVERTYPE)" == "FS"
  3391. NTINCLUDES=$(NTINCLUDES);$(DDK_INC_PATH);$(IFSKIT_INC_PATH)
  3392. !ELSEIF "$(TARGETTYPE)" == "DRIVER"        || \
  3393.         "$(TARGETTYPE)" == "EXPORT_DRIVER" || \
  3394.         "$(TARGETTYPE)" == "MINIPORT"      || \
  3395.         "$(TARGETTYPE)" == "DRIVER_LIBRARY"
  3396. NTINCLUDES=$(NTINCLUDES);$(DDK_INC_PATH);$(WDM_INC_PATH)
  3397. !ENDIF
  3398.  
  3399. !IF "$(BUILD_MINWIN)" == "1" && "$(MINWIN_INC_PATH)" != ""
  3400. NTINCLUDES=$(NTINCLUDES);$(MINWIN_INC_PATH);$(MINWIN_PRIV_SDK_INC_PATH)
  3401. C_DEFINES=$(C_DEFINES) -DBUILD_MINWIN
  3402. !ENDIF
  3403.  
  3404. #
  3405. # User mode scheduling (UMS) build options.
  3406. #
  3407.  
  3408. !if "$(ENABLE_UMS)" == "1"
  3409. !    if $(386)
  3410. BUILD_UMS_ENABLED=0
  3411. !    elseif $(AMD64)
  3412. BUILD_UMS_ENABLED=1
  3413. !    elseif $(IA64)
  3414. BUILD_UMS_ENABLED=1
  3415. !    elseif $(ARM)
  3416. BUILD_UMS_ENABLED=0
  3417. !    else
  3418. !error Unsupported architecture.
  3419. !endif
  3420. C_DEFINES=$(C_DEFINES) /DBUILD_UMS_ENABLED=$(BUILD_UMS_ENABLED)
  3421. !endif
  3422.  
  3423.  
  3424. #
  3425. # Temporarily enable the deprecated macros KMDF_VERSION and UMDF_VERSION for the WDK
  3426. #
  3427.  
  3428. !   if DEFINED(KMDF_VERSION)
  3429. !      message warning : The directive KMDF_VERSION has been replaced by KMDF_VERSION_MAJOR and will be removed in the next version of the WDK. Please update your scripts accordingly.
  3430. KMDF_VERSION_MAJOR = $(KMDF_VERSION)
  3431. !   endif
  3432.  
  3433. !   if DEFINED(UMDF_VERSION)
  3434. !      message warning : The directive UMDF_VERSION has been replaced by UMDF_VERSION_MAJOR and will be removed in the next version of the WDK. Please update your scripts accordingly.
  3435. UMDF_VERSION_MAJOR = $(UMDF_VERSION)
  3436. !   endif
  3437.  
  3438.  
  3439. !IF DEFINED(KMDF_VERSION_MAJOR)
  3440. !   if ("$(KMDF_VERSION_MAJOR)" == "1" || "$(KMDF_VERSION_MAJOR)" == "01")
  3441. KMDF_VERSION_MAJOR = 1
  3442. !       IF !DEFINED(KMDF_VERSION_MINOR)
  3443. KMDF_VERSION_MINOR = $(KMDF_VERSION_MINOR_LATEST)
  3444. !       ENDIF
  3445. KMDF_VER_PATH = $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR)
  3446. !   else
  3447. !       error using incorrect KMDF major version number $(KMDF_VERSION_MAJOR).
  3448. !   endif
  3449. NTINCLUDES=$(NTINCLUDES);$(KMDF_INC_PATH)\$(KMDF_VER_PATH)
  3450.  
  3451. #
  3452. # Add Windows Driver Framework inc if it is a WDF driver.
  3453. #
  3454.  
  3455. #
  3456. # KMDF_MAJOR_VERSION and KMDF_MINOR_VERSION are C flags and can be used by
  3457. # the C preprocessor, in order to find the version of KMDF
  3458. #
  3459. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MAJOR_VERSION=$(KMDF_VERSION_MAJOR)
  3460. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MINOR_VERSION=$(KMDF_VERSION_MINOR)
  3461.  
  3462. #
  3463. # KMDF_MAJOR_VERSION_STRING and KMDF_MINOR_VERSION_STRING are C flags and
  3464. # can be used by scripts and applications to build KMDF filenames
  3465. # dynamically (e.g. the nonpnpapp uses it to build the name of the
  3466. # coinstaller)
  3467. #
  3468. !   if $(KMDF_VERSION_MAJOR) < 10
  3469. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MAJOR_VERSION_STRING=0$(KMDF_VERSION_MAJOR)
  3470. !   else if $(KMDF_VERSION_MAJOR) < 100
  3471. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MAJOR_VERSION_STRING=$(KMDF_VERSION_MAJOR)
  3472. !   else
  3473. !       error using incorrect KMDF major version number $(KMDF_VERSION_MAJOR).
  3474. !   endif
  3475.  
  3476. !   if $(KMDF_VERSION_MINOR) < 10
  3477. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MINOR_VERSION_STRING=00$(KMDF_VERSION_MINOR)
  3478. !   else if $(KMDF_VERSION_MINOR) < 100
  3479. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MINOR_VERSION_STRING=0$(KMDF_VERSION_MINOR)
  3480. !   else if $(KMDF_VERSION_MINOR) < 1000
  3481. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MINOR_VERSION_STRING=$(KMDF_VERSION_MINOR)
  3482. !   else
  3483. !       error using incorrect KMDF minor version number $(KMDF_VERSION_MINOR).
  3484. !   endif
  3485. !ELSE
  3486. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MAJOR_VERSION_STRING=01
  3487. USER_C_FLAGS=$(USER_C_FLAGS) /DKMDF_MINOR_VERSION_STRING=00$(KMDF_VERSION_MINOR_LATEST)
  3488. !ENDIF
  3489.  
  3490. !IF DEFINED(UMDF_VERSION_MAJOR)
  3491. !   if ("$(UMDF_VERSION_MAJOR)" == "1" || "$(UMDF_VERSION_MAJOR)" == "01")
  3492. UMDF_VERSION_MAJOR = 1
  3493. !       IF !DEFINED(UMDF_VERSION_MINOR)
  3494. UMDF_VERSION_MINOR = $(UMDF_VERSION_MINOR_LATEST)
  3495. !       ENDIF
  3496. UMDF_VER_PATH = $(UMDF_VERSION_MAJOR).$(UMDF_VERSION_MINOR)
  3497. !   else
  3498. !       error using incorrect UMDF major version number $(UMDF_VERSION_MAJOR).
  3499. !   endif
  3500. NTINCLUDES=$(NTINCLUDES);$(UMDF_INC_PATH)\$(UMDF_VER_PATH)
  3501. !ENDIF
  3502.  
  3503.  
  3504. !IFNDEF CBSTRING
  3505. ! IF "$(MAJORCOMP)" == "ntos" || \
  3506.      "$(MAJORCOMP)" == "NTOS" || \
  3507.      "$(TARGETTYPE)" == "DRIVER"         || \
  3508.      "$(TARGETTYPE)" == "DRIVER_LIBRARY" || \
  3509.      "$(TARGETTYPE)" == "GDI_DRIVER"     || \
  3510.      "$(TARGETTYPE)" == "HAL"            || \
  3511.      "$(TARGETTYPE)" == "EXPORT_DRIVER"  || \
  3512.      "$(TARGETTYPE)" == "MINIPORT"
  3513. !    IF "$(DRIVERTYPE)" != "VXD"
  3514. CBSTRING= -cbstring
  3515. !    ENDIF
  3516. ! ELSE
  3517. CBSTRING=
  3518. ! ENDIF
  3519. !ENDIF
  3520.  
  3521.  
  3522. !if "$(TARGETTYPE)" == "DRIVER_LIBRARY"
  3523. TARGETTYPE=LIBRARY
  3524. !endif
  3525.  
  3526. #
  3527. #  Add PROJECT_INC_PATH to NTINCLUDES, if NO_PRIVATE_INC is not set
  3528. #
  3529. !IFDEF PROJECT_INC_PATH
  3530. ! IFNDEF NO_PRIVATE_INC
  3531. NTINCLUDES=$(PROJECT_ROOT)\inc;$(PROJECT_OBJ_ROOT)\inc\$O;$(PROJECT_INC_PATH);$(NTINCLUDES)
  3532. ! ENDIF
  3533. !ENDIF
  3534.  
  3535. NTINCLUDES=$(OBJ_PATH)\$O;$(NTINCLUDES)
  3536.  
  3537. !if "$(POCKETPC)" == ""
  3538. !IFNDEF COMPILER_WARNINGS
  3539. COMPILER_WARNINGS=/FI$(SDK_INC_PATH)\warning.h $(PROJECT_COMPILER_WARNINGS)
  3540. !ifdef USE_LINT
  3541. LINT_FORCEDINCS=$(LINT_FORCEDINCS) -header($(SDK_INC_PATH)\warning.h)
  3542. !endif
  3543. !ENDIF
  3544.  
  3545. #
  3546. # Warnings that should not be over-ridden by individual projects.
  3547. #
  3548. #
  3549. # tag test code so static analysis tools can distinguish product code and test code
  3550. #
  3551. !ifdef TEST_CODE
  3552.  
  3553. !  if "$(URT_VER)" < "2.0"
  3554. TEST_CODE_MANAGED_RES=$(SDKTOOLS_REF_PATH)\__testcode11__.resources
  3555. !  else # URT_VER >= 2.0
  3556. TEST_CODE_MANAGED_RES=$(SDKTOOLS_REF_PATH)\__testcode20__.resources
  3557. !  endif
  3558.  
  3559. !  if defined(_C_SHARP)
  3560. USER_CS_FLAGS=$(USER_CS_FLAGS) /res:$(TEST_CODE_MANAGED_RES)
  3561. !  elseif defined(_VB)
  3562. USER_VB_NET_FLAGS=$(USER_VB_NET_FLAGS) /res:$(TEST_CODE_MANAGED_RES) /win32manifest:$(RAZZLETOOLPATH)\managed\v2.0\test.win32manifest
  3563. !  elseif defined(MANAGED_CXX) # managed C++
  3564. LINKER_FLAGS=$(LINKER_FLAGS) /ASSEMBLYRESOURCE:$(TEST_CODE_MANAGED_RES)
  3565. !  else                        # native C++
  3566. COMPILER_WARNINGS=$(COMPILER_WARNINGS) /FI$(SDKTOOLS_INC_PATH)\testcode.h
  3567. !  endif
  3568.  
  3569. !endif # TEST_CODE
  3570.  
  3571. !endif
  3572.  
  3573. !ifndef WIN32_WINNT_VERSION
  3574. WIN32_WINNT_VERSION=$(CURRENT_WIN32_WINNT_VERSION)
  3575. !endif
  3576.  
  3577. !ifndef WIN32_WIN95_VERSION
  3578. WIN32_WIN95_VERSION=$(LATEST_WIN32_WIN95_VERSION)
  3579. !endif
  3580.  
  3581. !ifndef WIN32_WCE_VERSION
  3582. WIN32_WCE_VERSION=$(LATEST_WIN32_WCE_VERSION)
  3583. !endif
  3584.  
  3585. !ifndef WIN32_IE_VERSION
  3586. WIN32_IE_VERSION=$(CURRENT_WIN32_IE_VERSION)
  3587. !endif
  3588.  
  3589. !ifndef WINVER_VERSION
  3590. !ifdef CHICAGO_PRODUCT
  3591. WINVER_VERSION=$(WIN32_WIN95_VERSION)
  3592. !elseif defined(POCKETPC)
  3593. WINVER_VERSION=$(WIN32_WCE_VERSION)
  3594. !else
  3595. WINVER_VERSION=$(WIN32_WINNT_VERSION)
  3596. !endif
  3597. !endif
  3598.  
  3599. !ifdef UNDEF_WINVER
  3600. _WINVER_VERSION=/UWINVER
  3601. !else
  3602. _WINVER_VERSION=/DWINVER=$(WINVER_VERSION)
  3603. !endif
  3604.  
  3605. !ifdef POCKETPC
  3606.  
  3607. NO_NTDLL=1
  3608. ! IFNDEF WIN32_DEFINE
  3609. WIN32_DEFINE=/DWIN32=300 /D_WIN32_WCE=$(WIN32_WCE_VERSION) $(_WINVER_VERSION)
  3610. !  if "$(POCKETPC_EMULATION)" != ""
  3611. WIN32_DEFINE = $(WIN32_DEFINE) /D_WIN32_WCE_EMULATION
  3612. !  endif
  3613. ! ENDIF
  3614.  
  3615. !ELSEIF defined(CHICAGO_PRODUCT)
  3616.  
  3617. NO_NTDLL=1
  3618. ! IFNDEF WIN32_DEFINE
  3619. WIN32_DEFINE=/DWIN32=200 /D_CHICAGO_=200 /D_WIN32_WINDOWS=$(WIN32_WIN95_VERSION) $(_WINVER_VERSION)
  3620. ! ENDIF
  3621.  
  3622. !ELSE
  3623.  
  3624. WIN32_DEFINE=/DWIN32=100 /D_NT1X_=100 /DWINNT=1 /D_WIN32_WINNT=$(WIN32_WINNT_VERSION) $(_WINVER_VERSION)
  3625.  
  3626. !ENDIF
  3627.  
  3628. WIN32_DEFINE=$(WIN32_DEFINE) /D_WIN32_IE=$(WIN32_IE_VERSION)
  3629.  
  3630. INCLUDES     = $(INCLUDES: =)
  3631. NTINCLUDES   = $(NTINCLUDES: =)
  3632. UMINCL       = $(UMINCL: =)
  3633. MFC_INCLUDES = $(MFC_INCLUDES: =)
  3634. USER_INCLUDES =$(USER_INCLUDES: =)
  3635. ATL_INCLUDES = $(ATL_INCLUDES: =)
  3636. WTL_INCLUDES = $(WTL_INCLUDES: =)
  3637.  
  3638. # MFC, ATL, WTL, and USER first
  3639.  
  3640. INCPATH0=/I$(MFC_INCLUDES:;= /I) /I$(ATL_INCLUDES:;= /I) /I$(WTL_INCLUDES:;= /I) /I$(USER_INCLUDES:;= /I)
  3641. INCPATH1=/I$(MFC_INCLUDES:;= /I) /I$(ATL_INCLUDES:;= /I) /I$(WTL_INCLUDES:;= /I) /I$(USER_INCLUDES:;= /I)
  3642.  
  3643. # INCLUDES if set
  3644.  
  3645. !ifdef INCLUDES
  3646. INCPATH0 = $(INCPATH0) /I$(INCLUDES:;= /I)
  3647. INCPATH1 = $(INCPATH1) /I$(INCLUDES:;= /I)
  3648. !endif
  3649.  
  3650. # Finally NT and UM
  3651.  
  3652. INCPATH0=$(INCPATH0) /I$(NTINCLUDES:;= /I) /I$(UMINCL:;= /I)
  3653. INCPATH1=$(INCPATH1) /I$(NTINCLUDES:;= /I) /I$(UMINCL:;= /I)
  3654.  
  3655. # Remove empty "/I " settings (INCL/NTINCLUDES/UMINCL/MFC_INCLUDES macros may be empty above)
  3656.  
  3657. INCPATH0=$(INCPATH0:-I =)
  3658. INCPATH0=$(INCPATH0:/I =)
  3659. INCPATH1=$(INCPATH1:-I =)
  3660. INCPATH1=$(INCPATH1:/I =)
  3661. !ifdef USE_LINT
  3662. LINT_INCLUDES=-i$(TARGET_DIRECTORY)\ -i. $(LINT_PRECOMPPATH) $(INCPATH1:/I=-i)
  3663. !endif
  3664.  
  3665. !IF !defined(DLLENTRY) || defined(NO_DLLENTRY)
  3666. DLLENTRY=/noentry
  3667. !ELSE
  3668. ! if "$(DLLENTRY:-entry:=)" == "$(DLLENTRY)" && "$(DLLENTRY:/entry:=)" == "$(DLLENTRY)"
  3669. DLLENTRY=/entry:$(DLLENTRY)
  3670. ! endif
  3671. !ENDIF
  3672.  
  3673. !IFNDEF DLLBASE
  3674. ! IFDEF COFFBASE
  3675. DLLBASE=@$(COFFBASE_TXT_FILE),$(COFFBASE)
  3676. ! ELSE
  3677. DLLBASE=@$(COFFBASE_TXT_FILE),$(TARGETNAME)
  3678. ! ENDIF
  3679. !ENDIF
  3680.  
  3681. !if !defined(MCPP_TYPE)
  3682. !IFNDEF DLLDEF
  3683. DLLDEF=$(@B).def
  3684. !ENDIF
  3685. !endif
  3686.  
  3687. !IFNDEF BOOTBASE
  3688. ! IFDEF FRAZZLE
  3689. BOOTBASE=0xd0100000,0xd0104000
  3690. ! ELSE
  3691. BOOTBASE=0xd0ff0000,0xd0ff4000
  3692. ! ENDIF
  3693. !ENDIF
  3694.  
  3695. !IFNDEF DRIVERBASE
  3696. DRIVERBASE=0x10000
  3697. !ENDIF
  3698.  
  3699. !IFNDEF HALBASE
  3700. HALBASE=0x80010000
  3701. !ENDIF
  3702.  
  3703. !endif # } }
  3704.  
  3705. COMPLUS_INSTALLROOT=$(RAZZLETOOLPATH)\managed
  3706.  
  3707. !if (defined(URT_VER) || defined(_PROJECT_BUILDS_MANAGED_CODE))
  3708.  
  3709. ! if "$(URT_VER)" == "1.1"
  3710. !  if defined(_PROJECT_BUILDS_MANAGED_CODE) && !$(386)
  3711. !   error URT_VER=1.1 is not supported for $(_BUILDARCH) (try 2.0)
  3712. !  endif
  3713. !  ifdef MCPP_TYPE
  3714. !   error MCPP_TYPE is not supported for URT_VER=1.1 (try 2.0)
  3715. !  endif
  3716. !  if defined(_PROJECT_BUILDS_MANAGED_CODE)
  3717. _NT_TOOLS_VERSION=0x700
  3718. !  endif
  3719. ! elseif "$(URT_VER)" == "2.0"
  3720. ! else
  3721. !   error URT_VER must be specified as 1.1 or 2.0
  3722. ! endif
  3723.  
  3724. COMPLUS_VERSION=v$(URT_VER)
  3725. CLR_REF_PATH=$(SDK_REF_PATH)\clr$(URT_VER:.=)
  3726. URTTARGET=$(CLR_REF_PATH)
  3727.  
  3728. ! ifdef BUILD_PATH
  3729. BUILD_PATH=$(COMPLUS_INSTALLROOT)\$(COMPLUS_VERSION);$(BUILD_PATH)
  3730. PATH=$(BUILD_PATH)
  3731. ! else
  3732. PATH=$(COMPLUS_INSTALLROOT)\$(COMPLUS_VERSION);$(PATH)
  3733. ! endif
  3734.  
  3735. ! if [set COMPLUS_INSTALLROOT=$(COMPLUS_INSTALLROOT)]
  3736. ! endif
  3737. ! if [set COMPLUS_VERSION=$(COMPLUS_VERSION)]
  3738. ! endif
  3739.  
  3740. ! ifdef MANAGED_CXX
  3741. LINK_NAME=$(COMPLUS_INSTALLROOT)\$(COMPLUS_VERSION)\$(_BUILDARCH)\link
  3742. CC_NAME=$(COMPLUS_INSTALLROOT)\$(COMPLUS_VERSION)\$(_BUILDARCH)\cl
  3743.  
  3744. !  ifdef BUILD_PATH
  3745. BUILD_PATH=$(COMPLUS_INSTALLROOT)\$(COMPLUS_VERSION)\$(_BUILDARCH);$(BUILD_PATH)
  3746. PATH=$(BUILD_PATH)
  3747. !  else
  3748. PATH=$(COMPLUS_INSTALLROOT)\$(COMPLUS_VERSION)\$(_BUILDARCH);$(PATH)
  3749. !  endif
  3750.  
  3751. # Managed CXX implies /EHa
  3752. USE_NATIVE_EH=ASYNC
  3753.  
  3754. !  if !$(FREEBUILD) && !defined(NO_DEBUG_ASSEMBLY)
  3755. LINKER_FLAGS=$(LINKER_FLAGS) /AssemblyDebug
  3756. !  endif
  3757.  
  3758. !  if "$(URT_VER)" >= "2.0"
  3759. MANAGED_CXX_FLAGS=$(MANAGED_CXX_FLAGS) /d1clr:nostdlib /d1clr:nomscorlib $(USECXX_FLAG)
  3760. !  else
  3761. LINKER_FLAGS=$(LINKER_FLAGS) $(SDK_LIB_PATH)\nochkclr.obj
  3762. !  endif
  3763.  
  3764. !  ifdef MCPP_TYPE
  3765. MANAGED_CXX_FLAGS=$(MANAGED_CXX_FLAGS) /clr:$(MCPP_TYPE)
  3766. LINKER_FLAGS=$(LINKER_FLAGS) /clrimagetype:$(MCPP_TYPE)
  3767. !  else
  3768. MANAGED_CXX_FLAGS=$(MANAGED_CXX_FLAGS) /clr
  3769. !  endif
  3770.  
  3771. ! endif
  3772.  
  3773. #
  3774. # Enable FxCop in-source suppression for managed code
  3775. #
  3776.  
  3777. # 1. For C# projects
  3778.  
  3779. ! if defined(_C_SHARP)
  3780. !  if defined(VERIFY_BUILD) || defined(BUILD_OACR)
  3781. USER_CS_FLAGS=$(USER_CS_FLAGS) /d:CODE_ANALYSIS
  3782. !   if "$(URT_VER)" < "2.0"
  3783. REFERENCES = $(REFERENCES);$(SDKTOOLS_REF_PATH)\SuppressMessage11.metadata_dll
  3784. !   endif
  3785. !  endif
  3786.  
  3787. # 2. For managed C++ projects
  3788.  
  3789. ! elseif defined(MANAGED_CXX)
  3790. !  if defined(VERIFY_BUILD) || defined(BUILD_OACR)
  3791. USER_C_FLAGS=$(USER_C_FLAGS) /DCODE_ANALYSIS=1
  3792. !   if "$(URT_VER)" < "2.0"
  3793. REFERENCES = $(REFERENCES);$(SDKTOOLS_REF_PATH)\SuppressMessage11.metadata_dll
  3794. !   endif
  3795. !  endif
  3796.  
  3797. # 3. For managed VB projects
  3798.  
  3799. !elseif defined(MANAGED_VB)
  3800.  
  3801. ! if defined(VERIFY_BUILD) || defined(BUILD_OACR)
  3802.  
  3803. # Define CODE_ANALYSIS iff running 'timebuild /verify'
  3804. USER_VB_NET_FLAGS=$(USER_VB_NET_FLAGS) /define:CODE_ANALYSIS=1
  3805.  
  3806. !  if "$(URT_VER)" < "2.0"
  3807. REFERENCES = $(REFERENCES);$(SDKTOOLS_REF_PATH)\SuppressMessage11.metadata_dll
  3808. !  endif
  3809.  
  3810. ! endif # VERIFY_BUILD
  3811.  
  3812. !endif
  3813.  
  3814. #
  3815. # Handle REFERENCES.
  3816. #
  3817. # C# accepts
  3818. #  /r:foo1.dll /r:foo2.dll
  3819. #  /r:foo1.dll,foo2.dll
  3820. #
  3821. # C++ accepts
  3822. #  /FUfoo1.dll /FUfoo2.dll
  3823. #
  3824. # (minor bug -- build.exe splits on , and ; even for C++, it should do only ;)
  3825. #
  3826. !if defined(REFERENCES) && defined(_PROJECT_BUILDS_MANAGED_CODE)
  3827.  
  3828. _REFERENCES=$(REFERENCES: =)
  3829.  
  3830. # Convert double semicolons to single semicolons, to handle appending ";foo" to REFERENCES that
  3831. # is already semicolon terminated.
  3832. _REFERENCES=$(_REFERENCES:;;=;)
  3833.  
  3834. # get rid of the leading ; if there is one
  3835. _REFERENCES=; $(_REFERENCES)
  3836. _REFERENCES=$(_REFERENCES:; ;=)
  3837. _REFERENCES=$(_REFERENCES:; =)
  3838.  
  3839. # get rid of the trailing ; if there is one
  3840. _REFERENCES=$(_REFERENCES) ;
  3841. _REFERENCES=$(_REFERENCES:; ;=)
  3842. _REFERENCES=$(_REFERENCES: ;=)
  3843.  
  3844. !  if "$(BUILD_PRODUCT)" == "NT"
  3845. !   if "$(_REFERENCES)" == ""
  3846. !   error REFERENCES is empty.
  3847. !   else
  3848.  
  3849. #
  3850. # Adding '*' at the end so we can detect correctly case when reference
  3851. # is last one without anything appended (we detect only when .dll or
  3852. # .exe is put at the end of reference, removing false negative
  3853. # like Wtt.ExecutionLayer.meatadata_dll
  3854. #
  3855. _REFERENCES_CHECK=$(REFERENCES)*
  3856. _REFERENCES_CHECK=$(_REFERENCES_CHECK:B=b)
  3857. _REFERENCES_CHECK=$(_REFERENCES_CHECK:C=c)
  3858. _REFERENCES_CHECK=$(_REFERENCES_CHECK:D=d)
  3859. _REFERENCES_CHECK=$(_REFERENCES_CHECK:E=e)
  3860. _REFERENCES_CHECK=$(_REFERENCES_CHECK:I=i)
  3861. _REFERENCES_CHECK=$(_REFERENCES_CHECK:L=l)
  3862. _REFERENCES_CHECK=$(_REFERENCES_CHECK:M=m)
  3863. _REFERENCES_CHECK=$(_REFERENCES_CHECK:O=o)
  3864. _REFERENCES_CHECK=$(_REFERENCES_CHECK:R=r)
  3865. _REFERENCES_CHECK=$(_REFERENCES_CHECK:S=s)
  3866. _REFERENCES_CHECK=$(_REFERENCES_CHECK:X=x)
  3867.  
  3868. !    if "$(_REFERENCES_CHECK:\mscorlib.dll=)" != "$(_REFERENCES_CHECK)" \
  3869.     || "$(_REFERENCES_CHECK:\mscorlib.metadata_dll=)" != "$(_REFERENCES_CHECK)"
  3870.  
  3871. !    error Do not put mscorlib.dll or mcorlib.metadata_dll in REFERENCES.
  3872. !    error Just let the build system provide you mscorlib.dll in whatever way it automatically does.
  3873.  
  3874. !    elseif "$(_REFERENCES_CHECK:.dll*=)" != "$(_REFERENCES_CHECK)" \
  3875.          || "$(_REFERENCES_CHECK:.dll,=)" != "$(_REFERENCES_CHECK)" \
  3876.          || "$(_REFERENCES_CHECK:.dll;=)" != "$(_REFERENCES_CHECK)" \
  3877.          || "$(_REFERENCES_CHECK:.dll =)" != "$(_REFERENCES_CHECK)"
  3878. !    error REFERENCES must use .metadata_dll instead of .dll.
  3879.  
  3880. !    elseif "$(_REFERENCES_CHECK:.exe*=)" != "$(_REFERENCES_CHECK)" \
  3881.          || "$(_REFERENCES_CHECK:.exe,=)" != "$(_REFERENCES_CHECK)" \
  3882.          || "$(_REFERENCES_CHECK:.exe;=)" != "$(_REFERENCES_CHECK)" \
  3883.          || "$(_REFERENCES_CHECK:.exe =)" != "$(_REFERENCES_CHECK)"
  3884. !    error REFERENCES must use .metadata_exe instead of .exe.
  3885.  
  3886. !    endif
  3887.  
  3888. # Note this is checking all the references at once, so REFERENCES=.\foo.metadata_dll bar.metadata_dll bogusly
  3889. #   accepts bar.metadata_dll.
  3890. !    if "$(_REFERENCES_CHECK:\=)" == "$(_REFERENCES_CHECK)"
  3891. !    error REFERENCES must contain only full paths or relative paths, it cannot contain leaf-only elements. (For example, use $$(CLR_REF_PATH)\System.metadata_dll instead of System.metadata_dll.)
  3892. !    endif
  3893. !   endif
  3894. !  endif
  3895.  
  3896. !  ifdef MANAGED_CXX
  3897. MANAGED_CXX_FLAGS=$(MANAGED_CXX_FLAGS) /FU$(_REFERENCES:;= /FU)
  3898. !  elseif (defined(_C_SHARP) || defined(_VB) || defined(_TLBIMP))
  3899. MANAGED_REFERENCES=/r:$(_REFERENCES:;= /r:)
  3900. !  else
  3901. !  error REFERENCES defined but not any of MANAGED_CXX, sources=*.cs, *vb, *.tlb.
  3902. !  endif
  3903. ! endif
  3904.  
  3905. #
  3906. # These references are not optional for Managed C++, and the compiler does not like
  3907. #  it if you specify .metadata_dll. /FU is order dependent, you must put these at the start.
  3908. #
  3909. ! ifdef MANAGED_CXX
  3910. MANAGED_CXX_FLAGS=/FU$(CLR_REF_PATH)\Microsoft.VisualC.dll $(MANAGED_CXX_FLAGS)
  3911. !  if "$(URT_VER)" < "2.0"
  3912. MANAGED_CXX_FLAGS=/FI$(OBJECT_ROOT)\$O\_using_mscorlib.h $(MANAGED_CXX_FLAGS)
  3913. !  else
  3914. MANAGED_CXX_FLAGS=/FU$(CLR_REF_PATH)\mscorlib.dll $(MANAGED_CXX_FLAGS)
  3915. !  endif
  3916. ! endif
  3917.  
  3918. ! if (defined(_C_SHARP) || defined(_VB) || defined(_TLBIMP))
  3919. !  ifndef MANAGED_TARGET_TYPE
  3920. !   if "$(TARGETTYPE)" == "PROGRAM"
  3921. !    if "$(UMTYPE)" != "console"
  3922. MANAGED_TARGET_TYPE=winexe
  3923. !    else
  3924. MANAGED_TARGET_TYPE=exe
  3925. !    endif
  3926. !   elseif "$(TARGETTYPE)" == "DYNLINK"
  3927. MANAGED_TARGET_TYPE=library
  3928. !   endif
  3929. !  endif
  3930.  
  3931. !  ifdef MANAGED_PLATFORM_SPECIFIC
  3932. !   if "$(URT_VER)" < "2.0"
  3933. !   error MANAGED_PLATFORM_SPECIFIC cannot be used with URT_VER < 2.0
  3934. !   endif
  3935.  
  3936. !   if "$(_BUILDARCH)" == "ia64"
  3937. USER_CS_FLAGS=$(USER_CS_FLAGS) /platform:itanium
  3938. !   else if "$(_BUILDARCH)" == "amd64"
  3939. USER_CS_FLAGS=$(USER_CS_FLAGS) /platform:x64
  3940. !   else if "$(_BUILDARCH)" == "x86"
  3941. USER_CS_FLAGS=$(USER_CS_FLAGS) /platform:x86
  3942. !   else
  3943. !    error Using MANAGED_PLATFORM_SPECIFIC with unsupported build architecture
  3944. !   endif
  3945. !  else
  3946. !   if "$(URT_VER)" >= "2.0"
  3947. USER_CS_FLAGS=$(USER_CS_FLAGS) /platform:anycpu
  3948. !   endif
  3949. !  endif
  3950.  
  3951. !  ifndef GENBASEMAC_CMD
  3952. GENBASEMAC_CMD=$(RAZZLETOOLPATH)\genbasemac.pl
  3953. !  endif
  3954. !  if "$(GENBASEMAC_CMD)"!=""
  3955. !   if !exist($(GENBASEMAC_CMD))
  3956. !     message NMAKE : Uxxxx: unable to find $(GENBASEMAC_CMD)
  3957. !   endif
  3958. !   message BUILD: $(GENBASEMAC_CMD) $(OBJ_PATH)\$O $(TARGETNAME) $(COFFBASE_TXT_FILE)
  3959. !   IF [$(_PERL) $(GENBASEMAC_CMD) $(OBJ_PATH)\$O $(TARGETNAME) $(COFFBASE_TXT_FILE)]
  3960. !   ENDIF
  3961. !   IF EXIST( $(OBJ_PATH)\$O\coffbase.mac )
  3962. !    INCLUDE $(OBJ_PATH)\$O\coffbase.mac
  3963. !   ELSE
  3964. MANAGED_COFFBASE=0x400000
  3965. !   ENDIF
  3966. !  endif
  3967.  
  3968. !  if $(FREEBUILD)
  3969. MANAGED_DBG_FLAGS=/optimize+ /debug:pdbonly
  3970. !  else
  3971. !   if defined(_VB)
  3972. MANAGED_DBG_FLAGS=/debug:full /define:DEBUG=1
  3973. !   else
  3974. MANAGED_DBG_FLAGS=/debug:full /define:DEBUG
  3975. !   endif
  3976. !  endif
  3977.  
  3978. #
  3979. # Tlbimp.cmd is still used for 1.1 for its error filtering.
  3980. #
  3981. MANAGED_CODE_BUILD_TOOL= \
  3982. !  if defined(_VB)
  3983.     $(VB_NET_COMPILER_NAME)
  3984. !  elseif defined(_TLBIMP)
  3985. !   if "$(URT_VER)" < "2.0"
  3986.     tlbimp.cmd /strictref $(_TLBIMP_FLAGS) /noenv
  3987. !   else
  3988.     tlbimp.exe $(TLBIMP_MACHINE) /strictref:nopia $(_TLBIMP_FLAGS)
  3989. !   endif
  3990. !  else
  3991.     $(CS_COMPILER_NAME)
  3992. !  endif
  3993.  
  3994. MANAGED_CODE_BUILD_SWITCHES1= \
  3995.     /out:$(TARGET) \
  3996.  
  3997. !  if defined(_VB) || defined(_C_SHARP)
  3998. !   if !defined(_MANAGED_SOURCES)
  3999. _MANAGED_SOURCES=$(SOURCES)
  4000. !   endif
  4001.  
  4002. # make sure csc.rsp is never used
  4003. MANAGED_CODE_BUILD_TOOL=$(MANAGED_CODE_BUILD_TOOL) /noconfig
  4004.  
  4005. MANAGED_CODE_BUILD_SWITCHES2= \
  4006.     $(MANAGED_CODE_BUILD_SWITCH_CUSTOM) \
  4007.     /target:$(MANAGED_TARGET_TYPE) \
  4008.     /baseaddress:$(MANAGED_COFFBASE) \
  4009.     $(MANAGED_STD_FLAGS) \
  4010.     $(_LANGUAGE_SPECIFIC_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS) \
  4011.     $(_LANGUAGE_NEUTRAL_MANAGED_RESOURCES_CSC_OR_VBC_FLAGS)
  4012.  
  4013. !  endif
  4014.  
  4015. MANAGED_CODE_BUILD_SWITCHES2= \
  4016.     $(MANAGED_CODE_BUILD_SWITCHES2) \
  4017.     $(MANAGED_REFERENCES) \
  4018.  
  4019. !if defined(_RES_FILE)
  4020. !if defined(_C_SHARP)
  4021. MANAGED_CODE_BUILD_SWITCHES2=$(MANAGED_CODE_BUILD_SWITCHES2) /win32res:$(_RES_FILE)
  4022. !endif
  4023. !if defined(_VB)
  4024. MANAGED_CODE_BUILD_SWITCHES2=$(MANAGED_CODE_BUILD_SWITCHES2) /win32resource:$(_RES_FILE)
  4025. !endif
  4026. !endif
  4027.  
  4028. MANAGED_CODE_BUILD_SWITCHES=\
  4029.  $(MANAGED_CODE_BUILD_SWITCHES1) \
  4030.  $(MANAGED_CODE_BUILD_SWITCHES2)
  4031.  
  4032. # This split is related to changing spaces to newlines in the output.
  4033. # We change only the newlines in "2" and leave them in "1", so build.exe
  4034. # can sniff the command correctly.
  4035. MANAGED_CODE_BUILD_CMD1 = \
  4036.     $(MANAGED_CODE_BUILD_TOOL) \
  4037.     $(MANAGED_CODE_BUILD_SWITCHES1) \
  4038.  
  4039. MANAGED_CODE_BUILD_CMD1=$(MANAGED_CODE_BUILD_CMD1:  = )
  4040.  
  4041. MANAGED_CODE_BUILD_CMD2= \
  4042.     $(MANAGED_CODE_BUILD_SWITCHES2) \
  4043.     $(_MANAGED_SOURCES)
  4044.  
  4045. MANAGED_CODE_BUILD_CMD=\
  4046.  $(MANAGED_CODE_BUILD_CMD1) \
  4047.  $(MANAGED_CODE_BUILD_CMD2)
  4048.  
  4049. # Managed code always defines MAKEDLL (it's a single pass build after all).
  4050.  
  4051. MAKEDLL=1
  4052.  
  4053. ! endif # _C_SHARP || _VB || _TLBIMP
  4054. !endif # URT_VER || _PROJECT_BUILDS_MANAGED_CODE
  4055.  
  4056.  
  4057. # Variable to hold default value to w2k razzle builds
  4058. WIN2K_DDK_REPLACEMENT=win2000.obj
  4059.  
  4060. WIN2K_DDK_REPLACEMENT=winxp.obj
  4061.  
  4062. !if    defined(USE_MSVCRT) \
  4063.     && ("$(SUBSYSTEM_VERSIONX)" < "6.00")
  4064.  
  4065. !if defined(MANAGED_CXX) && "$(URT_VER)" == "1.1" && $(386) && !defined(MCPP_TYPE)
  4066.  
  4067. !if ("$(SUBSYSTEM_VERSIONX)" < "5.00")
  4068. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt11_winnt4.obj $(SDK_LIB_PATH)\msvcrt_winnt4.obj $(LIBC_LIB)
  4069. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.00")
  4070. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt11_$(WIN2K_DDK_REPLACEMENT) $(SDK_LIB_PATH)\msvcrt_$(WIN2K_DDK_REPLACEMENT) $(LIBC_LIB)
  4071. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.01")
  4072. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt11_winxp.obj $(SDK_LIB_PATH)\msvcrt_winxp.obj $(LIBC_LIB)
  4073. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.02")
  4074. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt11_win2003.obj $(SDK_LIB_PATH)\msvcrt_win2003.obj $(LIBC_LIB)
  4075. !else
  4076. !error SUBSYSTEM_VERSION=$(SUBSYSTEM_VERSIONX) is invalid for x86 and URT_VER=1.1.
  4077. !endif
  4078.  
  4079. !elseif defined(MANAGED_CXX) && "$(URT_VER)" == "2.0" && "$(MCPP_TYPE)" == "pure"
  4080.  
  4081. !if ("$(SUBSYSTEM_VERSIONX)" < "5.00") && $(386)
  4082. LIBC_LIB=$(SDK_LIB_PATH)\libcummt_winnt4.obj $(LIBC_LIB)
  4083. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.00") && $(386)
  4084. LIBC_LIB=$(SDK_LIB_PATH)\libcummt_$(WIN2K_DDK_REPLACEMENT) $(LIBC_LIB)
  4085. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.01") && $(386)
  4086. LIBC_LIB=$(SDK_LIB_PATH)\libcummt_winxp.obj $(LIBC_LIB)
  4087. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.02")
  4088. LIBC_LIB=$(SDK_LIB_PATH)\libcummt_win2003.obj $(LIBC_LIB)
  4089. !else
  4090. !error SUBSYSTEM_VERSION=$(SUBSYSTEM_VERSIONX) is invalid for URT_VER=2.0 and MCPP_TYPE=PURE.
  4091. !endif
  4092.  
  4093. !elseif defined(MANAGED_CXX) && "$(URT_VER)" == "2.0" && !defined(MCPP_TYPE)
  4094.  
  4095. !if ("$(SUBSYSTEM_VERSIONX)" < "5.00") && $(386)
  4096. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt_winnt4.obj $(SDK_LIB_PATH)\msvcrt_winnt4.obj $(LIBC_LIB)
  4097. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.00") && $(386)
  4098. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt_$(WIN2K_DDK_REPLACEMENT) $(SDK_LIB_PATH)\msvcrt_$(WIN2K_DDK_REPLACEMENT) $(LIBC_LIB)
  4099. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.01") && $(386)
  4100. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt_winxp.obj $(SDK_LIB_PATH)\msvcrt_winxp.obj $(LIBC_LIB)
  4101. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.02")
  4102. LIBC_LIB=$(SDK_LIB_PATH)\libcmmt_win2003.obj $(SDK_LIB_PATH)\msvcrt_win2003.obj $(LIBC_LIB)
  4103. !else
  4104. !error SUBSYSTEM_VERSION=$(SUBSYSTEM_VERSIONX) is invalid for URT_VER=2.0.
  4105. !endif
  4106.  
  4107. !elseif !defined(MANAGED_CXX) && !defined(MCPP_TYPE)
  4108.  
  4109. !if !defined(DEBUG_CRTS)
  4110.  
  4111. !if ("$(SUBSYSTEM_VERSIONX)" < "5.00") && $(386)
  4112. LIBC_LIB=$(SDK_LIB_PATH)\msvcrt_winnt4.obj $(LIBC_LIB)
  4113. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.00") && $(386)
  4114. LIBC_LIB=$(SDK_LIB_PATH)\msvcrt_$(WIN2K_DDK_REPLACEMENT) $(LIBC_LIB)
  4115. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.01") && $(386)
  4116. LIBC_LIB=$(SDK_LIB_PATH)\msvcrt_winxp.obj $(LIBC_LIB)
  4117. !elseif ("$(SUBSYSTEM_VERSIONX)" == "5.02")
  4118. LIBC_LIB=$(SDK_LIB_PATH)\msvcrt_win2003.obj $(LIBC_LIB)
  4119. !else
  4120. !error SUBSYSTEM_VERSION=$(SUBSYSTEM_VERSIONX) is invalid for $(_BUILDARCH).
  4121. !endif
  4122.  
  4123. !if defined(USE_STL) && "$(STL_VER)" == "70"
  4124. LIBC_LIB=$(CRT_LIB_PATH)\msvcprt_btowc.lib $(LIBC_LIB)
  4125. !endif
  4126.  
  4127. #
  4128. # temporary workaround umlibs bug
  4129. #
  4130. !if defined(UMAPPL)
  4131. _UMAPPL_LINK_LIB_IGNORE_DUPLICATE_DOWNLEVEL_LIBC_OBJ_SPECIFIED_MORE_THAN_ONCE=1
  4132. !endif
  4133.  
  4134. !endif
  4135. !endif
  4136. !endif
  4137.  
  4138. !if defined(DOWNLEVEL_BTOWC)
  4139. !  error $(MAKEDIR) DOWNLEVEL_BTOWC is no longer used, use _NT_TARGET_VERSION or SUBSYSTEM_VERSION instead.
  4140. !endif
  4141.  
  4142. !if (defined(USE_MFC) || defined(USE_MFCUNICODE)) \
  4143.     && !defined(USE_STATIC_MFC) \
  4144.     && "$(MFC_VER)" == "42" \
  4145.     && ("$(SUBSYSTEM_VERSIONX)" <= "5.00") \
  4146.     && $(386) \
  4147.     && defined(_PROVIDE_MFC_LIBS)
  4148. MFC_LIBS=$(SDK_LIB_PATH)\mfc42_downlevel.obj $(MFC_LIBS)
  4149. !endif
  4150.  
  4151. !ifndef PASS_INDEPENDENT_TARGETS
  4152.  
  4153. !IFDEF makedll
  4154. !error use MAKEDLL instead of makedll.
  4155. !ENDIF
  4156.  
  4157. !IF $(386)
  4158. OBJECTS=$(386_OBJECTS)
  4159. DLLLIBOBJECTS=$(DLLLIBOBJECTS) $(386_DLLLIBOBJECTS)
  4160. !ELSEIF $(IA64)
  4161. OBJECTS=$(IA64_OBJECTS)
  4162. DLLLIBOBJECTS=$(DLLLIBOBJECTS) $(IA64_DLLLIBOBJECTS)
  4163. !ELSEIF $(AMD64)
  4164. OBJECTS=$(AMD64_OBJECTS)
  4165. DLLLIBOBJECTS=$(DLLLIBOBJECTS) $(AMD64_DLLLIBOBJECTS)
  4166. !ELSEIF $(ARM)
  4167. OBJECTS=$(ARM_OBJECTS)
  4168. DLLLIBOBJECTS=$(DLLLIBOBJECTS) $(ARM_DLLLIBOBJECTS)
  4169. !ENDIF
  4170.  
  4171. !if defined(_RES_FILE) \
  4172.         && (   ("$(TARGETTYPE)" == "PROGRAM") \
  4173.             || ("$(TARGETTYPE)" == "DRIVER") \
  4174.             || ("$(BUILD_PASS)" == "PASS2") \
  4175.             || ("$(BUILD_PASS)" == "PASSALL") \
  4176.             || ("$(MAKEDLL)" == "1") \
  4177.             || defined(_C_SHARP) \
  4178.             || defined(_VB) \
  4179.             || defined(RESOURCE_ONLY_DLL) \
  4180.             || defined(COMPILE_RESOURCES_IN_PASS1) \
  4181.             )
  4182. MYMUILINK=$(_RES_FILE)
  4183. !endif
  4184.  
  4185. !if !defined(TARGETTYPE) || "$(TARGETTYPE)" ==  "NOTARGET"
  4186. MYMUILINK=
  4187. !endif
  4188.  
  4189. #
  4190. # BUILD.EXE defines the NOLINK variable to disable the building of any
  4191. # test executables when it is recursing on a dirs. file to build components
  4192. # in subdirectories.
  4193. #
  4194.  
  4195. !IF "$(BUILDMSG)" != "Stop."
  4196. ! IFDEF NOLINK
  4197. !  UNDEF NTKERNEL
  4198. !  UNDEF MAKEDLL
  4199. ! ELSE
  4200. !  IFDEF nolink
  4201. !   UNDEF NTKERNEL
  4202. !   UNDEF MAKEDLL
  4203. !  ENDIF
  4204. ! ENDIF # DEF NOLINK
  4205. !ENDIF # BUILDMSG != "Stop."
  4206.  
  4207. !IF (!defined(_C_SHARP) && !defined(_VB))
  4208. DYNLINK_LIB=$(TARGETPATHLIB)\$(TARGET_DIRECTORY)\$(TARGETNAME).lib
  4209. DYNLINK_LIBDIR=$(ALT_PROJECT_TARGET)\$(TARGET_DIRECTORY)\$(TARGETNAME).lib
  4210. !ENDIF
  4211.  
  4212. !IF "$(TARGETNAMEP)" != ""
  4213. DYNLINK_LIBP=$(TARGETPATHLIB)\$(TARGET_DIRECTORY)\$(TARGETNAMEP).lib
  4214. DYNLINK_LIBPDIR=$(ALT_PROJECT_TARGET)\$(TARGET_DIRECTORY)\$(TARGETNAMEP).lib
  4215. !ENDIF
  4216.  
  4217. !if !defined(MCPP_TYPE)
  4218. DYNLINK_EXP=$(TARGETPATHLIB)\$(TARGET_DIRECTORY)\$(TARGETNAME).exp
  4219. !endif
  4220.  
  4221. #
  4222. # Determine type of target link we are doing
  4223. #
  4224. !IF "$(TARGETTYPE)" == "PROGLIB"
  4225. !  IF "$(TARGETEXT)" == ""
  4226. TARGETEXT=exe
  4227. !endif
  4228. ! if defined(USE_NTDLL)
  4229. TARGETLIB=$(NTDLL_CRT)
  4230. ! else
  4231. TARGETLIB=$(LIBC_LIB)
  4232. ! endif
  4233. !ELSEIF "$(TARGETTYPE)" == "CATALOG"
  4234. TARGETEXT=cat
  4235. !ELSEIF "$(TARGETTYPE)" == "MSI"
  4236. TARGETEXT=msi
  4237. !ELSEIF "$(TARGETTYPE)" == "PROGRAM"
  4238. ! IF "$(TARGETEXT)" == ""
  4239. TARGETEXT=exe
  4240. ! endif
  4241. ! if defined(USE_NTDLL)
  4242. TARGETLIB=$(NTDLL_CRT)
  4243. ! else
  4244. TARGETLIB=$(LIBC_LIB)
  4245. ! endif
  4246. !ELSEIF "$(TARGETTYPE)" == "DYNLINK"
  4247. ! IF "$(MAKEDLL)" != ""
  4248. !  IF "$(TARGETNAME)" == "ntdll"
  4249. TARGETLIB=
  4250. !  ELSEIF defined (USE_NTDLL)           # USE_NTDLL never links with LIBC_LIB
  4251. TARGETLIB=$(WIN32DLL_LIBS) $(NTDLL_CRT)
  4252.  
  4253. !  ELSEIF defined (USE_SYSDLL)          # USE_SYSDLL uses either kernel32 (Win95) or ntdll (NT) for CRT support
  4254. !error $(MAKEDIR) - USE_SYSDLL no longer supported
  4255. !  ELSEIF defined (NO_NTDLL)            # NO_NTDLL never links with ntdll
  4256. TARGETLIB=$(WIN32DLL_LIBS) $(LIBC_LIB)
  4257. !  ELSE                                 # Everything else uses ntdll after libc.
  4258. TARGETLIB=$(WIN32DLL_LIBS) $(LIBC_LIB)
  4259. !  ENDIF
  4260. !  IF "$(TARGETEXT)" == ""
  4261. TARGETEXT=dll
  4262. !  ENDIF
  4263. ! ELSE
  4264. TARGETEXT=lib
  4265. TARGETLIB=
  4266. ! ENDIF
  4267.  
  4268. !ELSEIF "$(TARGETTYPE)" == "LIBRARY"
  4269. TARGETEXT=lib
  4270. TARGETLIB=
  4271.  
  4272. !ELSEIF "$(TARGETTYPE)" == "DRIVER"
  4273. !  IF "$(TARGETEXT)" == ""
  4274. TARGETEXT=sys
  4275. !  ENDIF
  4276. !if "$(DRIVERTYPE)" == "wdm" || "$(DRIVERTYPE)" == "WDM"
  4277. TARGETLIB=$(DDK_LIB_PATH)\wdm.lib
  4278. !ELSEIF "$(DRIVERTYPE)" == "VXD"
  4279. TARGETEXT=vxd
  4280. !ELSE
  4281. TARGETLIB=$(DDK_LIB_PATH)\ntoskrnl.lib $(DDK_LIB_PATH)\hal.lib $(DDK_LIB_PATH)\wmilib.lib
  4282. !  IF defined(SUBSYSTEM_VERSION) && "$(SUBSYSTEM_VERSION)" < "$(SUBSYSTEM_601)"
  4283. TARGETLIB=$(CRT_LIB_PATH)\safecrtnt.lib $(SDK_LIB_PATH)\libcntpr.lib $(TARGETLIB)
  4284. !  ENDIF
  4285. !ENDIF
  4286.  
  4287. #
  4288. # Add Windows Driver Framework lib if it is a WDF driver
  4289. #
  4290. !IF DEFINED(KMDF_VERSION_MAJOR)
  4291. TARGETLIB=$(TARGETLIB) \
  4292.           $(KMDF_LIB_PATH)\$(KMDF_VER_PATH)\WdfLdr.lib \
  4293.           $(KMDF_LIB_PATH)\$(KMDF_VER_PATH)\WdfDriverEntry.lib
  4294. !ENDIF
  4295.  
  4296. !ELSEIF "$(TARGETTYPE)" == "EXPORT_DRIVER"
  4297. ! IF "$(MAKEDLL)" != ""
  4298. TARGETEXT=sys
  4299. !if "$(DRIVERTYPE)" == "wdm" || "$(DRIVERTYPE)" == "WDM"
  4300. TARGETLIB=$(DDK_LIB_PATH)\wdm.lib
  4301. !ELSE
  4302. TARGETLIB=$(DDK_LIB_PATH)\ntoskrnl.lib $(DDK_LIB_PATH)\hal.lib $(DDK_LIB_PATH)\wmilib.lib
  4303. !  IF defined (SUBSYSTEM_VERSION) && "$(SUBSYSTEM_VERSION)" < "$(SUBSYSTEM_601)"
  4304. TARGETLIB=$(CRT_LIB_PATH)\safecrtnt.lib $(SDK_LIB_PATH)\libcntpr.lib $(TARGETLIB)
  4305. !  ENDIF
  4306. !ENDIF
  4307.  
  4308. #
  4309. # Add Windows Driver Framework lib if it is a WDF export driver
  4310. #
  4311. !IF DEFINED(KMDF_VERSION_MAJOR)
  4312. TARGETLIB=$(TARGETLIB) \
  4313.           $(KMDF_LIB_PATH)\$(KMDF_VER_PATH)\WdfLdr.lib \
  4314.           $(KMDF_LIB_PATH)\$(KMDF_VER_PATH)\WdfDriverEntry.lib
  4315.  
  4316. !ENDIF
  4317.  
  4318. ! ELSE
  4319. TARGETEXT=lib
  4320. TARGETLIB=
  4321. ! ENDIF
  4322.  
  4323. !ELSEIF "$(TARGETTYPE)" == "HAL"
  4324. ! IF "$(MAKEDLL)" != ""
  4325. TARGETEXT=dll
  4326. TARGETLIB=$(DDK_LIB_PATH)\ntoskrnl.lib
  4327. ! ELSE
  4328. TARGETEXT=lib
  4329. TARGETLIB=
  4330. ! ENDIF
  4331.  
  4332. !ELSEIF "$(TARGETTYPE)" == "MINIPORT"
  4333. TARGETEXT=sys
  4334.  
  4335. !ELSEIF "$(TARGETTYPE)" == "GDI_DRIVER"
  4336.  
  4337. TARGETEXT=dll
  4338. TARGETLIB=$(DDK_LIB_PATH)\win32k.lib
  4339. !ifdef USE_LIBCNTPR_FOR_GDI_DRIVER_CRTS
  4340. TARGETLIB=$(SDK_LIB_PATH)\libcntpr.lib $(TARGETLIB)
  4341. !endif
  4342. !ENDIF # TARGETTYPE
  4343.  
  4344.  
  4345. !if !defined(INSTRUMENT_FOR_COVERAGE)
  4346. INSTRUMENT_FOR_COVERAGE=0
  4347. !endif
  4348.  
  4349.  
  4350. !if defined(BUILD_DEBUG)
  4351. !message MAKEDIR=$(MAKEDIR)
  4352. !message TARGETNAME=$(TARGETNAME)
  4353. !message TARGET_DESTINATION=$(TARGET_DESTINATION)
  4354. !message TEST_CODE=$(TEST_CODE)
  4355. !message TARGETEXT=$(TARGETEXT)
  4356. !message TARGETNAME=$(TARGETNAME)
  4357. !endif
  4358.  
  4359.  
  4360. _BINPLACE_LINK_RESULT = $@
  4361. _PRE_BBT_TARGET_DESTINATION=$(_TARGET_DESTINATION_WITHOUT_QUOTES)
  4362.  
  4363.  
  4364. !if $(FREEBUILD) \
  4365.     && defined(_NTTREE) \
  4366.     && defined(TARGET_DESTINATION) \
  4367.     && "$(IBC)" != "0" \
  4368.     && ("$(_TARGET_DESTINATION_WITHOUT_QUOTES::=)" == "$(_TARGET_DESTINATION_WITHOUT_QUOTES)") \
  4369.     && (exist($(BASEDIR)\bbt\$(_BUILDARCH)fre\ibc\$(TARGET_DESTINATION:retail=)\$(TARGETNAME).$(TARGETEXT)))
  4370.  
  4371. IBC_CMD= $(_PERL) $(BASEDIR)\bbt\bbtcountsgen\ibc.pl \
  4372. ! if "$(_TARGET_DESTINATION_WITHOUT_QUOTES)" != "retail"
  4373.         /Destination:$(TARGET_DESTINATION) \
  4374. ! endif
  4375.         /File:$@
  4376. !else
  4377. IBC_CMD=
  4378. !endif
  4379.  
  4380. TARGET=
  4381.  
  4382. !ifdef PASS1_NOLIB
  4383. !ifdef NTTARGETFILE1
  4384. USE_MAKEFILE_INC=1
  4385. !undef NTTARGETFILE1
  4386. !endif
  4387. !ifdef NTTARGETFILE2
  4388. USE_MAKEFILE_INC=1
  4389. !undef NTTARGETFILE2
  4390. !endif
  4391. !ifdef NTTARGETFILES
  4392. USE_MAKEFILE_INC=1
  4393. !undef NTTARGETFILES
  4394. !endif
  4395. !undef TARGETEXEFILES
  4396. !undef MISCFILES
  4397. !endif
  4398.  
  4399. !IF ("$(TARGETTYPE)" != "UMAPPL_NOLIB" && !defined(PASS1_NOLIB)) \
  4400.     && (("$(TARGETTYPE)" == "CATALOG") \
  4401.     || ("$(TARGETTYPE)" == "MSI") \
  4402.     || ("$(OBJECTS)" != "") \
  4403.     || (defined(_RES_FILE) && (("$(TARGETTYPE)" == "DRIVER") || ("$(TARGETTYPE)" == "PROGRAM") || ("$(TARGETTYPE)" == "DYNLINK") || ("$(TARGETTYPE)" == "EXPORT_DRIVER") || ("$(TARGETTYPE)" == "PROGLIB"))) \
  4404.     || defined(_TLBIMP) \
  4405.     || defined(NTKERNEL) \
  4406.     || (defined(_C_SHARP) && ("$(_MANAGED_SOURCES:.cs=)" != "$(_MANAGED_SOURCES)")) \
  4407.     || (defined(_VB) && ("$(_MANAGED_SOURCES:.vb=)" != "$(_MANAGED_SOURCES)")) \
  4408.     || ("$(OBJLIBFILES)" != "" && (("$(TARGETTYPE)" == "LIBRARY") || ("$(TARGETTYPE)" == "DRIVER_LIBRARY")))) \
  4409.  
  4410. TARGET=$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).$(TARGETEXT)
  4411.  
  4412. !ELSE
  4413.  
  4414. !if !defined(PASS1_NOLIB) && "$(BUILD_PASS)" == "PASS1" && (("$(TARGETTYPE)" == "LIBRARY") || ("$(TARGETTYPE)" == "DRIVER_LIBRARY"))
  4415. !message error : No .lib/.dll/.exe/.sys is produced, at least for $(_BUILDARCH). Change TARGETTYPE to NOTARGET. Or possibly tag the directory not to build for $(_BUILDARCH).
  4416. !if "$(SOURCES: =)" == ""
  4417. !message error : You can probably also remove SOURCES=<empty> (try it).
  4418. !endif
  4419. !if defined(TARGETNAME) && !defined(SLS_LICENSING_MANIFEST)
  4420. !message error : You can often but not always also remove TARGETNAME (try it).
  4421. !endif
  4422. !error
  4423. !endif
  4424.  
  4425. !ENDIF
  4426.  
  4427. !if defined(SLS_LICENSING_MANIFEST) && !defined(TARGETNAME)
  4428. !error SLS_LICENSING_MANIFEST requires TARGETNAME.
  4429. !endif
  4430.  
  4431. !IFDEF NOTARGETLIB
  4432. TARGETLIB=
  4433. !ENDIF
  4434.  
  4435. !IFNDEF MACHINE_TARGETLIBS
  4436. MACHINE_TARGETLIBS=$(TARGETLIB) $(TARGETLIBS)
  4437. !ENDIF
  4438.  
  4439. !if (!defined(_C_SHARP) && !defined(_VB))
  4440. TARGETOBJFILES=$(TARGETOBJFILES) $(OBJECTS)
  4441. !ENDIF
  4442.  
  4443. # This allows us to call packthem /s to "sign" MST files
  4444. # after they're built and before they're binplaced
  4445. SIGN_THEME_FILE_CMD=
  4446. !if "$(SIGN_THEME_FILE)" == "1"
  4447. SIGN_THEME_FILE_CMD=SignTheme.cmd $(OBJ_PATH)\$(O) $@
  4448. !endif
  4449.  
  4450. #
  4451. # MUI LANGUAGE_NEUTRAL
  4452. #
  4453.  
  4454. !ifdef LANGUAGE_NEUTRAL
  4455.  
  4456.  
  4457. MUI = $(LANGUAGE_NEUTRAL)
  4458. MUI_COMMENT = LN_TEMPSUPPORT, LANGUAGE_NEUTRAL value being used to set MUI - this support will be removed soon
  4459. !endif
  4460.  
  4461. #
  4462. # Undefine these flags in case user has defined them accidentially. These flags are for internal use only in this file.
  4463. # They will be defined in this file.
  4464. #
  4465. !undef DO_LANGUAGE_NEUTRAL
  4466. !undef DO_LANGUAGE_NEUTRAL_DRV
  4467. !undef LANGUAGE_NEUTRAL_STS
  4468.  
  4469. !if "$(TARGETTYPE)" == "DRIVER"  || "$(TARGETTYPE)" == "DRIVER_LIBRARY" || "$(TARGETTYPE)" == "GDI_DRIVER"  || \
  4470.     "$(TARGETTYPE)" == "HAL"     || "$(TARGETTYPE)" == "EXPORT_DRIVER"  || "$(TARGETTYPE)" == "MINIPORT" || \
  4471.     (  ("$(MAJORCOMP)" == "ntos" || "$(MAJORCOMP)"  == "NTOS")  &&  "$(TARGETTYPE)" != "LIBRARY"  )
  4472. DO_LANGUAGE_NEUTRAL_DRV=1
  4473. !endif
  4474.  
  4475. #
  4476. # MUI_DRV is for forcing a user mode project to be treated as a driver.
  4477. # For example a printer notification dll shipped with printer driver.
  4478. #
  4479. !ifdef MUI_DRV
  4480. DO_LANGUAGE_NEUTRAL_DRV=1
  4481. !endif
  4482.  
  4483. #
  4484. # Now that we know how we'll be MUI splitting, do an extra check on LOCALIZE_BASE_FILE to be sure it's not being abused
  4485. #
  4486. !if "$(LOCALIZE_BASE_FILE)" == "1"
  4487. ! if "$(DO_LANGUAGE_NEUTRAL_DRV)" == "1"
  4488. !message BUILDMSG: Warning: LOCALIZE_BASE_FILE should only be used if you are doing kernel-mode style MUI splitting : $(MAKEDIR)
  4489. ! endif
  4490. !endif
  4491.  
  4492. #
  4493. # If user explicitely disables MUI then they must also define MUI_COMMENT
  4494. # and put justification as why he disabled MUI, otherwise we'll output error.
  4495. #
  4496. !if  "$(MUI)" != "1"
  4497. !  if "$(MUI)" == "0"
  4498. !    ifdef MUI_COMMENT
  4499. LANGUAGE_NEUTRAL_STS=LGNSTS_MUIOFF
  4500. !    else
  4501. !      ERROR MUI split disabling by setting MUI=0 requires a detailed explanation justifying this decision.  Please add one in the form "MUI_COMMENT=" to your sources file.
  4502. !    endif
  4503. !  else
  4504. !    ERROR MUI=$(MUI); MUI must be set to 1 or 0.
  4505. !  endif
  4506. !endif #MUI != "1"
  4507.  
  4508. #
  4509. # If MUI is enabled we still check if the project is of valid type for MUIzation.
  4510. # The project must be UNMANAGED code.
  4511. #
  4512. !if  "$(MUI)" == "1"
  4513. ! if ( defined(DO_LANGUAGE_NEUTRAL_DRV) || "$(TARGETTYPE)" == "PROGRAM" || \
  4514.        "$(TARGETTYPE)" == "PROGLIB"     || "$(TARGETTYPE)" == "DYNLINK" || \
  4515.      ( "$(TARGETTYPE)" == "NOTARGET" && \
  4516.         ( defined(MISCFILES)                 || defined(LANG_MISCFILES)       || \
  4517.           defined(MULTI_MISCFILES)           || defined(MULTI_MUI_MISCFILES)  || \
  4518.           defined(LOC_MISCFILES)             || defined(LOC_MUI_MISCFILES)    || \
  4519.           defined(PRELOC_MISCFILES)          || defined(PRELOC_MUI_MISCFILES) || \
  4520.           defined(PRELOC_MUI_ONLY_MISCFILES) || defined(PASS0_BINPLACE)       || \
  4521.           defined(PASS1_BINPLACE)            || defined(PASS2_BINPLACE) ) ) ) && \
  4522.      ( !defined(_C_SHARP) && !defined(_VB) )
  4523. DO_LANGUAGE_NEUTRAL=1
  4524. LANGUAGE_NEUTRAL_STS=LGNSTS_UNKNOWN
  4525. !  ELSE
  4526. !      if  "$(TARGETTYPE)" == "PROGRAM" || "$(TARGETTYPE)" == "DYNLINK"
  4527. LANGUAGE_NEUTRAL_STS=LGNSTS_MANAGED
  4528. !      endif
  4529. !      if  "$(TARGETTYPE)" == "DRIVER" || "$(TARGETTYPE)" == "GDI_DRIVER" || "$(TARGETTYPE)" == "EXPORT_DRIVER"  || "$(TARGETTYPE)" == "HAL" || "$(TARGETTYPE)" == "MINIPORT"
  4530. LANGUAGE_NEUTRAL_STS=LGNSTS_KERNEL
  4531. !      endif
  4532. !  ENDIF
  4533. !ENDIF  #MUI == "1"
  4534.  
  4535. LANGUAGE_NEUTRAL_RESDIR=$(LOC_BIN)
  4536.  
  4537. #
  4538. # MUI Manifest
  4539. #
  4540. !ifdef DO_LANGUAGE_NEUTRAL
  4541. ! ifndef DO_LANGUAGE_NEUTRAL_DRV
  4542. RC_CONFIG_ROOT_SOURCE=$(NTMAKEENV)\MUI.RCConfig
  4543. ! else
  4544. RC_CONFIG_ROOT_SOURCE=$(NTMAKEENV)\MUI_DRV.RCConfig
  4545. ! endif
  4546.  
  4547. RC_CONFIG_ROOT=$(NTMAKEENV)
  4548. ! ifndef RC_CONFIG
  4549. !  ifndef DO_LANGUAGE_NEUTRAL_DRV
  4550. !   ifndef MUI_BIDI_IMG
  4551. RC_CONFIG=MUI.RCConfig
  4552. !   else
  4553. RC_CONFIG=MUI_BIDI_IMG.RCConfig
  4554. !   endif
  4555. !  else
  4556. !   ifndef MUI_BIDI_IMG
  4557. RC_CONFIG=MUI_DRV.RCConfig
  4558. !   else
  4559. RC_CONFIG=MUI_DRV_BIDI_IMG.RCConfig
  4560. !   endif
  4561. !  endif
  4562. ! endif #ndef RC_CONFIG
  4563.  
  4564.  
  4565. # Lowercase the name
  4566. RC_CONFIG_LOWERCASE=$(RC_CONFIG)
  4567. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:A=a)
  4568. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:B=b)
  4569. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:C=c)
  4570. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:D=d)
  4571. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:E=e)
  4572. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:F=f)
  4573. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:G=g)
  4574. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:H=h)
  4575. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:I=i)
  4576. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:J=j)
  4577. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:K=k)
  4578. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:L=l)
  4579. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:M=m)
  4580. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:N=n)
  4581. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:O=o)
  4582. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:P=p)
  4583. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:Q=q)
  4584. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:R=r)
  4585. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:S=s)
  4586. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:T=t)
  4587. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:U=u)
  4588. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:V=v)
  4589. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:W=w)
  4590. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:X=x)
  4591. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:Y=y)
  4592. RC_CONFIG_LOWERCASE=$(RC_CONFIG_LOWERCASE:Z=z)
  4593.  
  4594. # Create the variants we need
  4595. RC_CONFIG_SOURCE_FILENAME=$(RC_CONFIG_LOWERCASE:..\=)
  4596. RC_CONFIG_BASENAME=$(RC_CONFIG_SOURCE_FILENAME)
  4597. RC_CONFIG_BASENAME=$(RC_CONFIG_BASENAME:.muimanifest=)
  4598. RC_CONFIG_BASENAME=$(RC_CONFIG_BASENAME:.rcconfig=)
  4599.  
  4600.  
  4601. !ifdef DELTA_RC_CONFIG
  4602. DELTA_RC_CONFIG_BASENAME=$(DELTA_RC_CONFIG:.muimanifest=)
  4603. DELTA_RC_CONFIG_BASENAME=$(DELTA_RC_CONFIG:.rcconfig=)
  4604. RC_CONFIG_OBJ2=$(OBJ_PATH)\$O\$(DELTA_RC_CONFIG_BASENAME).drcc
  4605. !endif
  4606. RC_CONFIG_OBJ1=$(OBJ_PATH)\$O\$(RC_CONFIG_BASENAME).rcc
  4607.  
  4608. MAKE_RC_CONFIG_CMD=nmake.exe /nologo /f $(NTMAKEENV)\makefile.def $(RC_CONFIG_OBJ1)
  4609. MAKE_DELTA_RC_CONFIG_CMD=nmake.exe /nologo /f $(NTMAKEENV)\makefile.def $(RC_CONFIG_OBJ2)
  4610. RC_CONFIG_DEFINES=
  4611. RC_CONFIG_PREPROCESSOR_NAME=preprocessor
  4612. ! if "$(TARGETTYPE)" != "NOTARGET"
  4613. LANGUAGE_NEUTRAL_RESOURCE = -q $(RC_CONFIG_OBJ1)
  4614. !     ifdef MUI_ALWAYS_SPLIT_VERSION
  4615. LANGUAGE_NEUTRAL_RESOURCE = $(LANGUAGE_NEUTRAL_RESOURCE) -g1
  4616. !     endif
  4617. !     ifdef DELTA_RC_CONFIG
  4618. LANGUAGE_NEUTRAL_RESOURCE = $(LANGUAGE_NEUTRAL_RESOURCE) -qq $(RC_CONFIG_OBJ2)
  4619. !     endif
  4620. ! else
  4621. LANGUAGE_NEUTRAL_RESOURCE=
  4622. ! endif
  4623.  
  4624. LANGUAGE_NEUTRAL_RESOURCE_MUIRCT = /q $(RC_CONFIG_OBJ1)
  4625. !    ifdef MUI_ALWAYS_SPLIT_VERSION
  4626. LANGUAGE_NEUTRAL_RESOURCE_MUIRCT = $(LANGUAGE_NEUTRAL_RESOURCE_MUIRCT) /f
  4627. !    endif
  4628.  
  4629. !else
  4630.  
  4631. MAKE_RC_CONFIG_CMD=
  4632. MAKE_DELTA_RC_CONFIG_CMD=
  4633. LANGUAGE_NEUTRAL_RESOURCE=
  4634. LANGUAGE_NEUTRAL_RESOURCE_MUIRCT=
  4635. !endif #defined DO_LANGUAGE_NEUTRAL
  4636.  
  4637.  
  4638. #
  4639. # Lsbuild.exe section
  4640. #
  4641.  
  4642. #
  4643. # Decide if we need to extract resource comments while compiling the resources.
  4644. # This is similar to setting BUILD_LCG.
  4645. #
  4646. # We will create LCE files if:
  4647. #
  4648. # - one of the following is true:
  4649. #   - The developer specifies BUILD_LCE_FILE=1 in their sources file
  4650. #   - We are NOT building test code
  4651. # - DO_LSBUILD=1
  4652. #
  4653. LCE_FILE=$(OBJ_PATH)\$O\$(TARGETNAME).lce
  4654. !if "$(BUILD_LCE_FILE)" != ""
  4655. !message LCG: BUILD_LCE_FILE: $(BUILD_LCE_FILE)
  4656. ! if "$(BUILD_LCE_FILE)" != "1" && "$(BUILD_LCE_FILE)" != "0"
  4657. !  error BUILD_LCE_FILE must be empty, 1, or 0
  4658. ! endif
  4659.  
  4660. !elseif defined(TEST_CODE)
  4661. BUILD_LCE_FILE=0
  4662.  
  4663. !else
  4664. BUILD_LCE_FILE=1
  4665.  
  4666. !endif
  4667.  
  4668. # If DO_LSBUILD is turned off, don't create LCE files
  4669. !if "$(DO_LSBUILD)" != "1"
  4670. BUILD_LCE_FILE=0
  4671. !endif
  4672.  
  4673.  
  4674.  
  4675.  
  4676. #
  4677. # Only perform LSBUILD-related operations if the LS option is passed to Razzle
  4678. #
  4679. !if "$(DO_LSBUILD)" == "1"
  4680.  
  4681. # If they did not supply an LCI file, look for one in the default place/name
  4682. !if defined(LCI_FILE)
  4683. ! if !exist($(LCI_FILE))
  4684. !  error LCI_DEPEND does not exist : $(LCI_DEPEND)
  4685. ! else
  4686. LCI_DEPEND=$(LCI_FILE)
  4687. ! endif
  4688. !else
  4689. LCI_DEPEND=$(TARGETNAME).$(TARGETEXT).lci
  4690. !endif
  4691.  
  4692. # Stuff we use in multiple places
  4693. LCG_DEPEND=
  4694. MUIRES_DEPEND=$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).muires
  4695.  
  4696.  
  4697.  
  4698. # We will create LCG files if:
  4699. #
  4700. # - We are in PASS2 or PASSALL and have a target
  4701. #    or PASS1 and building a RESOURCE_ONLY_DLL
  4702. # - one of the following is true:
  4703. #   - The developer specifies BUILD_LCG=1 in their sources file
  4704. #   - The developer specifies LCG_SOURCE=foo.bar in their sources file
  4705. #   - We are NOT building test code
  4706. #   - MUI splitting is being done
  4707. #     - A .muires file was created
  4708. #     - We can find the .res file(s) specified by MYMUILINK
  4709. #   - There is an developer-supplied LCI file present
  4710. #   - An LCE file was created by the resource compiler
  4711. #
  4712. !if ("$(BUILD_PASS)" == "PASS2" \
  4713.         || "$(BUILD_PASS)" == "PASSALL" \
  4714.         || ("$(BUILD_PASS)" == "PASS1" && defined(RESOURCE_ONLY_DLL)) \
  4715.         ) \
  4716.     && "$(TARGETTYPE)" != "NOTARGET" && "$(TARGETNAME)" != ""
  4717.  
  4718. ! if "$(BUILD_LCG)" != ""
  4719. !message LCG: BUILD_LCG: $(BUILD_LCG)
  4720. !  if "$(BUILD_LCG)" != "1" && "$(BUILD_LCG)" != "0"
  4721. !    error BUILD_LCG must be empty, 1, or 0
  4722. !  endif
  4723. ! endif
  4724.  
  4725. ! if "$(BUILD_LCG)" == "0"
  4726. # Nothing to do except prevent entering the if/else chain below
  4727.  
  4728. ! elseif "$(BUILD_LCG)" == "1"
  4729.  
  4730. # It was set forcibly by the user, make sure we set MUI_DEPEND correctly
  4731. !  if defined(DO_LANGUAGE_NEUTRAL)
  4732.  
  4733. # MUI dependancies must be the first ones we look for so that we set MUI_DEPEND
  4734. # properly - the LCI and LCE dependancies will get added automatically later on.
  4735. !   if exist($(MUIRES_DEPEND))
  4736. MUI_DEPEND=$(MUIRES_DEPEND)
  4737.  
  4738. # Note that we do not check for existance - this could be multiple files.
  4739. # We rely on the MUI code to create the *.notloc file if needed and we
  4740. # explicitly look for it in CreateLCGFile.pl.
  4741. !   elseif "$(MYMUILINK)" != ""
  4742. MUI_DEPEND=$(MYMUILINK)
  4743.  
  4744. !   endif # MUIRES_DEPEND
  4745. !  endif # DO_LANGUAGE_NEUTRAL
  4746.  
  4747. ! elseif "$(LCG_SOURCE)" != ""
  4748. BUILD_LCG=1
  4749.  
  4750. ! elseif defined(TEST_CODE)
  4751. BUILD_LCG=0
  4752.  
  4753. ! elseif defined(DO_LANGUAGE_NEUTRAL)
  4754.  
  4755. # MUI dependancies must be the first ones we look for so that we set MUI_DEPEND
  4756. # properly - the LCI and LCE dependancies will get added automatically later on.
  4757. !  if exist($(MUIRES_DEPEND))
  4758. MUI_DEPEND=$(MUIRES_DEPEND)
  4759. BUILD_LCG=1
  4760.  
  4761. # Note that we do not check for existance - this could be multiple files.
  4762. # We rely on the MUI code to create the *.notloc file if needed and we
  4763. # explicitly look for it in CreateLCGFile.pl.
  4764. !  elseif "$(MYMUILINK)" != ""
  4765. MUI_DEPEND=$(MYMUILINK)
  4766. BUILD_LCG=1
  4767.  
  4768. !  elseif exist($(LCI_DEPEND))
  4769. BUILD_LCG=1
  4770.  
  4771. !  elseif exist($(LCE_FILE))
  4772. BUILD_LCG=1
  4773.  
  4774. !  else
  4775. BUILD_LCG=0
  4776.  
  4777. !  endif
  4778.  
  4779. ! else
  4780. BUILD_LCG=0
  4781.  
  4782. ! endif # DO_LANGUAGE_NEUTRAL
  4783.  
  4784. !else
  4785. BUILD_LCG=0
  4786.  
  4787. !endif
  4788.  
  4789.  
  4790. #
  4791. # If we are supposed to create an LCG, decide what we depend on for makefile rules and what our source/input file is
  4792. #
  4793. !if "$(BUILD_LCG)" == "1"
  4794.  
  4795. # If they set LCG_SOURCE, we use that for both LCG_DEPEND and LCG_SOURCE.
  4796. !if "$(LCG_SOURCE)" != ""
  4797. !message LCG: Using LCG_SOURCE to set LCG_TARGET and LCG_DEPEND
  4798. LCG_DEPEND=$(LCG_SOURCE)
  4799. LCG_TARGET=$(LCG_SOURCE).lcg
  4800.  
  4801.  
  4802. # If MUI splitting is being done (the normal case for non-managed code with win32 resources),
  4803. # we use the same file as MUI for LCG_DEPEND and the .MUI file for LCG_SOURCE.
  4804. !elseif "$(MUI_DEPEND)" != ""
  4805. !message LCG: Using MUI_DEPEND to set LCG_TARGET and LCG_DEPEND
  4806. LCG_DEPEND=$(MUI_DEPEND)
  4807. LCG_SOURCE=$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).$(TARGETEXT).mui
  4808. LCG_TARGET=$(OBJ_PATH)\$O\$(TARGETNAME).$(TARGETEXT).mui.lcg
  4809.  
  4810. # Use the non-MUI stuff if it is defined and depend on $(TARGET) as well as using it for the source.
  4811. !elseif "$(TARGET)" != ""
  4812. !message LCG: Using TARGET to set LCG_TARGET and LCG_DEPEND
  4813. LCG_DEPEND=$(TARGET)
  4814. LCG_SOURCE=$(TARGET)
  4815. LCG_TARGET=$(OBJ_PATH)\$O\$(TARGETNAME).$(TARGETEXT).lcg
  4816.  
  4817. !endif
  4818.  
  4819.  
  4820. # If we have an LCG_SOURCE, add in any extra dependancies we can find
  4821. !if "$(LCG_SOURCE)" != ""
  4822.  
  4823. # If it exists, we have a dependency on the lci (dev supplied comments) file
  4824. !if exist($(LCI_DEPEND))
  4825. !message LCG: Adding LCI dependency: $(LCI_DEPEND)
  4826. LCG_DEPEND=$(LCG_DEPEND) $(LCI_DEPEND)
  4827. !endif
  4828.  
  4829. # If we are creating an LCE file, add a dependency on the lce (resource compiler extracted comments) file
  4830. !if "$(BUILD_LCE_FILE)" == "1"
  4831. !message LCG: Adding LCE dependency: $(LCE_FILE)
  4832. LCG_DEPEND=$(LCG_DEPEND) $(LCE_FILE)
  4833. LSBUILD_LCE_OPTION=/e:$(LCE_FILE)
  4834. !else
  4835. LSBUILD_LCE_OPTION=
  4836. !endif
  4837.  
  4838. !endif # LCG_SOURCE
  4839.  
  4840. !message LCG_SOURCE: $(LCG_SOURCE)
  4841. !message LCG_DEPEND: $(LCG_DEPEND)
  4842. !message LCG_TARGET: $(LCG_TARGET)
  4843.  
  4844. !endif # BUILD_LCG
  4845.  
  4846. !endif # DO_LSBUILD
  4847.  
  4848.  
  4849. # Support for localizing the file we just linked
  4850. LOCALIZE_BASE_FILE_CMD=
  4851.  
  4852. !if "$(LOCALIZE_BASE_FILE)" == "1"
  4853. ! if defined(DO_LSBUILD)
  4854.  
  4855. LOCALIZE_BASE_FILE_CMD=\
  4856.     $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  4857.         /g:$@.lcg \
  4858.         /f:$@ \
  4859.         /t:$(OBJ_PATH)\$O \
  4860.         $(LSBUILD_PARSER_ID_OPTION) \
  4861.         $(ALT_LCI_DIR_OPTION) \
  4862.         /l:$(LANGUAGE) \
  4863.         /s:$(LSBUILD_PARSER_SETTINGS) \
  4864. !  ifndef NO_BINPLACE
  4865.         /b:$@.binplace.txt \
  4866.         /r:$(LCG_BINPLACE_TARGET) \
  4867. !  endif # NO_BINPLACE
  4868.         $(LSBUILD_LCE_OPTION)
  4869. ! endif # DO_LSBUILD
  4870.  
  4871. !endif # LOCALIZE_BASE_FILE
  4872.  
  4873.  
  4874. #
  4875. # End of Lsbuild.exe rules/definitions
  4876. #
  4877.  
  4878.  
  4879.  
  4880.  
  4881. !IF "$(NOLINK)" == "" ||                                     \
  4882.     ("$(NOLINK)" != "" && !defined(PASS1_NOLIB) && ("$(TARGETTYPE)" == "LIBRARY" ||     \
  4883.                         (   ("$(TARGETTYPE)" == "DYNLINK" ||   \
  4884.                          "$(TARGETTYPE)" == "PROGLIB" || \
  4885.                          "$(TARGETTYPE)" == "EXPORT_DRIVER" || \
  4886.                          "$(TARGETTYPE)" == "HAL")    &&       \
  4887.                             "$(MAKEDLL)" == "")              \
  4888.                            )                                 \
  4889.     )
  4890.  
  4891.  
  4892. ! IF "$(NOLINK)" != "" && "$(TARGET)" != ""
  4893. !  ifndef NO_DLL_EXPORTS
  4894. TARGETLIBFILES=$(TARGETLIBFILES) $(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).lib
  4895. !  endif
  4896. ! ELSE
  4897. TARGETEXEFILES=$(TARGETEXEFILES) $(TARGET)
  4898. ! ENDIF
  4899.  
  4900. !ENDIF # NOLINK == "" || building .lib file for dll
  4901.  
  4902. !if "$(UMAPPL)" == ""
  4903. # Turn off UMEXEFILES/UMOBJFILES (handles case where it's conditional in sources file
  4904. # and build doesn't realize it when generating _objects.mac).
  4905. UMEXEFILES=
  4906. UMOBJFILES=
  4907. !endif
  4908.  
  4909. !IF defined(NTKERNEL)
  4910.  
  4911. TARGETOBJFILES=$(TARGETOBJFILES) $(OBJ_PATH)\$O\$(NTKERNEL).obj
  4912.  
  4913. ! IFNDEF NOLINK
  4914.  
  4915. TARGETEXEFILES=$(TARGETEXEFILES) $(OBJ_PATH)\$O\$(NTKERNEL).exe
  4916.  
  4917. ! ENDIF # NDEF NOLINK
  4918. !ENDIF # NTKERNEL
  4919.  
  4920. !IFDEF USE_LINT
  4921. ! IFNDEF LINT_OUTPUT
  4922. LINT_OUTPUT=$(TARGETNAME)
  4923. ! ENDIF
  4924. ! IFNDEF LINT_EXT
  4925. LINT_EXT=tmp
  4926. ! ENDIF
  4927. ! IF "$(LINT_TYPE)" == "all"
  4928. TARGETLOBFILES1=
  4929. TARGETLOBFILES2=$(OBJ_PATH)\$O\$(LINT_OUTPUT).$(LINT_EXT)
  4930. ! ELSEIF "$(LINT_TYPE)" == "lob"
  4931. TARGETLOBFILES1=$(TARGETOBJFILES:.obj=.lob)
  4932. TARGETLOBFILES2=
  4933. ! ELSE
  4934. TARGETLOBFILES1=
  4935. TARGETLOBFILES2=$(TARGETOBJFILES:.obj=.lob)
  4936. ! ENDIF
  4937. !ELSE
  4938. TARGETLOBFILES1=
  4939. TARGETLOBFILES2=
  4940. !ENDIF
  4941.  
  4942. #
  4943. # Define NT_UP as 0 in environment to turn on MP.
  4944. # If undefined or equal to 1, you get UP.
  4945. #
  4946.  
  4947. !IFNDEF NT_UP
  4948. NT_UP=1
  4949. !ENDIF
  4950.  
  4951. !IF "$(NT_UP)" == "0"
  4952. NT_UP_DEFINES=
  4953. !ELSE
  4954. NT_UP_DEFINES=/DNT_UP=1
  4955. !ENDIF
  4956.  
  4957. !IFNDEF NT_INST
  4958. NT_INST=0
  4959. !ENDIF
  4960.  
  4961. #
  4962. # User defined variables (environment variables or command line).
  4963. # A cpu specific definition will take precedence over the MSC definition.
  4964. #
  4965. # xxx_WARNING_LEVEL
  4966. # xxx_OPTIMIZATION
  4967. # xxx_CPPFLAGS
  4968. #
  4969.  
  4970. !IFNDEF MSC_WARNING_LEVEL
  4971. MSC_WARNING_LEVEL=/W3
  4972. !ENDIF
  4973.  
  4974. #
  4975. # End of user defined variables.
  4976. #
  4977.  
  4978. STD_DEFINES=/DCONDITION_HANDLING=1 $(NT_UP_DEFINES) \
  4979.             /DNT_INST=$(NT_INST) $(WIN32_DEFINE) $(NT_PNP_POWER_DEFINES) \
  4980.             $(NT_PNP_STUB_DEFINES)
  4981.  
  4982. !IFNDEF NOT_LEAN_AND_MEAN
  4983. STD_DEFINES = $(STD_DEFINES) /DWIN32_LEAN_AND_MEAN=1
  4984. !ENDIF
  4985.  
  4986. !if "$(NTDEBUG)" == "ntsd" || "$(NTDEBUG)" == "cvp" || "$(NTDEBUG)" == "sym"
  4987. TARGET_DBG_DEFINES= $(TARGET_DBG_DEFINES) /DDEVL=1 /DDBG=1
  4988. !else
  4989. TARGET_DBG_DEFINES= $(TARGET_DBG_DEFINES) /DDEVL=1
  4990. !endif
  4991.  
  4992. !if !defined(RESOURCE_ONLY_DLL) || \
  4993.     ("$(NTDEBUG)" == "ntsd") || \
  4994.     ("$(NTDEBUG)" == "ntsdnodbg") || \
  4995.     ("$(NTDEBUG)" == "cvp") || \
  4996.     ("$(NTDEBUG)" == "sym")
  4997. DBGFLAGS=/Zi
  4998. !else
  4999. DBGFLAGS=
  5000. !endif
  5001.  
  5002. !ifndef __BUILDMACHINE__
  5003. __BUILDMACHINE__=$(USERNAME: =)
  5004. !endif
  5005. !if exist ($(OBJECT_ROOT)\$O\__blddate__)
  5006. !include $(OBJECT_ROOT)\$O\__blddate__
  5007. !endif
  5008. TARGET_DBG_DEFINES=$(TARGET_DBG_DEFINES)\
  5009. !ifdef BUILDDATE
  5010.     /D__BUILDDATE__=$(BUILDDATE)\
  5011. !endif
  5012.     /D__BUILDMACHINE__=$(__BUILDMACHINE__)
  5013.  
  5014. !IF "$(PRECOMPILED_OPTION)" == ""
  5015. ! IF "$(PRECOMPILED_INCLUDE)" != ""
  5016. !  IF "$(PRECOMPILED_INCLUDE)" != "$(PRECOMPILED_INCLUDE:.hxx=)"
  5017. PRECOMPILED_CXX=1
  5018. !  ENDIF
  5019. !  IF "$(PRECOMPILED_INCLUDE)" != "$(PRECOMPILED_INCLUDE:.hpp=)"
  5020. PRECOMPILED_CXX=1
  5021. !  ENDIF
  5022. !  IF "$(PRECOMPILED_INCLUDE)" != "$(PRECOMPILED_INCLUDE:.cxx=)"
  5023. PRECOMPILED_CXX=1
  5024. !  ENDIF
  5025. !  IF "$(PRECOMPILED_INCLUDE)" != "$(PRECOMPILED_INCLUDE:.cpp=)"
  5026. PRECOMPILED_CXX=1
  5027. !  ENDIF
  5028. !  IF "$(PRECOMPILED_PCH)" == ""
  5029. PRECOMPILED_PCH=$(PRECOMPILED_INCLUDE_BASENAME:.hxx=.pch)
  5030. PRECOMPILED_PCH=$(PRECOMPILED_PCH:.hpp=.pch)
  5031. PRECOMPILED_PCH=$(PRECOMPILED_PCH:.h=.pch)
  5032. PRECOMPILED_PCH=$(PRECOMPILED_PCH:.cxx=.pch)
  5033. PRECOMPILED_PCH=$(PRECOMPILED_PCH:.cpp=.pch)
  5034. PRECOMPILED_PCH=$(PRECOMPILED_PCH:.c=.pch)
  5035. !  ENDIF
  5036. !  IF "$(PRECOMPILED_OBJ)" == ""
  5037. PRECOMPILED_OBJ=$(PRECOMPILED_PCH:.pch=.obj)
  5038. !  ENDIF
  5039. ! ENDIF
  5040. !ENDIF
  5041.  
  5042. !IF "$(PRECOMPILED_OPTION)" == ""
  5043. ! IF "$(PRECOMPILED_INCLUDE)" != ""
  5044. !  IF "$(PRECOMPILED_PCH)" != ""
  5045. !    if $(USE_OBJECT_ROOT)
  5046. HEADERFILE=/Fp$(OBJ_PATH)\$O\$(PRECOMPILED_PCH)
  5047. !    else
  5048. HEADERFILE=/Fp$O\$(PRECOMPILED_PCH)
  5049. !    endif
  5050. !  ENDIF
  5051. !  IF "$(PRECOMPILED_OBJ)" != ""
  5052. !    if $(USE_OBJECT_ROOT)
  5053. HEADEROBJNAME=$(OBJ_PATH)\$O\$(PRECOMPILED_OBJ)
  5054. !    else
  5055. HEADEROBJNAME=$O\$(PRECOMPILED_OBJ)
  5056. !    endif
  5057. HEADEROBJ=/Fo"$(HEADEROBJNAME)"
  5058. !  ENDIF
  5059.  
  5060. !   IF "$(PRECOMPILED_CXX)" == ""
  5061. PRECOMPILED=/Yu$(PRECOMPILED_INCLUDE_BASENAME) $(HEADERFILE)
  5062. PRECOMPILED_CXX=
  5063. !   ELSE
  5064. PRECOMPILED=
  5065. PRECOMPILED_CXX=/Yu$(PRECOMPILED_INCLUDE_BASENAME) $(HEADERFILE)
  5066. !   ENDIF
  5067. !   if $(USE_OBJECT_ROOT)
  5068. PRECOMPILED_TARGET=$(OBJ_PATH)\$O\$(PRECOMPILED_PCH)
  5069. !   else
  5070. PRECOMPILED_TARGET=$O\$(PRECOMPILED_PCH)
  5071. !   endif
  5072. ! ELSE
  5073. PRECOMPILED=
  5074. PRECOMPILED_CXX=
  5075. ! ENDIF
  5076. !ELSE
  5077. ! IF "$(PRECOMPILED_CXX)" == ""
  5078. PRECOMPILED=$(PRECOMPILED_OPTION)
  5079. PRECOMPILED_CXX=
  5080. ! ELSE
  5081. PRECOMPILED=
  5082. PRECOMPILED_CXX=$(PRECOMPILED_OPTION)
  5083. ! ENDIF
  5084. PRECOMPILED_TARGET=$(PRECOMPILED_TARGET)
  5085. ! IF "$(PRECOMPILED_TARGET)" != ""
  5086. HEADERFILE=/Fp$(PRECOMPILED_TARGET)
  5087. ! ENDIF
  5088. ! IF "$(PRECOMPILED_OBJ)" != ""
  5089. HEADEROBJNAME=$(PRECOMPILED_OBJ)
  5090. HEADEROBJ=/Fo$(HEADEROBJNAME)
  5091. ! ENDIF
  5092. !ENDIF
  5093.  
  5094. !IF "$(NTNOPCH)" != ""
  5095. # Need to do this conditionally.  If the pch obj exists, it's likely existing files
  5096. # reference it (ie: this isn't a clean build).  Keep the file ref but delete the
  5097. # pch stuff so links will work.
  5098. !ifdef HEADEROBJNAME
  5099. !if !exist($(HEADEROBJNAME))
  5100. HEADEROBJNAME=
  5101. HEADEROBJ=
  5102. PRECOMPILED_OBJ=
  5103. !if [del $(OBJ_PATH)\$O\_headerobjname.inc 2>nul]
  5104. !endif
  5105. !else
  5106. #
  5107. # Clearing PRECOMPILED_PCH below makes the delayed evaluation of HEADEROBJNAME
  5108. # be just objfre\i386\, which nmake complains it does not know how to make,
  5109. # and which causes stdinc.obj to not be put in the .lib.
  5110. #
  5111. # Force the evaluation of HEADEROBJNAME.
  5112. #
  5113. !if [-mkdir $(OBJ_PATH)\$O >nul 2>&1] && [echo HEADEROBJNAME=$(HEADEROBJNAME) > $(OBJ_PATH)\$O\_headerobjname.inc]
  5114. !endif
  5115. !endif
  5116. !endif
  5117. PRECOMPILED=
  5118. PRECOMPILED_CXX=
  5119. PRECOMPILED_INCLUDE=
  5120. PRECOMPILED_TARGET=
  5121. PRECOMPILED_PCH=
  5122. !if defined(HEADEROBJNAME) && exist($(OBJ_PATH)\$O\_headerobjname.inc)
  5123. !include $(OBJ_PATH)\$O\_headerobjname.inc
  5124. !endif
  5125. !ENDIF
  5126.  
  5127. !ifdef USECXX_FLAG
  5128. USECXX_FLAG=/TP
  5129. #!if "$(URT_VER)" >= "2"
  5130. # Why doesn't this work here?
  5131. # Every assignment to MANAGED_CXX_FLAGS precedes here (if that even matters).
  5132. #C_COMPILER_FLAGS_NOPCH=$(C_COMPILER_FLAGS_NOPCH) $(MANAGED_CXX_FLAGS)
  5133. #!endif
  5134. !endif
  5135.  
  5136. !IF ("$(PRECOMPILED_CXX)" == "") && ("$(USECXX_FLAG)" == "")
  5137. PRECOMPILED_FLAG=$(PRECOMPILED_FLAG) /Tc
  5138. !ELSE
  5139. PRECOMPILED_FLAG=$(PRECOMPILED_FLAG) /Tp
  5140. !ENDIF
  5141.  
  5142.  
  5143. #
  5144. # Set linker options
  5145. #
  5146.  
  5147. #
  5148. # Merge _PAGE with PAGE, _TEXT with .text, and make sure
  5149. # INIT sections are discardable
  5150. #
  5151.  
  5152. !ifdef LINKER_NOREF
  5153. LINK_REF_FLAG=/OPT:NOREF /OPT:NOICF
  5154. !else
  5155. ! ifdef LINKER_NOICF
  5156. LINK_REF_FLAG=/OPT:REF /OPT:NOICF
  5157. ! else
  5158. LINK_REF_FLAG=/OPT:REF /OPT:ICF
  5159. ! endif
  5160. !endif
  5161.  
  5162. !ifdef NOT_TERMINAL_SERVER_AWARE
  5163. TSLINKER_FLAG=
  5164. !else
  5165. !       if $(_NT_TOOLS_VERSION) >= 0x700
  5166. TSLINKER_FLAG=/tsaware
  5167. !       else
  5168. TSLINKER_FLAG=
  5169. !       endif
  5170. !endif
  5171.  
  5172. !if $(_NT_TOOLS_VERSION) >= 0x800
  5173. DYNAMICBASE_FLAG=/dynamicbase
  5174. !else
  5175. DYNAMICBASE_FLAG=
  5176. !endif
  5177.  
  5178. #
  5179. # warning LNK4010: invalid subsystem version number 4.00; default subsystem version assumed (\nt\sdktools\build)
  5180. # warning LNK4039: section 'INIT' specified with /SECTION option does not exist (\nt\sdktools\build)
  5181. # warning LNK4078: multiple 'INIT' sections found with different attributes (E2000020) (\nt\base\boot\bldr\daytona)
  5182. # warning LNK4070: /OUT: directive in .EXP differs from output filename ignoring directive (\nt\base\ntos\init\mp)
  5183. # warning LNK4221: no public symbols found; archive member will be inaccessible
  5184. #
  5185. DEFAULT_LINK_LIB_IGNORE=4010,4037,4039,4065,4070,4078,4087,4089,4221
  5186. !if "$(BUILD_PRODUCT)" == "NT" || defined(LINK_ALLOW_MISSING_BASE_ADDRESS)
  5187. # Missing base address not interesting for OS (entire product rebased at postbuild time)
  5188. DEFAULT_LINK_LIB_IGNORE=$(DEFAULT_LINK_LIB_IGNORE),4198
  5189. !endif
  5190.  
  5191. !ifdef LINK_LIB_IGNORE
  5192. LINK_LIB_IGNORE_FLAG=/IGNORE:$(LINK_LIB_IGNORE),$(DEFAULT_LINK_LIB_IGNORE)
  5193. !else
  5194. LINK_LIB_IGNORE_FLAG=/IGNORE:$(DEFAULT_LINK_LIB_IGNORE)
  5195. !endif
  5196.  
  5197. !IF $(IA64) || $(AMD64)
  5198. LINK_LIB_IGNORE_FLAG= $(LINK_LIB_IGNORE_FLAG),4108,4088,4218
  5199. !ENDIF
  5200.  
  5201. !if "$(TARGETTYPE)" == "DYNLINK" && defined(RESOURCE_ONLY_DLL)
  5202. # LNK6036, LNK1263, LNK1264 - Don't do LTCG or POGO on resource only dll.
  5203. FORCENATIVEOBJECT=1
  5204. !endif
  5205.  
  5206. !if defined(LINK_TIME_CODE_GENERATION) && !defined(FORCENATIVEOBJECT)
  5207. # 4218: non-native module found; restarting link with /LTCG
  5208. # 4235: /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
  5209. LINK_LIB_IGNORE_FLAG= $(LINK_LIB_IGNORE_FLAG),4218,4235
  5210. !endif
  5211.  
  5212. !ifdef _UMAPPL_LINK_LIB_IGNORE_DUPLICATE_DOWNLEVEL_LIBC_OBJ_SPECIFIED_MORE_THAN_ONCE
  5213. LINK_LIB_IGNORE_FLAG=$(LINK_LIB_IGNORE_FLAG),4042
  5214. !endif
  5215.  
  5216. !ifdef LINK_NO_RELEASE
  5217. LINK_RELEASE=
  5218. !else
  5219. LINK_RELEASE=/release
  5220. !endif
  5221.  
  5222. !ifdef LARGE_ADDRESS_AWARE
  5223. LINKER_FLAGS = $(LINKER_FLAGS) /LARGEADDRESSAWARE
  5224. !endif
  5225.  
  5226. !ifdef DISABLE_HEAP_TERMINATE
  5227. ! if ("$(SUBSYSTEM_VERSIONX)" < "6.00")
  5228. !error DISABLE_HEAP_TERMINATE only relevent for V6 or higher apps
  5229. ! else
  5230. LINKER_FLAGS = $(LINKER_FLAGS) $(BASE_LIB_PATH)\HeapTerminateDisableV6.obj
  5231. ! endif
  5232. !endif
  5233.  
  5234. !ifdef USE_INCREMENTAL_LINKING
  5235. LINK_INCREMENTAL_FLAG = /OPT:NOREF \
  5236.                         $(LINK_LIB_IGNORE_FLAG)
  5237. !else
  5238. LINK_INCREMENTAL_FLAG = $(LINK_REF_FLAG) \
  5239.                         $(LINK_LIB_IGNORE_FLAG) \
  5240.                         /INCREMENTAL:NO \
  5241.                         $(LINK_RELEASE)
  5242. !endif
  5243.  
  5244. LINKER_FLAGS =  $(LINKER_FLAGS) \
  5245.                 /MERGE:_PAGE=PAGE \
  5246.                 /MERGE:_TEXT=.text \
  5247.                 /SECTION:INIT,d \
  5248.                 $(LINK_INCREMENTAL_FLAG) \
  5249.                 /NODEFAULTLIB
  5250.  
  5251. LINKER_FLAGS=$(LINKER_FLAGS) $(LINKER_WX_SWITCH)
  5252.  
  5253. !ifdef LINK_DEBUG
  5254. !if "$(LINK_DEBUG)" == ""
  5255. LINK_DEBUG=/VERBOSE
  5256. !endif
  5257. LINKER_FLAGS=$(LINKER_FLAGS) $(LINK_DEBUG)
  5258. !endif
  5259.  
  5260.  
  5261. LINK_OS_VERSIONS = /version:$(LINKER_APP_VERSION) /osversion:$(LINKER_OS_VERSION)
  5262. LINKER_FLAGS = $(LINKER_FLAGS) $(LINKER_DBG_SECTION) $(LINK_OS_VERSIONS)
  5263. LIBRARIAN_FLAGS = $(LINK_LIB_IGNORE_FLAG) $(LIBRARIAN_FLAGS) $(LINKER_WX_SWITCH) /nodefaultlib
  5264. LIBRARIAN_FLAGS = $(LIBRARIAN_FLAGS) /machine:$(MACHINE_TYPE)
  5265.  
  5266. LINK_TIME_CODE_GENERATION_LIBRARIAN_FLAGS =
  5267. !if defined(LINK_TIME_CODE_GENERATION) && !defined(FORCENATIVEOBJECT)
  5268. LINK_TIME_CODE_GENERATION_LIBRARIAN_FLAGS = /ltcg
  5269. LIBRARIAN_FLAGS = $(LIBRARIAN_FLAGS) $(LINK_TIME_CODE_GENERATION_LIBRARIAN_FLAGS)
  5270. !endif
  5271.  
  5272. !ifdef DO_LANGUAGE_NEUTRAL
  5273. LANGUAGE_NEUTRAL_LINK_FLAG= /WX /noentry /NXCOMPAT /DYNAMICBASE /dll /nodefaultlib $(LINK_OS_VERSIONS) /machine:$(MACHINE_TYPE)
  5274. !    ifdef LARGE_ADDRESS_AWARE
  5275. LANGUAGE_NEUTRAL_LINK_FLAG = $(LANGUAGE_NEUTRAL_LINK_FLAG) /LARGEADDRESSAWARE
  5276. !    endif
  5277. !else
  5278. LANGUAGE_NEUTRAL_LINK_FLAG=
  5279. !endif
  5280.  
  5281. !ifndef LIB_NAME
  5282. LIB_NAME=$(LINK_NAME) /lib
  5283. !endif
  5284.  
  5285. LIBRARIAN=$(LIB_NAME) /out:$@ $(LIBRARIAN_FLAGS)
  5286.  
  5287. !ifndef LINK_NAME
  5288. ! ifdef SUBSTITUTE_LINK
  5289. LINK_NAME=$(SUBSTITUTE_LINK)
  5290. ! else
  5291. LINK_NAME=link.exe
  5292. ! endif
  5293. !endif
  5294.  
  5295. LINKER=$(LINK_NAME) /out:$@ /machine:$(MACHINE_TYPE)
  5296.  
  5297. #
  5298. # SXS_PDB_NAMER is a file built in the obj directory, containing a /pdb flag for LINKER
  5299. #     eg: /pdb:obj\i386\MicrosoftWindowsGdiPlus-1.0.3790.127-gdiplus.pdb
  5300. # The pdb file name is derived from ntverp.h, $O, $(SXS_PDB_WOW6432_W_PREFIX)
  5301. # $(SXS_ASSEMBLY_NAME) and $(TARGETNAME)
  5302. # SXS_PDB_NAMER is not always used, but is always built if SXS_MANIFEST_OBJ1 is built.
  5303. #
  5304. _LINKER=$(LINK_NAME) /out:$@ \
  5305. !ifdef SXS_PDB_NAMER
  5306.     @$(SXS_PDB_NAMER) \
  5307. !endif
  5308.     /machine:$(MACHINE_TYPE)
  5309.  
  5310. !if defined(NTPROFILEINPUT) && ("$(TARGETTYPE)" == "LIBRARY")
  5311. ! message NTPROFILEINPUT should be removed in: $(MAKEDIR).
  5312. !endif
  5313.  
  5314. !IF defined(NTPROFILEINPUT) || defined(EXEPROFILEINPUT)
  5315. ORDER=-order:@$(@B).prf
  5316. !ENDIF
  5317.  
  5318. !IFDEF DLLORDER
  5319. ORDER=-order:@$(DLLORDER)
  5320. !ENDIF
  5321.  
  5322. !if "$(SUBSYSTEM_NATVER)" < "5.02"
  5323. ! ifndef DRIVER_ALIGNMENT
  5324. DRIVER_ALIGNMENT=0x80
  5325. ! endif
  5326. ! ifndef HAL_ALIGNMENT
  5327. HAL_ALIGNMENT=0x80
  5328. ! endif
  5329. ! ifndef KERNEL_ALIGNMENT
  5330. KERNEL_ALIGNMENT=0x80
  5331. ! endif
  5332. !endif
  5333.  
  5334. !if $(AMD64)
  5335. !ifdef DRIVER_ALIGNMENT
  5336. DRIVER_ALIGN_SWITCH=/align:$(DRIVER_ALIGNMENT)
  5337. !endif
  5338. !ifdef HAL_ALIGNMENT
  5339. HAL_ALIGN_SWITCH=/align:$(HAL_ALIGNMENT)
  5340. !endif
  5341. !ifdef KERNEL_ALIGNMENT
  5342. KERNEL_ALIGN_SWITCH=/align:$(KERNEL_ALIGNMENT)
  5343. !endif
  5344. !else
  5345. !ifdef DRIVER_ALIGNMENT
  5346. DRIVER_ALIGN_SWITCH=/align:$(DRIVER_ALIGNMENT) /stub:$(SDK_LIB_DEST)\stub512.com
  5347. !endif
  5348. !ifdef HAL_ALIGNMENT
  5349. HAL_ALIGN_SWITCH=/align:$(HAL_ALIGNMENT) /stub:$(SDK_LIB_DEST)\stub512.com
  5350. !endif
  5351. !ifdef KERNEL_ALIGNMENT
  5352. KERNEL_ALIGN_SWITCH=/align:$(KERNEL_ALIGNMENT) /stub:$(SDK_LIB_DEST)\stub512.com
  5353. !endif
  5354. !endif
  5355.  
  5356. #
  5357. # [GorN] 3/30/2000
  5358. #
  5359. #    WPP section (WMI tracing preprocessor)
  5360. #
  5361. #    env. vars:
  5362. #
  5363. #    RUN_WPP=list of files to run wpp on
  5364. #    WPP_REVISION=override default revision
  5365. #
  5366.  
  5367.  
  5368. !ifndef WPP_REVISION
  5369. WPP_REVISION=rev1
  5370. !endif
  5371.  
  5372. !ifndef WPP_NAME
  5373. WPP_NAME=tracewpp
  5374. !endif
  5375.  
  5376. !if $(ANSI_ANNOTATION)
  5377. WPP_MAKEFILE_FLAGS=/DWPP_ANSI_ANNOTATION
  5378. !endif
  5379.  
  5380. !ifdef RUN_WPP
  5381. RUN_WPP=$(WPP_MAKEFILE_FLAGS) -cfgdir:$(WPP_CONFIG_PATH)\$(WPP_REVISION) -odir:$(OBJ_PATH)\$O $(RUN_WPP)
  5382.  
  5383.  
  5384. #  execute wpp now
  5385.  
  5386. !  if [-$(WPP_NAME) $(RUN_WPP)]
  5387. !  endif
  5388.  
  5389. !  if exist(obj\_tracewpp.mac)
  5390. !     include obj\_tracewpp.mac
  5391. WPP_TARGETS=$(WPP_EXTRA_TARGETS)
  5392. !  endif
  5393. BINPLACE_FLAGS = $(BINPLACE_FLAGS) /:TMF
  5394. C_DEFINES=$(C_DEFINES) /DRUN_WPP
  5395. !else
  5396. WPP_TARGETS=
  5397. !endif
  5398.  
  5399. !ifdef USE_LINT
  5400. LINT_DEFS=$(CDEFINES:-D=-d)
  5401. LINT_DEFINES=$(LINT_DEFS:/D=-d)
  5402. ! ifndef LINT_PATH
  5403. LINT_PATH=$(BASEDIR)\lint
  5404. ! endif
  5405. ! ifndef LINT_APP
  5406. LINT_APP=$(LINT_PATH)\lint-nt
  5407. ! endif
  5408. !ifndef LINT_OPTS
  5409. LINT_OPTS=+v -zero
  5410. !endif
  5411. ! if "$(LINT_TYPE)" == "all"
  5412. !  ifndef LINT_ALL_CMD
  5413. LINT_ALL_CMD=$(LINT_APP) $(LINT_OPTS) $(LINT_INCLUDES) $(LINT_DEFINES) $(LINT_FORCEDINCS) -i$(LINT_PATH)\ std.lnt -os($(OBJ_PATH)\$O\$(LINT_OUTPUT).$(LINT_EXT))
  5414. !  endif
  5415. ! else
  5416. !  if "$(LINT_TYPE)" == "lob"
  5417. !   ifndef LINT_CMD
  5418. LINT_CMD=$(LINT_APP) -u $(LINT_OPTS) $(LINT_INCLUDES) $(LINT_DEFINES) $(LINT_FORCEDINCS) -i$(LINT_PATH)\ std.lnt +os($(OBJ_PATH)\$O\$(LINT_OUTPUT).$(LINT_EXT)) -oo($@)
  5419. !   endif
  5420. !   ifndef LINT_CMD2
  5421. LINT_CMD2=$(LINT_APP) $(LINT_OPTS) -i$(LINT_PATH)\ std.lnt +os($(OBJ_PATH)\$O\$(LINT_OUTPUT).$(LINT_EXT)) $(OBJ_PATH)\$O\*.lob
  5422. !   endif
  5423. !  else
  5424. !   ifndef LINT_CMD
  5425. LINT_CMD=$(LINT_APP) $(LINT_OPTS) $(LINT_INCLUDES) $(LINT_DEFINES) $(LINT_FORCEDINCS) -i$(LINT_PATH)\ std.lnt +os($(OBJ_PATH)\$O\$(LINT_OUTPUT).$(LINT_EXT))
  5426. !   endif
  5427. !  endif
  5428. ! endif
  5429. !else
  5430. LINT_CMD2=
  5431. !endif
  5432.  
  5433. !ifndef LINT_CMD2
  5434. LINT_CMD2=
  5435. !endif
  5436.  
  5437. #
  5438. # Standard inference rules for C files that produce object files.
  5439. #
  5440.  
  5441. .SUFFIXES:
  5442. .SUFFIXES: .asm .asmx .c .class .cs .cpp .cxx .exe .f .java .obj .odl .p .rc .rcpp .res .resx .resz .resources .s .sdl .tdl .thk .txt .vb
  5443.  
  5444. #
  5445. # Processor specific control and options.
  5446. #
  5447.  
  5448. #
  5449. # cl.exe now defaults to /GS, so BO_FLAGS must explicitly default to /GS-
  5450. #
  5451. BO_FLAGS=/GS-
  5452.  
  5453. DRIVER_ENTRY=DriverEntry
  5454. GDI_DRIVER_ENTRY=DrvEnableDriver
  5455.  
  5456. !if defined(KMDF_VERSION_MAJOR)
  5457. BUFFER_OVERFLOW_CHECKS=1
  5458. !endif
  5459.  
  5460.  
  5461. !if ("$(TARGETPATH)" == "obj" \
  5462.     || "$(TARGETPATH)" == "$(_OBJ_DIR)" \
  5463.     || "$(TARGETPATH)" == "$(OBJ_PATH)\$(_OBJ_DIR)" \
  5464.     ) \
  5465.     && "$(TARGETTYPE)" != "LIBRARY" \
  5466.     && "$(TARGETTYPE)" != "NOTARGET" \
  5467.     && !defined(PASS1_PUBLISH) \
  5468.     && !defined(PRECOMPILED_OPTION) \
  5469.     && !defined(USE_PDB_TO_COMPILE) \
  5470.     && "$(POGO_INSTRUMENT)" != "1"
  5471. USE_PDB_TO_COMPILE=1
  5472. !endif
  5473.  
  5474. !if defined(USE_PDB_TO_COMPILE) && "$(USE_PDB_TO_COMPILE)" != "0" && "$(USE_PDB_TO_COMPILE)" != "1"
  5475. ! error USE_PDB_TO_COMPILE must be 0 or 1 or not defined.
  5476. !endif
  5477.  
  5478. !endif # PASS_INDEPENDENT_TARGETS
  5479.  
  5480. !include $(NTMAKEENV)\$(TARGET_DIRECTORY)mk.inc
  5481.  
  5482. !ifndef PASS_INDEPENDENT_TARGETS
  5483.  
  5484. #
  5485. # Make nmake output much more readable.
  5486. # Convert runs of spaces to a single space and then spaces to space-newline-space.
  5487. # Build.exe needs a space after a tool name in its filtering.
  5488. #
  5489.  
  5490. MANAGED_CODE_BUILD_CMD2=$(MANAGED_CODE_BUILD_CMD2:    = )
  5491. MANAGED_CODE_BUILD_CMD2=$(MANAGED_CODE_BUILD_CMD2:   = )
  5492. MANAGED_CODE_BUILD_CMD2=$(MANAGED_CODE_BUILD_CMD2:  = )
  5493. MANAGED_CODE_BUILD_CMD2=$(MANAGED_CODE_BUILD_CMD2: = ^
  5494.  )
  5495. ECHO_PRECOMPILED_MSG1=$(ECHO_PRECOMPILED_MSG1:    = )
  5496. ECHO_PRECOMPILED_MSG1=$(ECHO_PRECOMPILED_MSG1:   = )
  5497. ECHO_PRECOMPILED_MSG1=$(ECHO_PRECOMPILED_MSG1:  = )
  5498. ECHO_PRECOMPILED_MSG2=$(ECHO_PRECOMPILED_MSG2:    = )
  5499. ECHO_PRECOMPILED_MSG2=$(ECHO_PRECOMPILED_MSG2:   = )
  5500. ECHO_PRECOMPILED_MSG2=$(ECHO_PRECOMPILED_MSG2:  = )
  5501. ECHO_CXX_MSG=$(ECHO_CXX_MSG:    = )
  5502. ECHO_CXX_MSG=$(ECHO_CXX_MSG:   = )
  5503. ECHO_CXX_MSG=$(ECHO_CXX_MSG:  = )
  5504. ECHO_CXX_MSG=$(ECHO_CXX_MSG: = ^
  5505.  )
  5506. ECHO_MSG=$(ECHO_MSG:    = )
  5507. ECHO_MSG=$(ECHO_MSG:   = )
  5508. ECHO_MSG=$(ECHO_MSG:  = )
  5509. ECHO_MSG=$(ECHO_MSG: = ^
  5510.  )
  5511.  
  5512. #
  5513. # This is a little inelegant but it saves us from having to duplicate logic over and over in *mk.inc.
  5514. # The one downside is that the user cannot write a pure function named _DllMainCRTStartupForGS
  5515. # and use that as the entry point.
  5516. #
  5517. # One advantage is that, for example, we don't have to be embedded in all the UMTYPE checking.
  5518. # We handle all UMTYPEs.
  5519. #
  5520. # TBD -- unfactor *mk.inc into common code in makefile.def.
  5521. #
  5522. ! ifdef MANAGED_CXX
  5523.  
  5524. !  ifdef MCPP_TYPE
  5525. !    undef BO_LIB
  5526. !    if  "$(DLLENTRY)" == "-entry:_DllMainCRTStartupForGS" \
  5527.       || "$(DLLENTRY)" == "/entry:_DllMainCRTStartupForGS" \
  5528.       || "$(DLLENTRY)" == "-entry:_DllMainCRTStartupForGS@12" \
  5529.       || "$(DLLENTRY)" == "/entry:_DllMainCRTStartupForGS@12" \
  5530.       || "$(DLLENTRY)" == "/entry:_DllMainCRTStartup" \
  5531.       || "$(DLLENTRY)" == "-entry:_DllMainCRTStartup" \
  5532.       || "$(DLLENTRY)" == "/entry:_DllMainCRTStartup@12" \
  5533.       || "$(DLLENTRY)" == "-entry:_DllMainCRTStartup@12"
  5534. DLLENTRY=/noentry
  5535. !    endif
  5536. !  endif # MCPP_TYPE
  5537.  
  5538. !  if "$(URT_VER)" < "2.0"
  5539. #
  5540. # linker warning -- "DLL containing objects compiled with /clr is not linked with /NOENTRY; image may not run correctly"
  5541. #
  5542. !    if  "$(DLLENTRY)" == "-entry:_DllMainCRTStartupForGS@12" \
  5543.       || "$(DLLENTRY)" == "/entry:_DllMainCRTStartupForGS@12"
  5544. DLLENTRY=/noentry
  5545. !    else
  5546. #
  5547. # TBD -- is there a better fix? Investigate Server SP1.
  5548. #
  5549. LINKER_FLAGS=$(LINKER_FLAGS) /ignore:4243
  5550. !    endif
  5551. USER_C_FLAGS=$(USER_C_FLAGS) /d1PrivateNativeTypes
  5552. !  endif # 1.1
  5553. ! endif # MANAGED_CXX
  5554.  
  5555.  
  5556. # SUBSTITUTE_CS_COMPILER_NAME is currently used by OACR via razzle.cmd
  5557. CS_COMPILER_NAME=\
  5558. !ifdef SUBSTITUTE_CS_COMPILER_NAME
  5559. $(SUBSTITUTE_CS_COMPILER_NAME) \
  5560. !else
  5561. csc.exe \
  5562. !endif
  5563. /nologo /nostdlib /r:$(CLR_REF_PATH)\mscorlib.dll
  5564.  
  5565. # provide for future use of an alternate VB compiler location
  5566. VB_NET_COMPILER_NAME=\
  5567. !ifdef SUBSTITUTE_VB_COMPILER_NAME
  5568.     $(SUBSTITUTE_VB_COMPILER_NAME) \
  5569. !else
  5570.     vbc.exe \
  5571. !endif
  5572.     /nologo
  5573.  
  5574. # UNDONE -- need to see what mscorlib.dll vbc uses, probably the wrong one, and fix it
  5575.  
  5576. ! if "$(UNSAFE_CODE_SWITCH)" == ""
  5577. !  if defined(_VB)
  5578. UNSAFE_CODE_SWITCH=
  5579. !  else
  5580. !   if "$(UNSAFE_CODE)" == "1"
  5581. UNSAFE_CODE_SWITCH=/unsafe+
  5582. !   else
  5583. UNSAFE_CODE_SWITCH=/unsafe-
  5584. !   endif
  5585. !  endif
  5586. ! endif
  5587.  
  5588. MANAGED_STD_FLAGS        = $(MANAGED_DBG_FLAGS) /warnaserror+ $(UNSAFE_CODE_SWITCH)
  5589.  
  5590. ! if defined(_VB)
  5591. MANAGED_STD_FLAGS        = $(MANAGED_STD_FLAGS) $(USER_VB_NET_FLAGS)
  5592. ! else
  5593. MANAGED_STD_FLAGS        = $(MANAGED_STD_FLAGS) $(USER_CS_FLAGS)
  5594. ! endif
  5595.  
  5596. ! ifdef PERF_INSTRUMENTATION
  5597. MANAGED_STD_FLAGS=$(MANAGED_STD_FLAGS) /define:PROFILE
  5598. ! endif
  5599.  
  5600.  
  5601. ! ifndef LINKER_STACKSIZE
  5602. !  ifdef LINKER_STACKCOMMITSIZE
  5603. LINKER_STACKSIZE = /STACK:$(DEFAULT_STACKRESERVE),$(LINKER_STACKCOMMITSIZE)
  5604. !  else
  5605. LINKER_STACKSIZE = /STACK:$(DEFAULT_STACKRESERVE),$(DEFAULT_STACKCOMMIT)
  5606. !  endif
  5607. ! endif
  5608.  
  5609. ! if defined(KMDF_VERSION_MAJOR)
  5610. DRIVER_ENTRY=FxDriverEntry
  5611. ! endif
  5612.  
  5613.  
  5614. LINKER_STACKSIZE_DLL=/STACK:0x40000,0x1000
  5615.  
  5616.  
  5617. LIBRARY_OBJS=$(IMPLIB_OBJS) $(MFC_STATIC_LIB) \
  5618. !if $(USE_DLLDEF_OBJECTS)
  5619.     $(DLLDEF_OBJECTS) \
  5620. !else
  5621.     $(LINKLIBS) \
  5622. !endif
  5623.     $(OBJECTS)
  5624.  
  5625. ! if "$(TARGETTYPE)" != "DRIVER" && \
  5626.      "$(TARGETTYPE)" != "EXPORT_DRIVER" && \
  5627.      "$(TARGETTYPE)" != "MINIPORT" && \
  5628.      "$(TARGETTYPE)" != "GDI_DRIVER" && \
  5629.      !defined(NO_RDATA_MERGE)
  5630. LINKER_FLAGS = $(LINKER_FLAGS) /merge:.rdata=.text
  5631. ! endif
  5632.  
  5633. LINKER_FLAGS=$(LINKER_FLAGS) /pdbcompress
  5634.  
  5635. !if "$(DELAYLOAD)" != ""
  5636.  
  5637. #
  5638. # Temporary change to remap API sets that they can be delay loaded using a friendly name.
  5639. #
  5640.  
  5641. DELAYLOAD=$(DELAYLOAD:L=l)
  5642. DELAYLOAD=$(DELAYLOAD:S=s)
  5643. DELAYLOAD=$(DELAYLOAD:A=a)
  5644. DELAYLOAD=$(DELAYLOAD:O=o)
  5645. DELAYLOAD=$(DELAYLOAD:K=k)
  5646. DELAYLOAD=$(DELAYLOAD:U=u)
  5647. DELAYLOAD=$(DELAYLOAD:P=p)
  5648.  
  5649. DELAYLOAD=$(DELAYLOAD:D=d)
  5650. DELAYLOAD=$(DELAYLOAD:B=b)
  5651. DELAYLOAD=$(DELAYLOAD:E=e)
  5652.  
  5653. DELAYLOAD=$(DELAYLOAD:W=w)
  5654. DELAYLOAD=$(DELAYLOAD:I=i)
  5655. DELAYLOAD=$(DELAYLOAD:N=n)
  5656. DELAYLOAD=$(DELAYLOAD:V=v)
  5657. DELAYLOAD=$(DELAYLOAD:C=c)
  5658.  
  5659. DELAYLOAD=$(DELAYLOAD:G=g)
  5660. DELAYLOAD=$(DELAYLOAD:M=m)
  5661. DELAYLOAD=$(DELAYLOAD:R=r)
  5662. DELAYLOAD=$(DELAYLOAD:T=t)
  5663. DELAYLOAD=$(DELAYLOAD:Y=y)
  5664.  
  5665. !  if    ("$(DELAYLOAD:lsalookup=)" != "$(DELAYLOAD)") \
  5666.          || ("$(DELAYLOAD:sddlbase=)" != "$(DELAYLOAD)") \
  5667.          || ("$(DELAYLOAD:api-ms-win-service-winsvc=)" != "$(DELAYLOAD)") \
  5668.          || ("$(DELAYLOAD:api-ms-win-service-core=)" != "$(DELAYLOAD)") \
  5669.          || ("$(DELAYLOAD:api-ms-win-service-management=)" != "$(DELAYLOAD)") \
  5670.  
  5671. DELAYLOAD=$(DELAYLOAD:lsalookup=api-ms-win-security-lsalookup-l1-1-0)
  5672. DELAYLOAD=$(DELAYLOAD:sddlbase=api-ms-win-security-sddl-l1-1-0)
  5673. DELAYLOAD=$(DELAYLOAD:api-ms-win-service-core-l1.=api-ms-win-service-core-l1-1-0.)
  5674. DELAYLOAD=$(DELAYLOAD:api-ms-win-service-management-l1.=api-ms-win-service-management-l1-1-0.)
  5675. DELAYLOAD=$(DELAYLOAD:api-ms-win-service-management-l2.=api-ms-win-service-management-l2-1-0.)
  5676. DELAYLOAD=$(DELAYLOAD:api-ms-win-service-winsvc-l1.=api-ms-win-service-winsvc-l1-1-0.)
  5677.  
  5678. !  endif
  5679. !endif
  5680.  
  5681. !   if "$(DELAYLOAD)" != ""
  5682. !       if "$(DLOAD_ERROR_HANDLER)" != ""
  5683. !           if "$(DLOAD_ERROR_HANDLER)" == "kernelbase" || \
  5684.                "$(DLOAD_ERROR_HANDLER)" == "kernelbase.dll" || \
  5685.                "$(DLOAD_ERROR_HANDLER)" == "kernel32" || \
  5686.                "$(DLOAD_ERROR_HANDLER)" == "kernel32.dll" || \
  5687.                "$(DLOAD_ERROR_HANDLER)" == "kernel32pub"
  5688. CRTLIBS=$(CRTLIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\kernelbasedloadhandler.lib
  5689. !               if "$(DLOAD_ERROR_HANDLER)" == "kernelbase" || \
  5690.                    "$(DLOAD_ERROR_HANDLER)" == "kernelbase.dll"
  5691. TARGETLIBS = $(TARGETLIBS) $(MINWIN_PRIV_SDK_LIB_PATH)\api-ms-win-core-delayload-l1.lib
  5692. !               elseif "$(DLOAD_ERROR_HANDLER)" == "kernel32pub"
  5693. TARGETLIBS = $(TARGETLIBS) $(SDK_LIB_PATH)\kernel32.lib
  5694. !               else
  5695. TARGETLIBS = $(TARGETLIBS) $(SDK_LIB_PATH)\kernl32p.lib
  5696. !               endif
  5697. !               if "$(BUILD_MINWIN)" == "1"
  5698. _CHECK_DELAYLOAD_COMMAND=-check_delayload $@ minwin
  5699. !               else
  5700. _CHECK_DELAYLOAD_COMMAND=-check_delayload $@
  5701. !               endif
  5702. !           else
  5703. CRTLIBS=$(CRTLIBS) $(CRT_LIB_PATH)\delayimp.lib
  5704. !               if "$(DLOAD_FORCE_ERROR_CHECK)" != ""
  5705. _CHECK_DELAYLOAD_COMMAND=-check_delayload $@
  5706. !               endif
  5707. !           endif
  5708. !           if "$(_BUILDOPT)" == "no opt"
  5709. _CHECK_DELAYLOAD_COMMAND=@echo skipping check_delayload $(@F) due to no_opt.
  5710. !           endif
  5711. !       else
  5712. !           message BUILDMSG: Warning: DLOAD_ERROR_HANDLER not specified in $(MAKEDIR)
  5713. !       endif
  5714. DELAYLOAD = $(DELAYLOAD: =)
  5715. DELAYLOAD_FLAGS = /delayload:$(DELAYLOAD:;= /delayload:)
  5716. !       ifdef DELAYLOAD_UNLOAD_SUPPORT
  5717. DELAYLOAD_FLAGS = $(DELAYLOAD_FLAGS) /delay:unload
  5718. !       endif
  5719. LINKER_FLAGS = $(LINKER_FLAGS) $(DELAYLOAD_FLAGS)
  5720. !   endif
  5721.  
  5722. #
  5723. # Clear the suffixes list so we can ensure only pass zero stuff will be built
  5724. #
  5725. ! IFDEF PASS0ONLY
  5726. .SUFFIXES:
  5727. ! ENDIF
  5728.  
  5729.  
  5730. DRIVER_SWITCH = /driver
  5731.  
  5732. ! if "$(DRIVERTYPE)" == "wdm" || "$(DRIVERTYPE)" == "WDM"
  5733. DRIVER_SWITCH = $(DRIVER_SWITCH) /driver:wdm
  5734. ! else if "$(DRIVERTYPE)" == "VXD"
  5735. DRIVER_SWITCH = /vxd $(SDK_LIB_DEST)\i386\vxdwraps.clb
  5736. ! endif
  5737.  
  5738. ! ifdef BINARY_PUBLISH_DIR
  5739. !  ifndef BINARY_PUBLISH_FILES
  5740. !   error Must define BINARY_PUBLISH_FILES if defining BINARY_PUBLISH_DIR
  5741. !  endif
  5742. BINARY_PUBLISH_ROOT=$(BASEDIR)\$(_PROJECT_)\$(PROJECT_BINDROP_DIR)
  5743. BINARY_PUBLISH_ROOT=$(BINARY_PUBLISH_ROOT)\$(BINARY_PUBLISH_DIR)
  5744. BINARY_PUBLISH_ROOT=$(BINARY_PUBLISH_ROOT)\$(TARGET_DIRECTORY)\$(BUILD_TYPE)
  5745. ! endif
  5746.  
  5747. !endif # PASS_INDEPENDENT_TARGETS
  5748.  
  5749. !if defined(BINARY_PUBLISH) || defined(BINARY_PUBLISH_DIR) || !defined(_NTTREE)
  5750.  
  5751. #
  5752. # since we're generating binary drops of this source there's no need to
  5753. # binplace the files.  The files should be binplaced from the binary_release
  5754. # directory.
  5755. #
  5756.  
  5757. NO_BINPLACE=1
  5758.  
  5759. !endif
  5760.  
  5761. !ifdef NO_BINPLACE
  5762.  
  5763. BINPLACE_CMD=@echo Skip Binplace:
  5764. BINPLACE_TOOL=$(BINPLACE_CMD)
  5765. BINPLACE_FLAGS=
  5766.  
  5767. !else
  5768.  
  5769.  
  5770. ! ifndef BINPLACE_PLACEFILE
  5771. !  ifdef BINPLACE_GENERATE_PLACEFILE
  5772. BINPLACE_PLACEFILE = $(OBJ_PATH)\$O\placefil.txt
  5773. !  elseif "$(BUILD_PRODUCT)" == "IE"
  5774. BINPLACE_PLACEFILE = $(BINPLACE_PLACEFILE_DIR)\ieplace.txt
  5775. !  endif
  5776. ! endif
  5777.  
  5778. #
  5779. # Sidebyside binplacing can be made simpler.
  5780. # In particular, move the code into build.exe and have it output what is necessary to _objects.mac.
  5781. # Idtool.exe may also suffice.
  5782. # No generated placefile is necessary.
  5783. # When this was originally written, /:DEST was not known and modifying build.exe was avoided.
  5784. #
  5785. ! ifdef BINPLACE_GENERATE_PLACEFILE
  5786. MAKE_PLACEFILE_CMD=for %i in ($(SXS_MISCFILES) $(TARGET)) do echo %~nxi $(BINPLACE_DESTINATIONS) >> $(BINPLACE_PLACEFILE)
  5787. !  if defined(SXS_LOG_PASS) && defined(SXS_ASSEMBLY_NAME) && "$(TARGETTYPE)" != "NOTARGET"
  5788. MAKE_PLACEFILE_CMD=( $(MAKE_PLACEFILE_CMD) ) && ( for /f "delims=:" %i in ('echo $(BINPLACE_DESTINATIONS_NORETAIL)') do for %j in ($(TARGET))  do echo %i\%~nxj | $(APPEND_TOOL) -file $(BINPLACE_LOG)\..\symbolcd_cablists_asms_$(COMPUTERNAME).lst - )
  5789. !  endif
  5790. !  ifdef BINPLACE_ADDITIONAL_PLACEFILES
  5791. #
  5792. # BINPLACE_ADDITIONAL_PLACEFILES is a semicolon delimited list of additional placefiles.
  5793. # The last parameter is the output (which we also use as an input, so we repeat it).
  5794. #
  5795. MAKE_PLACEFILE_CMD=( $(MAKE_PLACEFILE_CMD) ) && ( merge_placefiles.exe $(BINPLACE_ADDITIONAL_PLACEFILES:;= ) $(BINPLACE_PLACEFILE) $(BINPLACE_PLACEFILE) )
  5796. !  endif
  5797. ! endif
  5798.  
  5799. BINPLACE_FLAGS = /:NOCV $(BINPLACE_FLAGS) $(SXS_BINPLACE_FLAGS)
  5800.  
  5801. !ifdef BINPLACE_PLACEFILE
  5802. BINPLACE_FLAGS = /P $(BINPLACE_PLACEFILE) $(BINPLACE_FLAGS)
  5803. !endif
  5804.  
  5805. !ifdef BUILD_NO_SYMCHK
  5806. # BUILD_NO_SYMCHK is the older version of BINPLACE_NO_SYMCHK.
  5807. # Do a mapping of the old to the new until all of the SOURCES
  5808. # files are converted.
  5809. BINPLACE_NO_SYMCHK=1
  5810. !endif
  5811.  
  5812. !ifndef BINPLACE_NO_SYMCHK
  5813. !  ifndef BINPLACE_ALLOW_DBG
  5814. BINPLACE_FLAGS = /:DBG $(BINPLACE_FLAGS)
  5815. !  endif
  5816. BINPLACE_FLAGS = /j $(BINPLACE_FLAGS)
  5817. !else
  5818. # BINPLACE_NO_SYMCHK implies BINPLACE_ALLOW_DBG. This shouldn't really
  5819. # be needed, but guard against future changes which may explicitly check
  5820. # for BINPLACE_ALLOW_DBG.
  5821. BINPLACE_ALLOW_DBG=1
  5822. !endif
  5823.  
  5824. # If NTDBGFILES is defined then use binplace to split the symbols.
  5825. # Define BINPLACE flags as needed if separate .DBG file requested.
  5826.  
  5827. ! IFDEF NTDBGFILES
  5828. !  ifdef NTDBGFILES_PRIVATE
  5829. BINPLACE_DBGFLAGS_NT = $(BINPLACE_DBGFLAGS_NT) /s $(_NTTREE)\Symbols.pri\$(ALT_PROJECT_TARGET)
  5830. !  endif
  5831. ! else
  5832. BINPLACE_DBGFLAGS_NT=
  5833. ! ENDIF
  5834.  
  5835. ! if "$(VERIFY_LC)" == "1"
  5836. !  ifndef LC_PATH
  5837. LC_PATH=.
  5838. !  endif
  5839. BINPLACE_LC_FLAGS = /G $(LC_PATH)\$(@F).lc
  5840. BINPLACE_LC_MISCFLAGS = /G $(LC_PATH)\$(**F).lc
  5841. ! else
  5842. BINPLACE_LC_FLAGS=
  5843. BINPLACE_LC_MISCFLAGS=
  5844. ! endif
  5845.  
  5846. BINPLACE_FLAGS=/R $(_NTTREE)\$(ALT_PROJECT_TARGET) $(BINPLACE_DBGFLAGS_NT) $(BINPLACE_FLAGS)
  5847.  
  5848. ! ifdef LANGUAGE_NEUTRAL_STS
  5849. !  if "$(LANGUAGE_NEUTRAL_STS)" == "LGNSTS_MUIOFF"
  5850. LANGUAGE_NEUTRAL_STATUS_CMD=\
  5851.             if not exist $@.mui ( \
  5852.                 if not exist $@.mui.notloc ( \
  5853.                    echo Build_Status  LN_MUI_STS: $(LANGUAGE_NEUTRAL_STS) $(@F) && \
  5854.                    echo Build_Status  MUI_COMMENT: $(MUI_COMMENT) $(@F) \
  5855.                 ) \
  5856.             )
  5857. !  else
  5858. LANGUAGE_NEUTRAL_STATUS_CMD=\
  5859.             if not exist $@.mui ( \
  5860.                 if not exist $@.mui.notloc ( \
  5861.                    echo Build_Status  LN_MUI_STS: $(LANGUAGE_NEUTRAL_STS) $(@F) \
  5862.                 ) \
  5863.             )
  5864. !  endif
  5865. ! else
  5866. LANGUAGE_NEUTRAL_STATUS_CMD=
  5867. ! endif
  5868.  
  5869. BINPLACE_TOOL=$(NOECHO)binplace
  5870.  
  5871. BINPLACE_CMD = $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_FLAGS) $@
  5872.  
  5873. ! if "$(LOCALIZE_BASE_FILE)" == "1" || "$(LOCALIZE_NO_MUI_MULTI)" == "1"
  5874. _BINPLACE_FLAGS_LOCALIZE = /R $(_NTTREE)\$(LOC_MULTI)
  5875. ! elseif "$(LOCALIZE_NO_MUI)" == "1"
  5876. _BINPLACE_FLAGS_LOCALIZE = /R $(_NTTREE)\$(LOC_BIN)
  5877. ! else
  5878. _BINPLACE_FLAGS_LOCALIZE =
  5879. ! endif
  5880.  
  5881. !if defined(_BINPLACE_LINK_RESULT)
  5882. _BINPLACE_TARGET_COMMAND = \
  5883.     $(BINPLACE_TOOL) \
  5884.         $(BINPLACE_FLAGS) \
  5885.         $(BINPLACE_TARGET_FLAGS) \
  5886.         $(BINPLACE_LC_FLAGS) \
  5887.         $(_BINPLACE_FLAGS_LOCALIZE) \
  5888.         $(_BINPLACE_LINK_RESULT) \
  5889. !endif
  5890.  
  5891. _BBT_BINPLACE_COMMAND = \
  5892.     $(BINPLACE_TOOL) \
  5893.         $(BINPLACE_FLAGS) \
  5894.         $(BINPLACE_TARGET_FLAGS) \
  5895.         $(BINPLACE_LC_FLAGS) \
  5896.         $(_BINPLACE_FLAGS_LOCALIZE) \
  5897.         $@ \
  5898.  
  5899. _BBINSTR_BINPLACE_COMMAND = \
  5900.     $(BINPLACE_TOOL) \
  5901.         $(BINPLACE_FLAGS) \
  5902.         $(BINPLACE_TARGET_FLAGS) \
  5903.         $(BINPLACE_LC_FLAGS) \
  5904.         $(_BINPLACE_FLAGS_LOCALIZE) \
  5905.         $(_BINPLACE_BBT_INSTR) \
  5906.  
  5907. _BINPLACE_COVERAGE_COMMAND = \
  5908.     $(BINPLACE_TOOL) \
  5909.         $(BINPLACE_FLAGS) \
  5910.         $(BINPLACE_TARGET_FLAGS) \
  5911.         $(BINPLACE_LC_FLAGS) \
  5912.         $(_BINPLACE_FLAGS_LOCALIZE) \
  5913.  
  5914. ! if "$(INSTRUMENT_FOR_COVERAGE)" == "1"
  5915.  
  5916. _COVERAGE_RESPONSE_FILE_CONTENTS=$(_COVERAGE_RESPONSE_FILE_CONTENTS)^
  5917. /BinplaceCommand $(_BINPLACE_COVERAGE_COMMAND)^
  5918. /BinplaceFlagsLocalize $(_BINPLACE_FLAGS_LOCALIZE)
  5919.  
  5920. ! endif
  5921.  
  5922. !endif # NO_BINPLACE
  5923.  
  5924. BINPLACE_CMD_NO_BBT=$(BINPLACE_CMD)
  5925. BINPLACE_CMD_NT=$(BINPLACE_CMD)
  5926.  
  5927.  
  5928. !if 1 # PASS_INDEPENDENT_TARGETS
  5929.  
  5930. !ifdef NTDUMPAMAP
  5931. MAPDUMP_CMD = link /dump /map $@ | sort /R /+62 > $(_NTDUMPAMAP)\$(@B).srt
  5932. !else
  5933. MAPDUMP_CMD =
  5934. !endif
  5935.  
  5936.  
  5937. # Define this macro so including make files can supply a yes prompt
  5938. # as appropriate.  Put the "yes." file in a visible place for OEM's
  5939. # so they can make too.
  5940.  
  5941. !IFNDEF NOPASS0
  5942.  
  5943. # Pass Zero Inference Rules: IDL files (MIDL) and MC files
  5944.  
  5945. .SUFFIXES: .h .idl .mc .odl .tdl .asn .thk .mof
  5946.  
  5947. PASS0_OBJECTS=
  5948. ! IF $(386)
  5949. PASS0_OBJECTS=$(PASS0_OBJECTS) $(PASS0_386_OBJECTS)
  5950. ! ENDIF
  5951. ! IF $(IA64)
  5952. PASS0_OBJECTS=$(PASS0_OBJECTS) $(PASS0_IA64_OBJECTS)
  5953. ! ENDIF
  5954. ! IF $(AMD64)
  5955. PASS0_OBJECTS=$(PASS0_OBJECTS) $(PASS0_AMD64_OBJECTS)
  5956. ! ENDIF
  5957. ! IF $(ARM)
  5958. PASS0_OBJECTS=$(PASS0_OBJECTS) $(PASS0_ARM_OBJECTS)
  5959. ! ENDIF
  5960. !ENDIF
  5961.  
  5962. !ifndef MIDL
  5963. MIDL = midl
  5964. !endif
  5965.  
  5966. MIDL = $(_CONCURRENT_MIDL_RUN) $(MIDL)
  5967.  
  5968. # Disable midl timestamps wherever possible
  5969. MIDL_FLAGS=$(MIDL_FLAGS) /no_stamp /nologo $(MIDL_WX_SWITCH)
  5970.  
  5971. !IFDEF USE_OLE_MC
  5972. MC = mc -o
  5973. !ELSE
  5974. MC = mc
  5975. !ENDIF
  5976.  
  5977. !IF "$(IDL_TYPE)" == "ole" || "$(IDL_TYPE)" == ""
  5978. IDL_TYPE=OLE
  5979. !ELSEIF "$(IDL_TYPE)" == "rpc"
  5980. IDL_TYPE=RPC
  5981. !ELSEIF "$(IDL_TYPE)" == "bem"
  5982. IDL_TYPE=BEM
  5983. !ENDIF
  5984.  
  5985. !IFNDEF PASS0_HEADERDIR
  5986. !  if $(USE_OBJECT_ROOT)
  5987. PASS0_HEADERDIR=$(OBJ_PATH)\$(O)
  5988. !  elseif "$(BUILD_PRODUCT)" == "NT"
  5989. PASS0_HEADERDIR=$(O)
  5990. !  else
  5991. PASS0_HEADERDIR=.
  5992. !  endif
  5993. !ENDIF
  5994.  
  5995. MIDL_TARGET_NT40  = NT40
  5996. MIDL_TARGET_WIN2K = NT50
  5997. MIDL_TARGET_WINXP = NT51
  5998. MIDL_TARGET_VISTA = NT60
  5999. MIDL_TARGET_WIN7  = NT61
  6000.  
  6001.  
  6002. !IFNDEF MIDL_TARGET
  6003.  
  6004. !    IF $(WIN32_WINNT_VERSION) == 0x0601
  6005. # Continue to default to Vista due to extra requirement to link to ole32.dll in Win7 stubs
  6006. MIDL_TARGET=$(MIDL_TARGET_VISTA)
  6007. !    ELSEIF $(WIN32_WINNT_VERSION) == 0x0600
  6008. MIDL_TARGET=$(MIDL_TARGET_VISTA)
  6009. !    ELSEIF $(WIN32_WINNT_VERSION) == 0x0502
  6010. MIDL_TARGET=$(MIDL_TARGET_WINXP)
  6011. !    ELSEIF $(WIN32_WINNT_VERSION) == 0x0501
  6012. MIDL_TARGET=$(MIDL_TARGET_WIN2K)
  6013. !    ELSEIF $(WIN32_WINNT_VERSION) == 0x0500
  6014. MIDL_TARGET=$(MIDL_TARGET_WIN2K)
  6015. !    ELSE
  6016. !        if !$(WIN64)
  6017. MIDL_NO_ROBUST=1
  6018. !        else
  6019. MIDL_TARGET=$(MIDL_TARGET_WIN2K)
  6020. !        endif
  6021. !    ENDIF
  6022.  
  6023. !ELSE
  6024.  
  6025. # Don't build MIDL stubs that are too new for the OS being targeted
  6026.  
  6027. !    IF "$(MIDL_TARGET)" == "$(MIDL_TARGET_WIN7)"
  6028.  
  6029. !        IF "$(SUBSYSTEM_WINVER)" < "$(SUBSYSTEM_601)"
  6030. !        ERROR MIDL_TARGET=$(MIDL_TARGET) mismatch with SUBSYSTEM_VERSION=$(SUBSYSTEM_WINVER). MIDL_TARGET must not be newer.
  6031. !        ENDIF
  6032.  
  6033. !    ELSEIF "$(MIDL_TARGET)" == "$(MIDL_TARGET_VISTA)"
  6034.  
  6035. !        IF "$(SUBSYSTEM_WINVER)" < "$(SUBSYSTEM_600)"
  6036. !        ERROR MIDL_TARGET=$(MIDL_TARGET) mismatch with SUBSYSTEM_VERSION=$(SUBSYSTEM_WINVER). MIDL_TARGET must not be newer.
  6037. !        ENDIF
  6038.  
  6039. !    ELSEIF "$(MIDL_TARGET)" == "$(MIDL_TARGET_WINXP)"
  6040.  
  6041. !        IF "$(SUBSYSTEM_WINVER)" < "$(SUBSYSTEM_501)"
  6042. !        ERROR MIDL_TARGET=$(MIDL_TARGET) mismatch with SUBSYSTEM_VERSION=$(SUBSYSTEM_WINVER). MIDL_TARGET must not be newer.
  6043. !        ENDIF
  6044.  
  6045. !    ELSEIF "$(MIDL_TARGET)" == "$(MIDL_TARGET_WIN2K)"
  6046.  
  6047. !        IF "$(SUBSYSTEM_WINVER)" < "$(SUBSYSTEM_500)"
  6048. !        ERROR MIDL_TARGET=$(MIDL_TARGET) mismatch with SUBSYSTEM_VERSION=$(SUBSYSTEM_WINVER). MIDL_TARGET must not be newer.
  6049. !        ENDIF
  6050.  
  6051. # else MIDL_TARGET is set old enough it'll run on anything.
  6052.  
  6053. !    ENDIF
  6054.  
  6055. !ENDIF
  6056.  
  6057. !IF defined(MIDL_NO_ROBUST)
  6058. !if !$(WIN64) || ("$(MIDL_PROTOCOL)" == "dce" && defined(RPC_TEST_OS64))
  6059. !undef MIDL_TARGET
  6060. !else
  6061. MIDL_TARGET=NT50
  6062. !undef MIDL_NO_ROBUST
  6063. !endif
  6064. !ENDIF
  6065.  
  6066. !IF "$(IDL_TYPE)" == "BEM"
  6067. !undef MIDL_TARGET
  6068. !IFDEF MIDL_EXPORT
  6069. !ERROR Export Files not supported for BEM interfaces.
  6070. !ENDIF
  6071. !ENDIF
  6072.  
  6073.  
  6074. MIDL_OPTIMIZATION=$(MIDL_OPTIMIZATION) -sal $(MIDL_PLATFORM_FLAG)
  6075.  
  6076. !IFDEF MIDL_TARGET
  6077. MIDL_OPTIMIZATION=$(MIDL_OPTIMIZATION) -target $(MIDL_TARGET)
  6078. !ENDIF
  6079.  
  6080. !IFDEF MIDL_PROTOCOL
  6081. MIDL_OPTIMIZATION=$(MIDL_OPTIMIZATION) -protocol $(MIDL_PROTOCOL)
  6082. !ENDIF
  6083.  
  6084. !IFDEF MIDL_NO_ROBUST
  6085. MIDL_OPTIMIZATION=$(MIDL_OPTIMIZATION) -no_robust
  6086. !ENDIF
  6087.  
  6088. !IFDEF MIDL_EXPORT
  6089. !IF !defined(MIDL_EXPORTDIR)
  6090. MIDL_EXPORTDIR=$(PASS0_HEADERDIR)
  6091. !ENDIF
  6092. MIDL_OPTIMIZATION=$(MIDL_OPTIMIZATION) -export -export_file $(MIDL_EXPORTDIR)\$(<F:.idl=_export.mef)
  6093. !ENDIF
  6094.  
  6095.  
  6096. #
  6097. # Default MIDL_TLBDIR, and don't need to check if it exists in the default case.
  6098. #
  6099. ! if !defined(MIDL_TLBDIR) && $(USE_OBJECT_ROOT)
  6100.  
  6101. MIDL_TLBDIR=$(OBJ_PATH)\$(O)
  6102. !if !defined(MIDL_TLBNAME)
  6103. MIDL_TLBNAME=$(<B)
  6104. !endif
  6105. MIDL_TLBSWITCH=/tlb $(OBJ_PATH)\$(O)\$(MIDL_TLBNAME).tlb
  6106.  
  6107. ! else
  6108.  
  6109. !  ifdef MIDL_TLBDIR
  6110. !   if !exist($(MIDL_TLBDIR))
  6111. !    if [mkdir $(MIDL_TLBDIR)]
  6112. !    endif
  6113. !   endif
  6114. MIDL_TLBSWITCH=/tlb $(MIDL_TLBDIR)\$(<F:.idl=.tlb)
  6115. !  else
  6116. MIDL_TLBSWITCH=
  6117. !  endif
  6118. ! endif
  6119.  
  6120. !ifndef PACKING
  6121. PACKING= /Zp8
  6122. !endif
  6123.  
  6124. !IF "$(IDL_TYPE)" == "OLE"
  6125.  
  6126. #! IF DEFINED(PASS0_CLIENTDIR) || DEFINED(PASS0_SERVERDIR)
  6127. #!  ERROR PASS0_CLIENTDIR and PASS0_SERVERDIR can only be used with IDL_TYPE=RPC!
  6128. #! ENDIF
  6129.  
  6130. ! IFNDEF PASS0_SOURCEDIR
  6131. !  if $(USE_OBJECT_ROOT)
  6132. PASS0_SOURCEDIR=$(OBJ_PATH)\$(O)
  6133. !  elseif "$(BUILD_PRODUCT)" == "NT"
  6134. PASS0_SOURCEDIR=$(O)
  6135. !  else
  6136. PASS0_SOURCEDIR=.
  6137. !  endif
  6138. ! ENDIF
  6139.  
  6140. ! IFNDEF MIDL_UUIDDIR
  6141. MIDL_UUIDDIR=$(PASS0_SOURCEDIR)
  6142. ! ENDIF
  6143.  
  6144. ! ifndef PASS0_UUIDDIR
  6145. PASS0_UUIDDIR=$(MIDL_UUIDDIR)
  6146. ! endif
  6147.  
  6148. !ifdef USE_IDLBASED_DLLDATA
  6149. DLLDATA_NAME=$(<F:.idl=_dlldata.c)
  6150. !else
  6151. DLLDATA_NAME=dlldata.c
  6152. !endif
  6153.  
  6154. ! IFNDEF NO_PASS0_RULES
  6155.  
  6156. !if !exist($(PASS0_SOURCEDIR))
  6157. !if [mkdir $(PASS0_SOURCEDIR)]
  6158. !endif
  6159. !endif
  6160.  
  6161. !if !exist($(MIDL_UUIDDIR))
  6162. !if [mkdir $(MIDL_UUIDDIR)]
  6163. !endif
  6164. !endif
  6165.  
  6166. .idl{$(PASS0_HEADERDIR)}.h:
  6167.     $(MIDL) \
  6168.     $(PACKING) \
  6169.     $(INCPATH0) \
  6170.     /char unsigned \
  6171.     /ms_ext \
  6172.     /c_ext \
  6173.     /proxy $(PASS0_SOURCEDIR)\$(<F:.idl=_p.c) \
  6174.     /dlldata $(PASS0_SOURCEDIR)\$(DLLDATA_NAME) \
  6175.     /iid $(MIDL_UUIDDIR)\$(<F:.idl=_i.c) \
  6176.     $(MIDL_TLBSWITCH) \
  6177.     /header $@ \
  6178.     /cpp_cmd $(MIDL_CPP) \
  6179.     $(C_DEFINES) \
  6180.     $(MIDL_FLAGS) \
  6181.     $(MIDL_OPTIMIZATION) \
  6182.     $<
  6183.  
  6184. {..}.idl{$(PASS0_HEADERDIR)}.h:
  6185.     $(MIDL) \
  6186.     $(PACKING) \
  6187.     $(INCPATH0) \
  6188.     /char unsigned \
  6189.     /ms_ext \
  6190.     /c_ext \
  6191.     /proxy $(PASS0_SOURCEDIR)\$(<F:.idl=_p.c) \
  6192.     /dlldata $(PASS0_SOURCEDIR)\$(DLLDATA_NAME) \
  6193.     /iid $(MIDL_UUIDDIR)\$(<F:.idl=_i.c) \
  6194.     $(MIDL_TLBSWITCH) \
  6195.     /header $@ \
  6196.     /cpp_cmd $(MIDL_CPP) \
  6197.     $(C_DEFINES) \
  6198.     $(MIDL_FLAGS) \
  6199.     $(MIDL_OPTIMIZATION) \
  6200.     $<
  6201.  
  6202. {$O}.idl{$(PASS0_HEADERDIR)}.h:
  6203.     $(MIDL) \
  6204.     $(PACKING) \
  6205.     $(INCPATH0) \
  6206.     /char unsigned \
  6207.     /ms_ext \
  6208.     /c_ext \
  6209.     /proxy $(PASS0_SOURCEDIR)\$(<F:.idl=_p.c) \
  6210.     /dlldata $(PASS0_SOURCEDIR)\$(DLLDATA_NAME) \
  6211.     /iid $(MIDL_UUIDDIR)\$(<F:.idl=_i.c) \
  6212.     $(MIDL_TLBSWITCH) \
  6213.     /header $@ \
  6214.     /cpp_cmd $(MIDL_CPP) \
  6215.     $(C_DEFINES) \
  6216.     $(MIDL_FLAGS) \
  6217.     $(MIDL_OPTIMIZATION) \
  6218.     $<
  6219.  
  6220. {$(OBJ_PATH)\$O}.idl{$(PASS0_HEADERDIR)}.h:
  6221.     $(MIDL) \
  6222.     $(PACKING) \
  6223.     $(INCPATH0) \
  6224.     /char unsigned \
  6225.     /ms_ext \
  6226.     /c_ext \
  6227.     /proxy $(PASS0_SOURCEDIR)\$(<F:.idl=_p.c) \
  6228.     /dlldata $(PASS0_SOURCEDIR)\$(DLLDATA_NAME) \
  6229.     /iid $(MIDL_UUIDDIR)\$(<F:.idl=_i.c) \
  6230.     $(MIDL_TLBSWITCH) \
  6231.     /header $@ \
  6232.     /cpp_cmd $(MIDL_CPP) \
  6233.     $(C_DEFINES) \
  6234.     $(MIDL_FLAGS) \
  6235.     $(MIDL_OPTIMIZATION) \
  6236.     $<
  6237.  
  6238. ! ENDIF
  6239.  
  6240. !ELSEIF "$(IDL_TYPE)" == "RPC"
  6241.  
  6242. ! IFNDEF PASS0_CLIENTDIR
  6243. !  if $(USE_OBJECT_ROOT)
  6244. PASS0_CLIENTDIR=$(OBJ_PATH)\$(O)
  6245. !  elseif "$(BUILD_PRODUCT)" == "NT"
  6246. PASS0_CLIENTDIR=$(O)
  6247. !  else
  6248. PASS0_CLIENTDIR=$(TARGETPATH)
  6249. !  endif
  6250. ! ENDIF
  6251.  
  6252. ! IFNDEF PASS0_SERVERDIR
  6253. !  if $(USE_OBJECT_ROOT)
  6254. PASS0_SERVERDIR=$(OBJ_PATH)\$(O)
  6255. !  elseif "$(BUILD_PRODUCT)" == "NT"
  6256. PASS0_SERVERDIR=$(O)
  6257. !  else
  6258. PASS0_SERVERDIR=$(PASS0_CLIENTDIR)
  6259. !  endif
  6260. ! ENDIF
  6261.  
  6262. ! IFNDEF NO_PASS0_RULES
  6263.  
  6264. !if !exist($(PASS0_CLIENTDIR))
  6265. !if [mkdir $(PASS0_CLIENTDIR)]
  6266. !endif
  6267. !endif
  6268. !if !exist($(PASS0_SERVERDIR))
  6269. !if [mkdir $(PASS0_SERVERDIR)]
  6270. !endif
  6271. !endif
  6272.  
  6273. .idl{$(PASS0_HEADERDIR)}.h:
  6274.     $(MIDL) \
  6275.     $(PACKING) \
  6276.     $(INCPATH0) \
  6277.     /char unsigned \
  6278.     /ms_ext \
  6279.     /c_ext \
  6280.     /cstub $(PASS0_CLIENTDIR)\$(<F:.idl=_c.c) \
  6281.     /sstub $(PASS0_SERVERDIR)\$(<F:.idl=_s.c) \
  6282.     $(MIDL_TLBSWITCH) \
  6283.     /header $@ \
  6284.     /cpp_cmd $(MIDL_CPP) \
  6285.     $(C_DEFINES) \
  6286.     $(MIDL_FLAGS) \
  6287.     $(MIDL_OPTIMIZATION) \
  6288.     $<
  6289.  
  6290. {..}.idl{$(PASS0_HEADERDIR)}.h:
  6291.     $(MIDL) \
  6292.     $(PACKING) \
  6293.     $(INCPATH0) \
  6294.     /char unsigned \
  6295.     /ms_ext \
  6296.     /c_ext \
  6297.     /cstub $(PASS0_CLIENTDIR)\$(<F:.idl=_c.c) \
  6298.     /sstub $(PASS0_SERVERDIR)\$(<F:.idl=_s.c) \
  6299.     $(MIDL_TLBSWITCH) \
  6300.     /header $@ \
  6301.     /cpp_cmd $(MIDL_CPP) \
  6302.     $(C_DEFINES) \
  6303.     $(MIDL_FLAGS) \
  6304.     $(MIDL_OPTIMIZATION) \
  6305.     $<
  6306.  
  6307. {$O}.idl{$(PASS0_HEADERDIR)}.h:
  6308.     $(MIDL) \
  6309.     $(PACKING) \
  6310.     $(INCPATH0) \
  6311.     /char unsigned \
  6312.     /ms_ext \
  6313.     /c_ext \
  6314.     /cstub $(PASS0_CLIENTDIR)\$(<F:.idl=_c.c) \
  6315.     /sstub $(PASS0_SERVERDIR)\$(<F:.idl=_s.c) \
  6316.     $(MIDL_TLBSWITCH) \
  6317.     /header $@ \
  6318.     /cpp_cmd $(MIDL_CPP) \
  6319.     $(C_DEFINES) \
  6320.     $(MIDL_FLAGS) \
  6321.     $(MIDL_OPTIMIZATION) \
  6322.     $<
  6323.  
  6324. {$(OBJ_PATH)\$O}.idl{$(PASS0_HEADERDIR)}.h:
  6325.     $(MIDL) \
  6326.     $(PACKING) \
  6327.     $(INCPATH0) \
  6328.     /char unsigned \
  6329.     /ms_ext \
  6330.     /c_ext \
  6331.     /cstub $(PASS0_CLIENTDIR)\$(<F:.idl=_c.c) \
  6332.     /sstub $(PASS0_SERVERDIR)\$(<F:.idl=_s.c) \
  6333.     $(MIDL_TLBSWITCH) \
  6334.     /header $@ \
  6335.     /cpp_cmd $(MIDL_CPP) \
  6336.     $(C_DEFINES) \
  6337.     $(MIDL_FLAGS) \
  6338.     $(MIDL_OPTIMIZATION) \
  6339.     $<
  6340.  
  6341. ! ENDIF
  6342.  
  6343. !ELSEIF "$(IDL_TYPE)" == "BEM"
  6344.  
  6345. ! IFNDEF PASS0_CLIENTDIR
  6346. !  if $(USE_OBJECT_ROOT)
  6347. PASS0_CLIENTDIR=$(OBJ_PATH)\$(O)
  6348. !  elseif "$(BUILD_PRODUCT)" == "NT"
  6349. PASS0_CLIENTDIR=$(O)
  6350. !  else
  6351. PASS0_CLIENTDIR=$(TARGETPATH)
  6352. !  endif
  6353. ! ENDIF
  6354.  
  6355. ! IFNDEF PASS0_SERVERDIR
  6356. !  if $(USE_OBJECT_ROOT)
  6357. PASS0_SERVERDIR=$(OBJ_PATH)\$(O)
  6358. !  elseif "$(BUILD_PRODUCT)" == "NT"
  6359. PASS0_SERVERDIR=$(O)
  6360. !  else
  6361. PASS0_SERVERDIR=$(PASS0_CLIENTDIR)
  6362. !  endif
  6363. ! ENDIF
  6364.  
  6365. ! IFNDEF MIDL_UUIDDIR
  6366. MIDL_UUIDDIR=$(PASS0_HEADERDIR)
  6367. ! ENDIF
  6368.  
  6369. ! ifndef PASS0_UUIDDIR
  6370. PASS0_UUIDDIR=$(MIDL_UUIDDIR)
  6371. ! endif
  6372.  
  6373. !ifdef USE_IDLBASED_CONTRACTDATA
  6374. CONTRACTDATA_NAME=$(<F:.idl=_contractdata.c)
  6375. !else
  6376. CONTRACTDATA_NAME=contractdata.c
  6377. !endif
  6378.  
  6379. ! IFNDEF NO_PASS0_RULES
  6380.  
  6381. !if !exist($(PASS0_CLIENTDIR))
  6382. !if [mkdir $(PASS0_CLIENTDIR)]
  6383. !endif
  6384. !endif
  6385. !if !exist($(PASS0_SERVERDIR))
  6386. !if [mkdir $(PASS0_SERVERDIR)]
  6387. !endif
  6388. !endif
  6389. !if !exist($(PASS0_UUIDDIR))
  6390. !if [mkdir $(PASS0_UUIDDIR)]
  6391. !endif
  6392. !endif
  6393.  
  6394.  
  6395. .idl{$(PASS0_HEADERDIR)}.h:
  6396.     $(MIDL) \
  6397.     $(PACKING) \
  6398.     $(INCPATH0) \
  6399.     /char unsigned \
  6400.     /ms_ext \
  6401.     /c_ext \
  6402.     /emhostfile $(PASS0_CLIENTDIR)\$(<F:.idl=_host.cpp) \
  6403.     /emextfile $(PASS0_SERVERDIR)\$(<F:.idl=_ext.cpp) \
  6404.     /contractdata $(PASS0_SERVERDIR)\$(CONTRACTDATA_NAME) \
  6405.     /iid $(PASS0_UUIDDIR)\$(<F:.idl=_i.c) \
  6406.     /minWin \
  6407.     /header $@ \
  6408.     /cpp_cmd $(MIDL_CPP) \
  6409.     $(C_DEFINES) \
  6410.     $(MIDL_FLAGS) \
  6411.     $(MIDL_OPTIMIZATION) \
  6412.     $<
  6413.  
  6414. {..}.idl{$(PASS0_HEADERDIR)}.h:
  6415.     $(MIDL) \
  6416.     $(PACKING) \
  6417.     $(INCPATH0) \
  6418.     /char unsigned \
  6419.     /ms_ext \
  6420.     /c_ext \
  6421.     /emhostfile $(PASS0_CLIENTDIR)\$(<F:.idl=_host.cpp) \
  6422.     /emextfile $(PASS0_SERVERDIR)\$(<F:.idl=_ext.cpp) \
  6423.     /contractdata $(PASS0_SERVERDIR)\$(CONTRACTDATA_NAME) \
  6424.     /iid $(PASS0_UUIDDIR)\$(<F:.idl=_i.c) \
  6425.     /minWin \
  6426.     /header $@ \
  6427.     /cpp_cmd $(MIDL_CPP) \
  6428.     $(C_DEFINES) \
  6429.     $(MIDL_FLAGS) \
  6430.     $(MIDL_OPTIMIZATION) \
  6431.     $<
  6432.  
  6433. {$O}.idl{$(PASS0_HEADERDIR)}.h:
  6434.     $(MIDL) \
  6435.     $(PACKING) \
  6436.     $(INCPATH0) \
  6437.     /char unsigned \
  6438.     /ms_ext \
  6439.     /c_ext \
  6440.     /emhostfile $(PASS0_CLIENTDIR)\$(<F:.idl=_host.cpp) \
  6441.     /emextfile $(PASS0_SERVERDIR)\$(<F:.idl=_ext.cpp) \
  6442.     /contractdata $(PASS0_SERVERDIR)\$(CONTRACTDATA_NAME) \
  6443.     /iid $(PASS0_UUIDDIR)\$(<F:.idl=_i.c) \
  6444.     /minWin \
  6445.     /header $@ \
  6446.     /cpp_cmd $(MIDL_CPP) \
  6447.     $(C_DEFINES) \
  6448.     $(MIDL_FLAGS) \
  6449.     $(MIDL_OPTIMIZATION) \
  6450.     $<
  6451.  
  6452. {$(OBJ_PATH)\$O}.idl{$(PASS0_HEADERDIR)}.h:
  6453.     $(MIDL) \
  6454.     $(PACKING) \
  6455.     $(INCPATH0) \
  6456.     /char unsigned \
  6457.     /ms_ext \
  6458.     /c_ext \
  6459.     /emhostfile $(PASS0_CLIENTDIR)\$(<F:.idl=_host.cpp) \
  6460.     /emextfile $(PASS0_SERVERDIR)\$(<F:.idl=_ext.cpp) \
  6461.     /contractdata $(PASS0_SERVERDIR)\$(CONTRACTDATA_NAME) \
  6462.     /iid $(PASS0_UUIDDIR)\$(<F:.idl=_i.c) \
  6463.     /minWin \
  6464.     /header $@ \
  6465.     /cpp_cmd $(MIDL_CPP) \
  6466.     $(C_DEFINES) \
  6467.     $(MIDL_FLAGS) \
  6468.     $(MIDL_OPTIMIZATION) \
  6469.     $<
  6470.  
  6471. ! ENDIF
  6472.  
  6473. !ELSE
  6474.  
  6475. ! ERROR Invalid IDL_TYPE value. Supported values: OLE, BEM, and RPC.
  6476.  
  6477. !ENDIF  # IDL_TYPE
  6478.  
  6479. CPPXX = $(C_PREPROCESSOR_FLAGS:/Tc=)
  6480. CPPXX = $(CPPXX:-Tc=)
  6481.  
  6482. !IFNDEF NO_PASS0_RULES
  6483.  
  6484. ! IFNDEF MC_SOURCEDIR
  6485. ! IFDEF PASS0_SOURCEDIR
  6486. MC_SOURCEDIR=$(PASS0_SOURCEDIR)
  6487. ! ELSE
  6488. MC_SOURCEDIR=$(PASS0_CLIENTDIR)
  6489. ! ENDIF
  6490. ! ENDIF
  6491.  
  6492. !if defined(MC_WINMETAPATH)
  6493. !  error You may not define MC_WINMETAPATH.
  6494. !endif
  6495.  
  6496. MC_WINMETAPATH=$(SDK_INC_PATH)\winmeta.xml
  6497.  
  6498. !if defined(MC_EVENTMANPATH)
  6499. !  error You may not define MC_EVENTMANPATH.
  6500. !endif
  6501.  
  6502. MC_EVENTMANPATH=$(SDK_INC_PATH)\eventman.xsd
  6503.  
  6504. .mc{$(PASS0_HEADERDIR)}.h:
  6505.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6506.     if not exist $@ echo error : $@ not produced
  6507.  
  6508. .mc{$(MC_SOURCEDIR)}.rc:
  6509.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6510.     if not exist $@ echo error : $@ not produced
  6511.  
  6512. {..}.mc{$(PASS0_HEADERDIR)}.h:
  6513.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6514.     if not exist $@ echo error : $@ not produced
  6515.  
  6516. {..}.mc{$(MC_SOURCEDIR)}.rc:
  6517.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6518.     if not exist $@ echo error : $@ not produced
  6519.  
  6520. {$O}.mc{$(PASS0_HEADERDIR)}.h:
  6521.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6522.     if not exist $@ echo error : $@ not produced
  6523.  
  6524. {$O}.mc{$(MC_SOURCEDIR)}.rc:
  6525.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6526.     if not exist $@ echo error : $@ not produced
  6527.  
  6528. {$(OBJ_PATH)\$O}.mc{$(PASS0_HEADERDIR)}.h:
  6529.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6530.     if not exist $@ echo error : $@ not produced
  6531.  
  6532. {$(OBJ_PATH)\$O}.mc{$(MC_SOURCEDIR)}.rc:
  6533.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6534.     if not exist $@ echo error : $@ not produced
  6535.  
  6536. !if "$(MC_SOURCEDIR)" != "$(OBJ_PATH)\$O"
  6537.  
  6538. {$(OBJ_PATH)\$O}.mc{$(OBJ_PATH)\$O}.h:
  6539.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6540.     if not exist $@ echo error : $@ not produced
  6541.  
  6542. {$(OBJ_PATH)\$O}.mc{$(OBJ_PATH)\$O}.rc:
  6543.     $(MC) /h $(PASS0_HEADERDIR) /r $(MC_SOURCEDIR) $(MC_FLAGS) $<
  6544.     if not exist $@ echo error : $@ not produced
  6545.  
  6546. !endif
  6547.  
  6548. #
  6549. # ManagedObjectFormat files
  6550. #   First preprocess MOF via the C pre processor
  6551. #   Next separate MOF into MOF and MFL, then concatenate them and
  6552. #   finally compile into binary form
  6553. #
  6554.  
  6555. !if "$O" != "."
  6556.  
  6557. {..\}.mof{$O}.mof:
  6558.     @$(_TYPE) <<$(ECHO_RSP)
  6559. $(ECHO_MSG) /EP $<
  6560. <<$(BUILD_NOKEEP)
  6561.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  6562. $(CPPXX: =
  6563. )
  6564. <<$(BUILD_NOKEEP)
  6565.  
  6566. !endif
  6567.  
  6568. {}.mof{$O}.mof:
  6569.     @$(_TYPE) <<$(ECHO_RSP)
  6570. $(ECHO_MSG) /EP $<
  6571. <<$(BUILD_NOKEEP)
  6572.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  6573. $(CPPXX: =
  6574. )
  6575. <<$(BUILD_NOKEEP)
  6576.  
  6577. {$O}.mof{$O}.bmf:
  6578. !ifdef MOFCOMP_NO_DEFAULT_NAMESPACE
  6579.     mofcomp -Amendment:ms_409 -MFL:$O\MFL.MFL -MOF:$O\MOF.MOF $<
  6580. !else
  6581.     mofcomp -N:root\wmi -Amendment:ms_409 -MFL:$O\MFL.MFL -MOF:$O\MOF.MOF $<
  6582. !endif
  6583.     wmimofck -y$O\MOF.MOF -z$O\MFL.MFL $O\MOFMFL.MOF
  6584.     mofcomp -WMI -B:$@ $O\MOFMFL.MOF
  6585.  
  6586. {..}.mof{$(OBJ_PATH)\$O}.mof:
  6587.     @$(_TYPE) <<$(ECHO_RSP)
  6588. $(ECHO_MSG) /EP $<
  6589. <<$(BUILD_NOKEEP)
  6590.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  6591. $(CPPXX: =
  6592. )
  6593. <<$(BUILD_NOKEEP)
  6594.  
  6595. {}.mof{$(OBJ_PATH)\$O}.mof:
  6596.     @$(_TYPE) <<$(ECHO_RSP)
  6597. $(ECHO_MSG) /EP $<
  6598. <<$(BUILD_NOKEEP)
  6599.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  6600. $(CPPXX: =
  6601. )
  6602. <<$(BUILD_NOKEEP)
  6603.  
  6604. {$(OBJ_PATH)\$O}.mof{$(OBJ_PATH)\$O}.bmf:
  6605.     cd $(OBJ_PATH)
  6606. !ifdef MOFCOMP_NO_DEFAULT_NAMESPACE
  6607.     mofcomp -Amendment:ms_409 -MFL:$O\MFL.MFL -MOF:$O\MOF.MOF $O\$(<F)
  6608. !else
  6609.     mofcomp -N:root\wmi -Amendment:ms_409 -MFL:$O\MFL.MFL -MOF:$O\MOF.MOF $O\$(<F)
  6610. !endif
  6611.     cd $(MAKEDIR)
  6612.     wmimofck -y$(OBJ_PATH)\$O\MOF.MOF -z$(OBJ_PATH)\$O\MFL.MFL $(OBJ_PATH)\$O\MOFMFL.MOF
  6613.     mofcomp -WMI -B:$@ $(OBJ_PATH)\$O\MOFMFL.MOF
  6614.  
  6615.  
  6616. !ifdef USE_MIDL_FOR_MKTYPLIB
  6617.  
  6618. MIDL_MKTYPLIB_FLAGS=$(MKTYPLIB_FLAGS:-h =/header )
  6619. MIDL_MKTYPLIB_FLAGS=$(MIDL_MKTYPLIB_FLAGS:/h =/header )
  6620.  
  6621. MIDL_MKTYPLIB_FLAGS = \
  6622.     $(PACKING) \
  6623.     $(INCPATH0) \
  6624.     /char unsigned \
  6625.     /ms_ext \
  6626.     /c_ext \
  6627.     $(C_DEFINES) /D__MKTYPLIB__ \
  6628.     $(MIDL_FLAGS) \
  6629.     $(MIDL_OPTIMIZATION) \
  6630.     $(MIDL_MKTYPLIB_FLAGS) \
  6631.     /tlb $@ \
  6632.     /cpp_cmd $(MIDL_CPP) \
  6633.     /mktyplib203
  6634.  
  6635. .odl{$O}.tlb:
  6636.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6637.  
  6638. .odl{$(OBJ_PATH)\$O}.tlb:
  6639.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6640.  
  6641. {..\}.odl{$O}.tlb:
  6642.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6643.  
  6644. {..}.odl{$(OBJ_PATH)\$O}.tlb:
  6645.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6646.  
  6647. .tdl{$O}.tlb:
  6648.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6649.  
  6650. .tdl{$(OBJ_PATH)\$O}.tlb:
  6651.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6652.  
  6653. {..\}.tdl{$O}.tlb:
  6654.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6655.  
  6656. {..}.tdl{$(OBJ_PATH)\$O}.tlb:
  6657.     $(MIDL) $(MIDL_MKTYPLIB_FLAGS) $<
  6658.  
  6659. !else
  6660.  
  6661. .odl{$O}.tlb:
  6662.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6663.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $O\MyTypLib.TMP
  6664. $(CPPXX: =
  6665. )
  6666. /D__MKTYPLIB__
  6667. <<$(BUILD_NOKEEP)
  6668.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $O\MyTypLib.TMP
  6669.  
  6670. .odl{$(OBJ_PATH)\$O}.tlb:
  6671.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6672.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $(OBJ_PATH)\$O\MyTypLib.TMP
  6673. $(CPPXX: =
  6674. )
  6675. /D__MKTYPLIB__
  6676. <<$(BUILD_NOKEEP)
  6677.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $(OBJ_PATH)\$O\MyTypLib.TMP
  6678.  
  6679. {..}.odl{$O}.tlb:
  6680.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6681.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $O\MyTypLib.TMP
  6682. $(CPPXX: =
  6683. )
  6684. /D__MKTYPLIB__
  6685. <<$(BUILD_NOKEEP)
  6686.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $O\MyTypLib.TMP
  6687.  
  6688. {..}.odl{$(OBJ_PATH)\$O}.tlb:
  6689.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6690.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $(OBJ_PATH)\$O\MyTypLib.TMP
  6691. $(CPPXX: =
  6692. )
  6693. /D__MKTYPLIB__
  6694. <<$(BUILD_NOKEEP)
  6695.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $(OBJ_PATH)\$O\MyTypLib.TMP
  6696.  
  6697. .tdl{$O}.tlb:
  6698.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6699.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $O\MyTypLib.TMP
  6700. $(CPPXX: =
  6701. )
  6702. /D__MKTYPLIB__
  6703. <<$(BUILD_NOKEEP)
  6704.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $O\MyTypLib.TMP
  6705.  
  6706. .tdl{$(OBJ_PATH)\$O}.tlb:
  6707.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6708.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $(OBJ_PATH)\$O\MyTypLib.TMP
  6709. $(CPPXX: =
  6710. )
  6711. /D__MKTYPLIB__
  6712. <<$(BUILD_NOKEEP)
  6713.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $(OBJ_PATH)\$O\MyTypLib.TMP
  6714.  
  6715. {..}.tdl{$O}.tlb:
  6716.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6717.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $O\MyTypLib.TMP
  6718. $(CPPXX: =
  6719. )
  6720. /D__MKTYPLIB__
  6721. <<$(BUILD_NOKEEP)
  6722.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $O\MyTypLib.TMP
  6723.  
  6724. {..}.tdl{$(OBJ_PATH)\$O}.tlb:
  6725.     @echo mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $<
  6726.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $(OBJ_PATH)\$O\MyTypLib.TMP
  6727. $(CPPXX: =
  6728. )
  6729. /D__MKTYPLIB__
  6730. <<$(BUILD_NOKEEP)
  6731.     @mktyplib /tlb $@ -nocpp $(MKTYPLIB_FLAGS) $(OBJ_PATH)\$O\MyTypLib.TMP
  6732.  
  6733. !endif
  6734.  
  6735. #
  6736. # UA file inference rules
  6737. #
  6738. .SUFFIXES: .h1c .h1s
  6739.  
  6740. !if $(USE_OBJECT_ROOT)
  6741. .h1c{$(OBJ_PATH)\$O}.h1s:
  6742. !else
  6743. .h1c{$O}.h1s:
  6744. !endif
  6745.     set BUILDMSG=Compiling UA file $<
  6746.     apcompnt -p $< -o $@
  6747.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) $@
  6748.  
  6749.  
  6750.  
  6751. # OSSINFO must be set in the *environment* for the ASN compiler to find its
  6752. # configuration file, $(OSSINFO)\ossinfo.
  6753.  
  6754. ! ifndef OSSINFO
  6755. OSSINFO=$(SDK_LIB_DEST)
  6756. ! endif
  6757.  
  6758. ! ifndef ASNDEFAULTFILE
  6759. ASNDEFAULTFILE=$(OSSINFO)\asn1dflt.z4
  6760. ! endif
  6761.  
  6762. ! ifndef ASNSYNTAX
  6763. ASNSYNTAX=-1990
  6764. ! endif
  6765.  
  6766. ASNFLAGS=$(ASNDEFAULTFILE) $(ASNSYNTAX) $(ASNFLAGS)
  6767.  
  6768. # if ASNDBG is explicitly set, let that control whether the voluminous ASN
  6769. # symbols are suppressed. Otherwise, suppress the symbols for free builds.
  6770.  
  6771. ! ifdef ASNDBG
  6772. !  if $(ASNDBG) == 0
  6773. ASNFLAGS=-minimize $(ASNFLAGS)
  6774. !  endif
  6775. ! elseif $(FREEBUILD)
  6776. ASNFLAGS=-minimize $(ASNFLAGS)
  6777. ! endif
  6778.  
  6779. {}.asn{$(PASS0_HEADERDIR)}.h:
  6780.     asn1 $(ASNFLAGS) -out $(PASS0_HEADERDIR)\$(@B) $<
  6781.  
  6782. !ENDIF
  6783.  
  6784. #
  6785. # Default language ID to US English (0x0409)
  6786. #
  6787.  
  6788. !IFDEF RCCODEPAGE
  6789. RCOPTIONS=$(RCOPTIONS) -c $(RCCODEPAGE)
  6790. !ENDIF
  6791.  
  6792. !IFNDEF RCNOFONTMAP
  6793. RCOPTIONS=-z "MS Sans Serif,Helv/MS Shell Dlg" $(RCOPTIONS)
  6794. !ENDIF
  6795.  
  6796. SXS_RC_MANIFEST_DEFINES=$(SXS_MANIFEST_DEFINES)
  6797. SXS_RC_MANIFEST_DEFINES=$(SXS_RC_MANIFEST_DEFINES:"\"=""")
  6798. SXS_RC_MANIFEST_DEFINES=$(SXS_RC_MANIFEST_DEFINES:\""=""")
  6799. RCOPTIONS=$(SXS_RC_MANIFEST_DEFINES) $(RCOPTIONS)
  6800. !ifdef RCLANGUAGE
  6801. RCOPTIONS=-l $(RCLANGUAGE) $(RCOPTIONS)
  6802. !else
  6803. RCOPTIONS=-l 409 $(RCOPTIONS)
  6804. !endif
  6805.  
  6806. !ifdef DO_LANGUAGE_NEUTRAL
  6807. RCOPTIONS=$(RCOPTIONS) $(LANGUAGE_NEUTRAL_RESOURCE) -fm $*.muires
  6808. !ENDIF
  6809.  
  6810.  
  6811. !if "$(BUILD_LCE_FILE)" == "1"
  6812. RCOPTIONS=$(RCOPTIONS) -ta -tn $(LCE_FILE)
  6813. !endif
  6814.  
  6815.  
  6816. RC_COMPILER=rc.exe $(RCOPTIONS)
  6817.  
  6818. INCPATHRC = $(INCPATH0: =)
  6819. INCPATHRC = $(INCPATHRC:-I=;)
  6820. INCPATHRC = $(INCPATHRC:/I=;)
  6821.  
  6822. CDEFINERC = $(CDEFINES:  = )
  6823. CDEFINERC = $(CDEFINERC:  = )
  6824.  
  6825. !ifdef RC_FORCE_INCLUDE_FILES
  6826. # Concatenate the FORCE_INCLUDES files in front of the .rc file.
  6827. # We put nul in front because there is an extra leading semicolon which produces
  6828. # an extra leading plus sign.
  6829. RC_TEMP1=$(@R).rc_temp1
  6830. RC_FORCE_INCLUDE_FILES_CMD=$(_COPYFILE) nul$(RC_FORCE_INCLUDE_FILES:;=+)+$< $(RC_TEMP1)
  6831. INCPATHRC=$(INCPATHRC);..
  6832. !else
  6833. RC_TEMP1=$<
  6834. RC_FORCE_INCLUDE_FILES_CMD=
  6835. !endif
  6836.  
  6837. !ifdef RC_FORCE_INCLUDE_STRING
  6838. RC_TEMP2=$(@R).rc_temp2
  6839. INCPATHRC=$(INCPATHRC);..
  6840. !else
  6841. RC_TEMP2=$(RC_TEMP1)
  6842. !endif
  6843.  
  6844. RC_TEMP=$(RC_TEMP2)
  6845.  
  6846. !ifdef SXS_MANIFEST_IN_RESOURCES
  6847. MAKE_MANIFEST_CMD=nmake.exe /nologo /f $(NTMAKEENV)\makefile.def $(SXS_MANIFEST_OBJ1)
  6848. !else
  6849. MAKE_MANIFEST_CMD=
  6850. !endif
  6851.  
  6852. {$O}.rc{$O}.res:
  6853.     $(TYPE) <<$(ECHO_RSP)
  6854.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6855. <<$(BUILD_NOKEEP)
  6856.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6857.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6858. ! ifdef RC_FORCE_INCLUDE_STRING
  6859.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6860. $(RC_FORCE_INCLUDE_STRING)
  6861. <<$(BUILD_NOKEEP)
  6862. ! endif
  6863.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6864.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6865.     $(NOECHO)set include=$(INCLUDE)
  6866.  
  6867. {$O}.rc{$(OBJ_PATH)\$O}.res:
  6868.     $(TYPE) <<$(ECHO_RSP)
  6869.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6870. <<$(BUILD_NOKEEP)
  6871.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6872.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6873. ! ifdef RC_FORCE_INCLUDE_STRING
  6874.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6875. $(RC_FORCE_INCLUDE_STRING)
  6876. <<$(BUILD_NOKEEP)
  6877. ! endif
  6878.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6879.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6880.     $(NOECHO)set include=$(INCLUDE)
  6881.  
  6882. {$(OBJ_PATH)\$O}.rc{$(OBJ_PATH)\$O}.res:
  6883.     $(TYPE) <<$(ECHO_RSP)
  6884.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6885. <<$(BUILD_NOKEEP)
  6886.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6887.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6888. ! ifdef RC_FORCE_INCLUDE_STRING
  6889.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6890. $(RC_FORCE_INCLUDE_STRING)
  6891. <<$(BUILD_NOKEEP)
  6892. ! endif
  6893.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6894.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6895.     $(NOECHO)set include=$(INCLUDE)
  6896.  
  6897. {..\}.rc{$O}.res:
  6898.     $(TYPE) <<$(ECHO_RSP)
  6899.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6900. <<$(BUILD_NOKEEP)
  6901.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6902.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6903. ! ifdef RC_FORCE_INCLUDE_STRING
  6904.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6905. $(RC_FORCE_INCLUDE_STRING)
  6906. <<$(BUILD_NOKEEP)
  6907. ! endif
  6908.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6909.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6910.     $(NOECHO)set include=$(INCLUDE)
  6911.  
  6912. {..\}.rc{$(OBJ_PATH)\$O}.res:
  6913.     $(TYPE) <<$(ECHO_RSP)
  6914.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6915. <<$(BUILD_NOKEEP)
  6916.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6917.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6918. ! ifdef RC_FORCE_INCLUDE_STRING
  6919.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6920. $(RC_FORCE_INCLUDE_STRING)
  6921. <<$(BUILD_NOKEEP)
  6922. ! endif
  6923.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6924.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6925.     $(NOECHO)set include=$(INCLUDE)
  6926.  
  6927. {}.rc{$O}.res:
  6928.     $(TYPE) <<$(ECHO_RSP)
  6929.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6930. <<$(BUILD_NOKEEP)
  6931.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6932.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6933. ! ifdef RC_FORCE_INCLUDE_STRING
  6934.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6935. $(RC_FORCE_INCLUDE_STRING)
  6936. <<$(BUILD_NOKEEP)
  6937. ! endif
  6938.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6939.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6940.     $(NOECHO)set include=$(INCLUDE)
  6941.  
  6942. {}.rc{$(OBJ_PATH)\$O}.res:
  6943.     $(TYPE) <<$(ECHO_RSP)
  6944.     $(RC_COMPILER) /r /fo $@ $(CDEFINES) $(INCPATH0) $<
  6945. <<$(BUILD_NOKEEP)
  6946.     $(NOECHO)$(MAKE_MANIFEST_CMD)
  6947.     $(NOECHO)$(RC_FORCE_INCLUDE_FILES_CMD)
  6948. ! ifdef RC_FORCE_INCLUDE_STRING
  6949.     $(NOECHO)copy << + $(RC_TEMP1) $(RC_TEMP2)
  6950. $(RC_FORCE_INCLUDE_STRING)
  6951. <<$(BUILD_NOKEEP)
  6952. ! endif
  6953.     $(NOECHO)set include=$(INCPATHRC);$(INCLUDE)
  6954.     $(NOECHO)$(RC_COMPILER) /r /fo $@ $(CDEFINERC) $(RC_TEMP)
  6955.     $(NOECHO)set include=$(INCLUDE)
  6956.  
  6957. {..\}.rc.rcpp:
  6958.     set include=$(INCPATHRC);$(INCLUDE)
  6959.     $(RC_COMPILER) /r /p /fo $(@R).tmp $(CDEFINERC) $<
  6960.     @set include=$(INCLUDE)
  6961.  
  6962. {}.rc.rcpp:
  6963.     set include=$(INCPATHRC);$(INCLUDE)
  6964.     $(RC_COMPILER) /r /p /fo $(@R).tmp $(CDEFINERC) $<
  6965.     @set include=$(INCLUDE)
  6966.  
  6967. .thk{$(OBJ_PATH)\$O}.asm:
  6968.     thunk /o $@ $<
  6969.  
  6970. JVC = jvc /nologo
  6971.  
  6972. !ifndef JAVA_DEBUG_FLAGS
  6973. !if $(FREEBUILD)
  6974. JAVA_DEBUG_FLAGS = /O
  6975. !else
  6976. JAVA_DEBUG_FLAGS = /g
  6977. !endif
  6978. !endif
  6979.  
  6980. !ifndef JAVA_WARNING_FLAGS
  6981. JAVA_WARNING_FLAGS = /w4
  6982. !endif
  6983.  
  6984. JAVA_BASE_CLASS = \
  6985.     $(SDK_PATH)\classes\afc.zip; \
  6986.     $(SDK_PATH)\classes\classes.zip
  6987.  
  6988. JAVA_CLASS_PATH = $(JAVA_BASE_CLASS); $(MAKEDIR); $(USER_CLASS_PATH)
  6989. JAVA_CLASS_PATH = $(JAVA_CLASS_PATH: =)
  6990.  
  6991. JVC_FLAGS = /cp $(JAVA_CLASS_PATH) $(JAVA_DEBUG_FLAGS) $(JAVA_WARNING_FLAGS) /d $(OBJ_PATH)\$O
  6992.  
  6993. {$(MAKEDIR)}.java{$(OBJ_PATH)\$O}.class:
  6994.     $(JVC) $(JVC_FLAGS) $<
  6995.  
  6996. #
  6997. # The point of these constant response file names is primarly to provide stability
  6998. # so that logs can be diffed to verify that changes cause no "real" change.
  6999. #
  7000. # These file names should be kept short to avoid path length bugs in nmake/cmd.
  7001. # In particular, constructs such as $@.responsefile have been seen to exceed nmake/cmd's limited capacity.
  7002. #
  7003. # These names also provide some additional debuggability in the face of BUILD_DEBUG's switching
  7004. # of NoKeep to Keep. You do not then have to discover the response file name to open and view it.
  7005. # However that debuggability is reduced by occasional response file reuse, which can be fixed if desired.
  7006. #
  7007. ECHO_RSP = $(OBJ_PATH)\$O\echo.msg
  7008. CL_RSP   = $(OBJ_PATH)\$O\cl.rsp
  7009. CLCOD_RSP = $(OBJ_PATH)\$O\clcod.rsp
  7010. LINK_RSP = $(OBJ_PATH)\$O\lnk.rsp
  7011. BINPLACE_RESPONSE_FILE = $(OBJ_PATH)\$O\binp.rsp
  7012. BINPLACE_RESPONSE_FILE_IND = $(OBJ_PATH)\$O\binp.ind.rsp
  7013. LIB_RESPONSE_FILE = $(OBJ_PATH)\$O\lib.rsp
  7014. PUBLISH_RESPONSE_FILE = $(OBJ_PATH)\$O\pub.rsp
  7015. PERL_RESPONSE_FILE = $(OBJ_PATH)\$O\perl.rsp
  7016. MANAGED_CODE_BUILD_TOOL_RESPONSE_FILE=$(OBJ_PATH)\$O\mgd.rsp
  7017. TYPE_RESPONSE_FILE=$(OBJ_PATH)\$O\type.rsp
  7018. BINDROP_RESPONSE_FILE=$(OBJ_PATH)\$O\bindrop.rsp
  7019.  
  7020. #
  7021. # Expand spaces to newlines, replace double # signs with spaces.
  7022. #
  7023. EX_CXX_COMPILER_FLAGS=$(CXX_COMPILER_FLAGS: =^
  7024. )
  7025. EX_CXX_COMPILER_FLAGS=$(EX_CXX_COMPILER_FLAGS:^#^#= )
  7026.  
  7027. EX_C_COMPILER_FLAGS=$(C_COMPILER_FLAGS: =^
  7028. )
  7029. EX_C_COMPILER_FLAGS=$(EX_C_COMPILER_FLAGS:^#^#= )
  7030.  
  7031. EX_CXX_COMPILER_FLAGS_NOPCH=$(CXX_COMPILER_FLAGS_NOPCH: =^
  7032. )
  7033. EX_CXX_COMPILER_FLAGS_NOPCH=$(EX_CXX_COMPILER_FLAGS_NOPCH:^#^#= )
  7034.  
  7035. EX_C_COMPILER_FLAGS_NOPCH=$(C_COMPILER_FLAGS_NOPCH: =^
  7036. )
  7037. EX_C_COMPILER_FLAGS_NOPCH=$(EX_C_COMPILER_FLAGS_NOPCH:^#^#= )
  7038.  
  7039. EX_C_COMPILER_FLAGS_COD=$(EX_C_COMPILER_FLAGS)
  7040. EX_C_COMPILER_FLAGS_COD=$(EX_C_COMPILER_FLAGS_COD:/GL=/wd4652)
  7041. # replace runs of newlines with single newlines
  7042. EX_C_COMPILER_FLAGS_COD=$(EX_C_COMPILER_FLAGS_COD:^
  7043. ^
  7044. =^
  7045. )
  7046. EX_C_COMPILER_FLAGS_COD=$(EX_C_COMPILER_FLAGS_COD:^
  7047. ^
  7048. =^
  7049. )
  7050.  
  7051. EX_CXX_COMPILER_FLAGS_COD=$(EX_CXX_COMPILER_FLAGS)
  7052. EX_CXX_COMPILER_FLAGS_COD=$(EX_CXX_COMPILER_FLAGS_COD:/GL=/wd4652)
  7053. EX_CXX_COMPILER_FLAGS_COD=$(EX_CXX_COMPILER_FLAGS_COD:^
  7054. ^
  7055. =^
  7056. )
  7057. EX_CXX_COMPILER_FLAGS_COD=$(EX_CXX_COMPILER_FLAGS_COD:^
  7058. ^
  7059. =^
  7060. )
  7061.  
  7062. EX_C_COMPILER_FLAGS_PP=$(EX_C_COMPILER_FLAGS)
  7063. EX_C_COMPILER_FLAGS_PP=$(EX_C_COMPILER_FLAGS_PP:/d1PrivateNativeTypes=)
  7064. EX_C_COMPILER_FLAGS_PP=$(EX_C_COMPILER_FLAGS_PP:^
  7065. ^
  7066. =^
  7067. )
  7068. EX_C_COMPILER_FLAGS_PP=$(EX_C_COMPILER_FLAGS_PP:^
  7069. ^
  7070. =^
  7071. )
  7072.  
  7073. EX_CXX_COMPILER_FLAGS_PP=$(EX_CXX_COMPILER_FLAGS)
  7074. EX_CXX_COMPILER_FLAGS_PP=$(EX_CXX_COMPILER_FLAGS_PP:/d1PrivateNativeTypes=)
  7075. EX_CXX_COMPILER_FLAGS_PP=$(EX_CXX_COMPILER_FLAGS_PP:^
  7076. ^
  7077. =^
  7078. )
  7079. EX_CXX_COMPILER_FLAGS_PP=$(EX_CXX_COMPILER_FLAGS_PP:^
  7080. ^
  7081. =^
  7082. )
  7083.  
  7084. !ifdef USECXX_FLAG
  7085. #
  7086. # This ought to go elsewhere
  7087. #
  7088. !if "$(URT_VER)" >= "2"
  7089. C_COMPILER_FLAGS_NOPCH=$(C_COMPILER_FLAGS_NOPCH) $(MANAGED_CXX_FLAGS)
  7090. !endif
  7091. !endif
  7092.  
  7093. !if !$(USE_OBJECT_ROOT)
  7094.  
  7095. {$O}.cxx{$O}.obj::
  7096.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7097. /Fo"$(MAKEDIR)\$O/"
  7098. /FC
  7099. $(EX_CXX_COMPILER_FLAGS: =
  7100. )
  7101. $<
  7102. <<$(BUILD_NOKEEP)
  7103.  
  7104. !endif
  7105.  
  7106. !if $(USE_OBJECT_ROOT)
  7107.  
  7108. {$(OBJ_PATH)\$O}.cxx{$(OBJ_PATH)\$O}.obj::
  7109.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7110. /Fo"$(OBJ_PATH)\$O/"
  7111. /FC
  7112. $(EX_CXX_COMPILER_FLAGS: =
  7113. )
  7114. $<
  7115. <<$(BUILD_NOKEEP)
  7116.  
  7117. !endif
  7118.  
  7119. !if !$(USE_OBJECT_ROOT)
  7120.  
  7121. {..\}.cxx{$O}.obj::
  7122.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7123. /Fo"$(MAKEDIR)\$O/"
  7124. /FC
  7125. $(EX_CXX_COMPILER_FLAGS: =
  7126. )
  7127. $<
  7128. <<$(BUILD_NOKEEP)
  7129.  
  7130. !endif
  7131.  
  7132. !if $(USE_OBJECT_ROOT)
  7133.  
  7134. {..\}.cxx{$(OBJ_PATH)\$O}.obj::
  7135.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7136. /Fo"$(OBJ_PATH)\$O/"
  7137. /FC
  7138. $(EX_CXX_COMPILER_FLAGS: =
  7139. )
  7140. $<
  7141. <<$(BUILD_NOKEEP)
  7142.  
  7143. !endif
  7144.  
  7145. !if !$(USE_OBJECT_ROOT)
  7146.  
  7147. {..\$(TARGET_DIRECTORY)\}.cxx{$O}.obj::
  7148.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7149. /Fo"$(MAKEDIR)\$O/"
  7150. /FC
  7151. $(EX_CXX_COMPILER_FLAGS: =
  7152. )
  7153. $<
  7154. <<$(BUILD_NOKEEP)
  7155.  
  7156. !endif
  7157.  
  7158. !if $(USE_OBJECT_ROOT)
  7159.  
  7160. {..\$(TARGET_DIRECTORY)\}.cxx{$(OBJ_PATH)\$O}.obj::
  7161.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7162. /Fo"$(OBJ_PATH)\$O/"
  7163. /FC
  7164. $(EX_CXX_COMPILER_FLAGS: =
  7165. )
  7166. $<
  7167. <<$(BUILD_NOKEEP)
  7168.  
  7169. !endif
  7170.  
  7171. !if !$(USE_OBJECT_ROOT)
  7172.  
  7173. {$O}.cpp{$O}.obj::
  7174.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7175. /Fo"$(MAKEDIR)\$O/"
  7176. /FC
  7177. $(CXX_COMPILER_FLAGS: =
  7178. )
  7179. $<
  7180. <<$(BUILD_NOKEEP)
  7181.  
  7182. !endif
  7183.  
  7184. !if $(USE_OBJECT_ROOT)
  7185.  
  7186. {$(OBJ_PATH)\$O}.cpp{$(OBJ_PATH)\$O}.obj::
  7187.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7188. /Fo"$(OBJ_PATH)\$O/"
  7189. /FC
  7190. $(CXX_COMPILER_FLAGS: =
  7191. )
  7192. $<
  7193. <<$(BUILD_NOKEEP)
  7194.  
  7195. !endif
  7196.  
  7197. !if !$(USE_OBJECT_ROOT)
  7198.  
  7199. {..\}.cpp{$O}.obj::
  7200.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7201. /Fo"$(MAKEDIR)\$O/"
  7202. /FC
  7203. $(CXX_COMPILER_FLAGS: =
  7204. )
  7205. $<
  7206. <<$(BUILD_NOKEEP)
  7207.  
  7208. !endif
  7209.  
  7210. !if $(USE_OBJECT_ROOT)
  7211.  
  7212. {..\}.cpp{$(OBJ_PATH)\$O}.obj::
  7213.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7214. /Fo"$(OBJ_PATH)\$O/"
  7215. /FC
  7216. $(CXX_COMPILER_FLAGS: =
  7217. )
  7218. $<
  7219. <<$(BUILD_NOKEEP)
  7220.  
  7221. !endif
  7222.  
  7223. !if !$(USE_OBJECT_ROOT)
  7224.  
  7225. {..\$(TARGET_DIRECTORY)\}.cpp{$O}.obj::
  7226.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7227. /Fo"$(MAKEDIR)\$O/"
  7228. /FC
  7229. $(CXX_COMPILER_FLAGS: =
  7230. )
  7231. $<
  7232. <<$(BUILD_NOKEEP)
  7233.  
  7234. !endif
  7235.  
  7236. !if $(USE_OBJECT_ROOT)
  7237.  
  7238. {..\$(TARGET_DIRECTORY)\}.cpp{$(OBJ_PATH)\$O}.obj::
  7239.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7240. /Fo"$(OBJ_PATH)\$O/"
  7241. /FC
  7242. $(CXX_COMPILER_FLAGS: =
  7243. )
  7244. $<
  7245. <<$(BUILD_NOKEEP)
  7246.  
  7247. !endif
  7248.  
  7249. !if !$(USE_OBJECT_ROOT)
  7250.  
  7251. {}.cxx{$O}.obj::
  7252.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7253. /Fo"$(MAKEDIR)\$O/"
  7254. /FC
  7255. $(EX_CXX_COMPILER_FLAGS: =
  7256. )
  7257. $<
  7258. <<$(BUILD_NOKEEP)
  7259.  
  7260. !endif
  7261.  
  7262. !if $(USE_OBJECT_ROOT)
  7263.  
  7264. {}.cxx{$(OBJ_PATH)\$O}.obj::
  7265.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7266. /Fo"$(OBJ_PATH)\$O/"
  7267. /FC
  7268. $(EX_CXX_COMPILER_FLAGS: =
  7269. )
  7270. $<
  7271. <<$(BUILD_NOKEEP)
  7272.  
  7273. !endif
  7274.  
  7275. !if !$(USE_OBJECT_ROOT)
  7276.  
  7277. {$(TARGET_DIRECTORY)\}.cxx{$O}.obj::
  7278.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7279. /Fo"$(MAKEDIR)\$O/"
  7280. /FC
  7281. $(EX_CXX_COMPILER_FLAGS: =
  7282. )
  7283. $<
  7284. <<$(BUILD_NOKEEP)
  7285.  
  7286. !endif
  7287.  
  7288. !if $(USE_OBJECT_ROOT)
  7289.  
  7290. {$(TARGET_DIRECTORY)\}.cxx{$(OBJ_PATH)\$O}.obj::
  7291.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7292. /Fo"$(OBJ_PATH)\$O/"
  7293. /FC
  7294. $(EX_CXX_COMPILER_FLAGS: =
  7295. )
  7296. $<
  7297. <<$(BUILD_NOKEEP)
  7298.  
  7299. !endif
  7300.  
  7301. !if !$(USE_OBJECT_ROOT)
  7302.  
  7303. {}.cpp{$O}.obj::
  7304.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7305. /Fo"$(MAKEDIR)\$O/"
  7306. /FC
  7307. $(EX_CXX_COMPILER_FLAGS: =
  7308. )
  7309. $<
  7310. <<$(BUILD_NOKEEP)
  7311.  
  7312. !endif
  7313.  
  7314. !if $(USE_OBJECT_ROOT)
  7315.  
  7316. {}.cpp{$(OBJ_PATH)\$O}.obj::
  7317.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7318. /Fo"$(OBJ_PATH)\$O/"
  7319. /FC
  7320. $(EX_CXX_COMPILER_FLAGS: =
  7321. )
  7322. $<
  7323. <<$(BUILD_NOKEEP)
  7324.  
  7325. !endif
  7326.  
  7327. !if !$(USE_OBJECT_ROOT)
  7328.  
  7329. {$(TARGET_DIRECTORY)\}.cpp{$O}.obj::
  7330.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7331. /Fo"$(MAKEDIR)\$O/"
  7332. /FC
  7333. $(EX_CXX_COMPILER_FLAGS: =
  7334. )
  7335. $<
  7336. <<$(BUILD_NOKEEP)
  7337.  
  7338. !endif
  7339.  
  7340. !if $(USE_OBJECT_ROOT)
  7341.  
  7342. {$(TARGET_DIRECTORY)\}.cpp{$(OBJ_PATH)\$O}.obj::
  7343.     $(CXX_COMPILER_NAME) @<<$(CL_RSP)
  7344. /Fo"$(OBJ_PATH)\$O/"
  7345. /FC
  7346. $(EX_CXX_COMPILER_FLAGS: =
  7347. )
  7348. $<
  7349. <<$(BUILD_NOKEEP)
  7350.  
  7351. !endif
  7352.  
  7353. {..\}.cxx{}.cod:
  7354.     $(CXX_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC
  7355. $(EX_CXX_COMPILER_FLAGS_COD)
  7356. $<
  7357. <<Keep
  7358.  
  7359. {..\}.cxx{}.pp:
  7360.     $(CXX_COMPILER_NAME) @<<$(CL_RSP) /E /FC $< > $@
  7361. $(EX_CXX_COMPILER_FLAGS_PP)
  7362. <<Keep
  7363.  
  7364. {..\}.cpp{}.cod:
  7365.     $(CXX_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC
  7366. $(EX_CXX_COMPILER_FLAGS_COD)
  7367. $<
  7368. <<Keep
  7369.  
  7370. {..\}.cpp{}.pp:
  7371.     $(CXX_COMPILER_NAME) @<<$(CL_RSP) /E /FC $< > $@
  7372. $(EX_CXX_COMPILER_FLAGS_PP)
  7373. <<Keep
  7374.  
  7375. {}.cxx{}.cod:
  7376.     $(CXX_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $<
  7377. $(EX_CXX_COMPILER_FLAGS_COD)
  7378. <<Keep
  7379.  
  7380. {}.cxx{}.pp:
  7381.     $(CXX_COMPILER_NAME) @<<$(CL_RSP) /E /FC $< > $@
  7382. $(EX_CXX_COMPILER_FLAGS_PP)
  7383. <<Keep
  7384.  
  7385. {}.cpp{}.cod:
  7386.     $(CXX_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $<
  7387. $(EX_CXX_COMPILER_FLAGS_COD)
  7388. <<Keep
  7389.  
  7390. {}.cpp{}.pp:
  7391.     $(CXX_COMPILER_NAME) @<<$(CL_RSP) /E /FC $< > $@
  7392. $(EX_CXX_COMPILER_FLAGS_PP)
  7393. <<Keep
  7394.  
  7395. !if !$(USE_OBJECT_ROOT)
  7396.  
  7397. {..\}.c{$O}.obj::
  7398.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7399. /Fo"$(MAKEDIR)\$O/"
  7400. /FC
  7401. $(USECXX_FLAG)
  7402. $(EX_C_COMPILER_FLAGS)
  7403. $<
  7404. <<$(BUILD_NOKEEP)
  7405.  
  7406. !endif
  7407.  
  7408. !if $(USE_OBJECT_ROOT)
  7409.  
  7410. {..\}.c{$(OBJ_PATH)\$O}.obj::
  7411.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7412. /Fo"$(OBJ_PATH)\$O/"
  7413. /FC
  7414. $(USECXX_FLAG)
  7415. $(EX_C_COMPILER_FLAGS)
  7416. $<
  7417. <<$(BUILD_NOKEEP)
  7418.  
  7419. !endif
  7420.  
  7421. !if !$(USE_OBJECT_ROOT)
  7422.  
  7423. {..\$(TARGET_DIRECTORY)\}.c{$O}.obj::
  7424.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7425. /Fo"$(MAKEDIR)\$O/"
  7426. /FC
  7427. $(USECXX_FLAG)
  7428. $(EX_C_COMPILER_FLAGS)
  7429. $<
  7430. <<$(BUILD_NOKEEP)
  7431.  
  7432. !endif
  7433.  
  7434. !if $(USE_OBJECT_ROOT)
  7435.  
  7436. {..\$(TARGET_DIRECTORY)\}.c{$(OBJ_PATH)\$O}.obj::
  7437.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7438. /Fo"$(OBJ_PATH)\$O/"
  7439. /FC
  7440. $(USECXX_FLAG)
  7441. $(EX_C_COMPILER_FLAGS)
  7442. $<
  7443. <<$(BUILD_NOKEEP)
  7444.  
  7445. !endif
  7446.  
  7447. !if !$(USE_OBJECT_ROOT)
  7448.  
  7449. {$O}.c{$O}.obj::
  7450.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7451. /Fo"$(MAKEDIR)\$O/"
  7452. /FC
  7453. $(USECXX_FLAG)
  7454. $(EX_C_COMPILER_FLAGS)
  7455. $<
  7456. <<$(BUILD_NOKEEP)
  7457.  
  7458. !endif
  7459.  
  7460. !if $(USE_OBJECT_ROOT)
  7461.  
  7462. {$(OBJ_PATH)\$O}.c{$(OBJ_PATH)\$O}.obj::
  7463.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7464. /Fo"$(OBJ_PATH)\$O/"
  7465. /FC
  7466. $(USECXX_FLAG)
  7467. $(EX_C_COMPILER_FLAGS)
  7468. $<
  7469. <<$(BUILD_NOKEEP)
  7470.  
  7471. !endif
  7472.  
  7473. !if !$(USE_OBJECT_ROOT)
  7474.  
  7475. {}.c{$O}.obj::
  7476.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7477. /Fo"$(MAKEDIR)\$O/"
  7478. /FC
  7479. $(USECXX_FLAG)
  7480. $(EX_C_COMPILER_FLAGS)
  7481. $<
  7482. <<$(BUILD_NOKEEP)
  7483.  
  7484. !endif
  7485.  
  7486. !if $(USE_OBJECT_ROOT)
  7487.  
  7488. {}.c{$(OBJ_PATH)\$O}.obj::
  7489.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7490. /Fo"$(OBJ_PATH)\$O/"
  7491. /FC
  7492. $(USECXX_FLAG)
  7493. $(EX_C_COMPILER_FLAGS)
  7494. $<
  7495. <<$(BUILD_NOKEEP)
  7496.  
  7497. !endif
  7498.  
  7499. !if !$(USE_OBJECT_ROOT)
  7500.  
  7501. {$(TARGET_DIRECTORY)\}.c{$O}.obj::
  7502.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7503. /Fo"$(MAKEDIR)\$O/"
  7504. /FC
  7505. $(USECXX_FLAG)
  7506. $(EX_C_COMPILER_FLAGS)
  7507. $<
  7508. <<$(BUILD_NOKEEP)
  7509.  
  7510. !endif
  7511.  
  7512. !if $(USE_OBJECT_ROOT)
  7513.  
  7514. {$(TARGET_DIRECTORY)\}.c{$(OBJ_PATH)\$O}.obj::
  7515.     $(C_COMPILER_NAME) @<<$(CL_RSP)
  7516. /Fo"$(OBJ_PATH)\$O/"
  7517. /FC
  7518. $(USECXX_FLAG)
  7519. $(EX_C_COMPILER_FLAGS)
  7520. $<
  7521. <<$(BUILD_NOKEEP)
  7522.  
  7523. !endif
  7524.  
  7525. {..\}.c{}.cod:
  7526.     $(C_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $(USECXX_FLAG) $<
  7527. $(EX_C_COMPILER_FLAGS_COD)
  7528. <<Keep
  7529.  
  7530. !if !$(USE_OBJECT_ROOT)
  7531.  
  7532. {$O}.c{}.cod:
  7533.     $(C_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $(USECXX_FLAG) $<
  7534. $(EX_C_COMPILER_FLAGS_COD)
  7535. <<Keep
  7536.  
  7537. !endif
  7538.  
  7539. {..\$(TARGET_DIRECTORY)\}.c{}.cod:
  7540.     $(C_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $(USECXX_FLAG) $<
  7541. $(EX_C_COMPILER_FLAGS_COD)
  7542. <<Keep
  7543.  
  7544. !if !$(USE_OBJECT_ROOT)
  7545.  
  7546. {$O}.c{}.pp:
  7547.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7548. $(EX_C_COMPILER_FLAGS_PP)
  7549. <<Keep
  7550.  
  7551. !endif
  7552.  
  7553. !if $(USE_OBJECT_ROOT)
  7554.  
  7555. {$(OBJ_PATH)\$O}.c{}.pp:
  7556.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7557. $(EX_C_COMPILER_FLAGS_PP)
  7558. <<Keep
  7559.  
  7560. !endif
  7561.  
  7562. {..\}.c{}.pp:
  7563.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7564. $(EX_C_COMPILER_FLAGS_PP)
  7565. <<Keep
  7566.  
  7567. {..\$(TARGET_DIRECTORY)\}.c{}.pp:
  7568.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7569. $(EX_C_COMPILER_FLAGS)
  7570. <<Keep
  7571.  
  7572. {}.c{}.cod:
  7573.     $(C_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $(USECXX_FLAG) $<
  7574. $(EX_C_COMPILER_FLAGS_COD)
  7575. <<Keep
  7576.  
  7577. {$(TARGET_DIRECTORY)\}.c{}.cod:
  7578.     $(C_COMPILER_NAME) @<<$(CLCOD_RSP) /FAsc /FC $(USECXX_FLAG) $<
  7579. <<Keep
  7580.  
  7581. {}.c{}.pp:
  7582.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7583. $(EX_C_COMPILER_FLAGS_PP)
  7584. <<Keep
  7585.  
  7586. {$(TARGET_DIRECTORY)\}.c{}.pp:
  7587.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7588. $(EX_C_COMPILER_FLAGS_PP)
  7589. <<Keep
  7590.  
  7591. {}.c{$(TARGET_DIRECTORY)\}.pp:
  7592.     $(C_COMPILER_NAME) @<<$(CL_RSP) /E /FC $(USECXX_FLAG) $< > $@
  7593. $(EX_C_COMPILER_FLAGS_PP)
  7594. <<Keep
  7595.  
  7596. # } }
  7597.  
  7598. #
  7599. # C# compiler rules
  7600. #
  7601.  
  7602. EX_MANAGED_COMPILER_FLAGS=$(MANAGED_STD_FLAGS)
  7603.  
  7604. !if 0
  7605. !if $(USE_OBJECT_ROOT)
  7606.  
  7607. {..}.cs{$(OBJ_PATH)\$O}.dll::
  7608.     @$(_TYPE) <<$(ECHO_RSP)
  7609. $(ECHO_MSG)
  7610.     @$(CS_COMPILER_NAME) @<<$(CS_RSP)
  7611. $(EX_MANAGED_COMPILER_FLAGS)
  7612. $<
  7613. <<$(BUILD_NOKEEP)
  7614.  
  7615. !endif
  7616.  
  7617. !if $(USE_OBJECT_ROOT)
  7618.  
  7619. {..}.vb{$(OBJ_PATH)\$O}.dll::
  7620.     @$(_TYPE) <<$(ECHO_RSP)
  7621. $(ECHO_MSG)
  7622.     @$(VB_NET_COMPILER_NAME) @<<$(VB_RSP)
  7623. $(EX_MANAGED_COMPILER_FLAGS)
  7624. $<
  7625. <<$(BUILD_NOKEEP)
  7626.  
  7627. !endif
  7628. !endif
  7629.  
  7630. #
  7631. # resgen rules
  7632. #
  7633.  
  7634. !if !$(USE_OBJECT_ROOT)
  7635.  
  7636. .resz{$O}.resources:
  7637.     resxgen $< $*.resx
  7638.     resgen $*.resx $@
  7639.  
  7640. .resx{$O}.resources:
  7641.     resgen $< $@
  7642.  
  7643. .txt{$O}.resources:
  7644.     resgen $< $@
  7645.  
  7646. !endif
  7647.  
  7648. !if $(USE_OBJECT_ROOT)
  7649.  
  7650. .resz{$(OBJ_PATH)\$O}.resources:
  7651.     resxgen $< $*.resx
  7652.     resgen $*.resx $@
  7653.  
  7654. .resx{$(OBJ_PATH)\$O}.resources:
  7655.     resgen $< $@
  7656.  
  7657. .txt{$(OBJ_PATH)\$O}.resources:
  7658.     resgen $< $@
  7659.  
  7660. !endif
  7661.  
  7662. !if 0
  7663.  
  7664. #
  7665. # SDL proxy generation rules
  7666. #
  7667. .sdl.cs::
  7668.     webserviceutil /c:proxy /path:$<
  7669.  
  7670. !endif
  7671.  
  7672. !if "$(NTNOFUZZYLOOKUP)" == "1"
  7673. LIBRARY_OBJS=
  7674. !else
  7675. LIBRARY_OBJS = $(LIBRARY_OBJS) $(HEADEROBJNAME)
  7676. !endif
  7677.  
  7678. !ifdef USE_INCREMENTAL_LINKING
  7679. IMPLIB_DEPEND =
  7680. !else
  7681. IMPLIB_DEPEND = $(LIBRARY_OBJS)
  7682. !endif
  7683.  
  7684. #
  7685. # inference rules for preprocessing manifests
  7686. # It would be nice to go from .manifest to .manifest.obj, but nmake doesn't work that way.
  7687. # There is some precedent for going from .src to .manifest, but I'd rather generated files
  7688. # end in obj. But we can't go from .manifest to .manifestobj either, because of the case
  7689. # of manifests not in resources.
  7690. #
  7691. # .man is for fitting in 8.3
  7692. #
  7693. .SUFFIXES: .manifest .man .o_manifest
  7694.  
  7695. # This string is needed in at least four places in the tree, so factor it to here.
  7696. SYSTEM_COMPATIBLE_ASSEMBLY_NAME=Microsoft.Windows.SystemCompatible
  7697. DEFINE_SYSTEM_COMPATIBLE_ASSEMBLY_NAME=\
  7698.     -DSYSTEM_COMPATIBLE_ASSEMBLY_NAME="\"$(SYSTEM_COMPATIBLE_ASSEMBLY_NAME)\"" \
  7699.     -DLSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L"\"$(SYSTEM_COMPATIBLE_ASSEMBLY_NAME)\""
  7700.  
  7701. SYSTEM_COMPATIBLE_ASSEMBLY_VERSION=6.0
  7702. SYSTEM_COMPATIBLE_ASSEMBLY_VERSION_PART_3=$(VER_PRODUCTBUILD)
  7703. SYSTEM_COMPATIBLE_ASSEMBLY_VERSION_PART_4=$(VER_PRODUCTBUILD_QFE)
  7704.  
  7705. SXS_MANIFEST_DEFINES= \
  7706.  -DSXS_PROCESSOR_ARCHITECTURE="\"$(SXS_PROCESSOR_ARCHITECTURE)\"" \
  7707.  -DSXS_TARGET="\"$(TARGETNAME).$(TARGETEXT:lib=dll)\"" \
  7708.  $(DEFINE_SYSTEM_COMPATIBLE_ASSEMBLY_NAME) \
  7709.  $(SXS_MANIFEST_DEFINES)
  7710. !ifdef SXS_AUTO_VERSION
  7711. # Some assemblies shipped with policy versions unrelated to their manifest version --
  7712. # in the event that the policy is now at a higher version than the corresponding
  7713. # assembly, we won't override it using our default behavior of using a policy version
  7714. # equal to the current assembly version. In this case provide an override mechanism:
  7715. # in sources set SXS_OVERRIDE_POLICY_VERSION=(major).(minor) and also use
  7716. # SXS_OVERRIDE_POLICY_VERSION as the version in your manifest and we will take care
  7717. # of adding the third and fourth parts and making it a string.
  7718. SXS_MANIFEST_DEFINES=$(SXS_MANIFEST_DEFINES) -DSXS_MAJMIN_ASSEMBLY_VERSION=$(SXS_ASSEMBLY_VERSION) \
  7719.  -DSXS_OVERRIDE_POLICY_VERSION_MAJMIN=$(SXS_OVERRIDE_POLICY_VERSION)
  7720. !else
  7721. SXS_MANIFEST_DEFINES=$(SXS_MANIFEST_DEFINES) -DSXS_ASSEMBLY_VERSION="\"$(SXS_ASSEMBLY_FULL_VERSION)\""
  7722. !endif
  7723.  
  7724. !if "$(SXS_ASSEMBLY_LANGUAGE)" != ""
  7725. SXS_MANIFEST_DEFINES=-DSXS_ASSEMBLY_LANGUAGE="\"$(SXS_ASSEMBLY_LANGUAGE)\"" $(SXS_MANIFEST_DEFINES)
  7726. SXS_MANIFEST_DEFINES=-DSXS_LANGUAGE="\"$(SXS_ASSEMBLY_LANGUAGE)\"" $(SXS_MANIFEST_DEFINES)
  7727. !endif
  7728.  
  7729. !if "$(SXS_ASSEMBLY_NAME)" != ""
  7730. SXS_MANIFEST_DEFINES=-DSXS_ASSEMBLY_NAME="\"$(SXS_ASSEMBLY_NAME)\"" $(SXS_MANIFEST_DEFINES)
  7731. !endif
  7732.  
  7733.  
  7734. #MANIFEST_PREPROCESSOR_NAME=$(C_PREPROCESSOR_NAME)
  7735. # $(TARGET_CPP) does not include /FIwarning.h.
  7736. # Otherwise we have to filter the data through, like Perl:
  7737. # while (<>) {
  7738. #       if (!/^#pragma.+/ && !/^$/) {
  7739. #               print;
  7740. #       }
  7741. #}
  7742. !ifndef MANIFEST_PREPROCESSOR_NAME
  7743. !ifdef SXS_AUTO_VERSION
  7744. MANIFEST_PREPROCESSOR_NAME=$(C_PREPROCESSOR_NAME)
  7745. !else
  7746. MANIFEST_PREPROCESSOR_NAME=preprocessor
  7747. !endif
  7748. !endif
  7749.  
  7750. #
  7751. # Auto versioning can be made simpler.
  7752. # Perl and the C preprocessor can be removed.
  7753. # The original author did not seem to know about LINKER_FLAGS.
  7754. #
  7755. !ifdef SXS_AUTO_VERSION
  7756. MANIFEST_VERSION_HEADER=$(SDK_INC_PATH)\sxsmanifest.h
  7757. MANIFEST_PREPROCESSOR_FLAGS=$(MANIFEST_PREPROCESSOR_FLAGS) \
  7758.     /EP /nologo /I$(SDK_INC_PATH)
  7759. MANIFEST_TRIMMER=$(_PERL) -ne "print if (!/^.pragma/ && /^.+/)"
  7760. MANIFEST_PREPROCESS=$(MANIFEST_PREPROCESSOR_NAME) \
  7761.     $(MANIFEST_PREPROCESSOR_FLAGS) /FI$(MANIFEST_VERSION_HEADER) \
  7762.     $(SXS_MANIFEST_DEFINES) $< | $(MANIFEST_TRIMMER) > $@.temp
  7763. !else
  7764. MANIFEST_PREPROCESS=$(MANIFEST_PREPROCESSOR_NAME) -o $@.temp -i $< $(SXS_MANIFEST_DEFINES)
  7765. !endif
  7766.  
  7767. #
  7768. # .manifest -> .man
  7769. #
  7770. {}.manifest{$(OBJ_PATH)\$O}.man:
  7771.     -$(_DEL)
  7772.     $(MANIFEST_PREPROCESS)
  7773.     $(_MOVE)
  7774.  
  7775. {..}.manifest{$(OBJ_PATH)\$O}.man:
  7776.     -$(_DEL)
  7777.     $(MANIFEST_PREPROCESS)
  7778.     $(_MOVE)
  7779.  
  7780. {..\..}.manifest{$(OBJ_PATH)\$O}.man:
  7781.     -$(_DEL)
  7782.     $(MANIFEST_PREPROCESS)
  7783.     $(_MOVE)
  7784.  
  7785. {$(SXS_MANIFEST_SOURCE)}.manifest{$(OBJ_PATH)\$O}.man:
  7786.     -$(_DEL)
  7787.     $(MANIFEST_PREPROCESS)
  7788.     $(_MOVE)
  7789.  
  7790. #
  7791. # .manifest -> .manifest
  7792. #
  7793. {}.manifest{$(OBJ_PATH)\$O}.manifest:
  7794.     -$(_DEL)
  7795.     $(MANIFEST_PREPROCESS)
  7796.     $(_MOVE)
  7797.  
  7798. {..}.manifest{$(OBJ_PATH)\$O}.manifest:
  7799.     -$(_DEL)
  7800.     $(MANIFEST_PREPROCESS)
  7801.     $(_MOVE)
  7802.  
  7803. {..\..}.manifest{$(OBJ_PATH)\$O}.manifest:
  7804.     -$(_DEL)
  7805.     $(MANIFEST_PREPROCESS)
  7806.     $(_MOVE)
  7807.  
  7808. {$(SXS_MANIFEST_SOURCE)}.manifest{$(OBJ_PATH)\$O}.manifest:
  7809.     -$(_DEL)
  7810.     $(MANIFEST_PREPROCESS)
  7811.     $(_MOVE)
  7812.  
  7813. #
  7814. # .manifest -> .o_manifest
  7815. #
  7816. {}.manifest{$(OBJ_PATH)\$O}.o_manifest:
  7817.     -$(_DEL)
  7818.     $(MANIFEST_PREPROCESS)
  7819.     $(_MOVE)
  7820.  
  7821. {..}.manifest{$(OBJ_PATH)\$O}.o_manifest:
  7822.     -$(_DEL)
  7823.     $(MANIFEST_PREPROCESS)
  7824.     $(_MOVE)
  7825.  
  7826. {..\..}.manifest{$(OBJ_PATH)\$O}.o_manifest:
  7827.     -$(_DEL)
  7828.     $(MANIFEST_PREPROCESS)
  7829.     $(_MOVE)
  7830.  
  7831. {$(SXS_MANIFEST_SOURCE)}.manifest{$(OBJ_PATH)\$O}.o_manifest:
  7832.     -$(_DEL)
  7833.     $(MANIFEST_PREPROCESS)
  7834.     $(_MOVE)
  7835.  
  7836. #
  7837. # Standard inference rule for generating machine specific def files.
  7838. #
  7839.  
  7840. .SUFFIXES: .def .src
  7841.  
  7842. !if !$(USE_OBJECT_ROOT)
  7843.  
  7844. {..\$(TARGET_DIRECTORY)\}.src{$O}.def:
  7845.     @$(_TYPE) <<$(ECHO_RSP)
  7846. $(ECHO_MSG) /EP $<
  7847. <<$(BUILD_NOKEEP)
  7848.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7849. $(CPPXX: =
  7850. )
  7851. <<$(BUILD_NOKEEP)
  7852.  
  7853. !endif
  7854.  
  7855. !if $(USE_OBJECT_ROOT)
  7856.  
  7857. {..\$(TARGET_DIRECTORY)\}.src{$(OBJ_PATH)\$O}.def:
  7858.     @$(_TYPE) <<$(ECHO_RSP)
  7859. $(ECHO_MSG) /EP $<
  7860. <<$(BUILD_NOKEEP)
  7861.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7862. $(CPPXX: =
  7863. )
  7864. <<$(BUILD_NOKEEP)
  7865.  
  7866. !endif
  7867.  
  7868. !if !$(USE_OBJECT_ROOT)
  7869.  
  7870. {..\}.src{$O}.def:
  7871.     @$(_TYPE) <<$(ECHO_RSP)
  7872. $(ECHO_MSG) /EP $<
  7873. <<$(BUILD_NOKEEP)
  7874.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7875. $(CPPXX: =
  7876. )
  7877. <<$(BUILD_NOKEEP)
  7878.  
  7879. !endif
  7880.  
  7881. !if $(USE_OBJECT_ROOT)
  7882.  
  7883. {..\}.src{$(OBJ_PATH)\$O}.def:
  7884.     @$(_TYPE) <<$(ECHO_RSP)
  7885. $(ECHO_MSG) /EP $<
  7886. <<$(BUILD_NOKEEP)
  7887.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7888. $(CPPXX: =
  7889. )
  7890. <<$(BUILD_NOKEEP)
  7891.  
  7892. !endif
  7893.  
  7894. !if !$(USE_OBJECT_ROOT)
  7895.  
  7896. {}.src{$O}.def:
  7897.     @$(_TYPE) <<$(ECHO_RSP)
  7898. $(ECHO_MSG) /EP $<
  7899. <<$(BUILD_NOKEEP)
  7900.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7901. $(CPPXX: =
  7902. )
  7903. <<$(BUILD_NOKEEP)
  7904.  
  7905. !endif
  7906.  
  7907. !if $(USE_OBJECT_ROOT)
  7908.  
  7909. {}.src{$(OBJ_PATH)\$O}.def:
  7910.     @$(_TYPE) <<$(ECHO_RSP)
  7911. $(ECHO_MSG) /EP $<
  7912. <<$(BUILD_NOKEEP)
  7913.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7914. $(CPPXX: =
  7915. )
  7916. <<$(BUILD_NOKEEP)
  7917.  
  7918. !endif
  7919.  
  7920. !if !$(USE_OBJECT_ROOT)
  7921.  
  7922. {..\}.def{$O}.def:
  7923.     @$(_TYPE) <<$(ECHO_RSP)
  7924. $(ECHO_MSG) /EP $<
  7925. <<$(BUILD_NOKEEP)
  7926.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7927. $(CPPXX: =
  7928. )
  7929. <<$(BUILD_NOKEEP)
  7930.  
  7931. !endif
  7932.  
  7933. !if $(USE_OBJECT_ROOT)
  7934.  
  7935. {..\}.def{$(OBJ_PATH)\$O}.def:
  7936.     @$(_TYPE) <<$(ECHO_RSP)
  7937. $(ECHO_MSG) /EP $<
  7938. <<$(BUILD_NOKEEP)
  7939.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7940. $(CPPXX: =
  7941. )
  7942. <<$(BUILD_NOKEEP)
  7943.  
  7944. !endif
  7945.  
  7946. !if !$(USE_OBJECT_ROOT)
  7947.  
  7948. {}.def{$O}.def:
  7949.     @$(_TYPE) <<$(ECHO_RSP)
  7950. $(ECHO_MSG) /EP $<
  7951. <<$(BUILD_NOKEEP)
  7952.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7953. $(CPPXX: =
  7954. )
  7955. <<$(BUILD_NOKEEP)
  7956.  
  7957. !endif
  7958.  
  7959. !if $(USE_OBJECT_ROOT)
  7960.  
  7961. {}.def{$(OBJ_PATH)\$O}.def:
  7962.     @$(_TYPE) <<$(ECHO_RSP)
  7963. $(ECHO_MSG) /EP $<
  7964. <<$(BUILD_NOKEEP)
  7965.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7966. $(CPPXX: =
  7967. )
  7968. <<$(BUILD_NOKEEP)
  7969.  
  7970. !endif
  7971.  
  7972. !if !$(USE_OBJECT_ROOT)
  7973.  
  7974. # one more level down for HALS
  7975. {..\..\}.src{$O}.def:
  7976.     @$(_TYPE) <<$(ECHO_RSP)
  7977. $(ECHO_MSG) /EP $<
  7978. <<$(BUILD_NOKEEP)
  7979.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7980. $(CPPXX: =
  7981. )
  7982. <<$(BUILD_NOKEEP)
  7983.  
  7984. !endif
  7985.  
  7986. !if $(USE_OBJECT_ROOT)
  7987.  
  7988. {..\..\}.src{$(OBJ_PATH)\$O}.def:
  7989.     @$(_TYPE) <<$(ECHO_RSP)
  7990. $(ECHO_MSG) /EP $<
  7991. <<$(BUILD_NOKEEP)
  7992.     @$(C_PREPROCESSOR_NAME) @<<$(CL_RSP) /Tc$< > $@
  7993. $(CPPXX: =
  7994. )
  7995. <<$(BUILD_NOKEEP)
  7996.  
  7997. !endif
  7998.  
  7999. !ifdef NO_BROWSER_FILE
  8000. BROWSERFILE=
  8001. !else
  8002. ! ifdef BROWSER_INFO
  8003. !  ifndef BROWSERFILE
  8004. !   if "$(TARGETNAME)" == ""
  8005. BROWSERFILE=
  8006. !   else
  8007. BROWSERFILE=$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).bsc
  8008. !   endif
  8009. !  endif
  8010. ! else
  8011. BROWSERFILE=
  8012. ! endif
  8013. !endif
  8014.  
  8015. !if defined (USE_LINT) && ("$(LINT_TYPE)" != "all")
  8016.  
  8017. !if $(USE_OBJECT_ROOT)
  8018.  
  8019. {}.cxx{$(OBJ_PATH)\$O}.lob:
  8020. ! if "$(LINT_TYPE)" != "lob"
  8021.     @echo done >$@
  8022. ! endif
  8023.     $(LINT_CMD) $<
  8024.  
  8025. {$(TARGET_DIRECTORY)}.cxx{$(OBJ_PATH)\$O}.lob:
  8026. ! if "$(LINT_TYPE)" != "lob"
  8027.     @echo done >$@
  8028. ! endif
  8029.     $(LINT_CMD) $<
  8030.  
  8031. {..}.cxx{$(OBJ_PATH)\$O}.lob:
  8032. ! if "$(LINT_TYPE)" != "lob"
  8033.     @echo done >$@
  8034. ! endif
  8035.     $(LINT_CMD) $<
  8036.  
  8037. {..\$(TARGET_DIRECTORY)}.cxx{$(OBJ_PATH)\$O}.lob:
  8038. ! if "$(LINT_TYPE)" != "lob"
  8039.     @echo done >$@
  8040. ! endif
  8041.     $(LINT_CMD) $<
  8042.  
  8043. {}.cpp{$(OBJ_PATH)\$O}.lob:
  8044. ! if "$(LINT_TYPE)" != "lob"
  8045.     @echo done >$@
  8046. ! endif
  8047.     $(LINT_CMD) $<
  8048.  
  8049. {$(TARGET_DIRECTORY)}.cpp{$(OBJ_PATH)\$O}.lob:
  8050. ! if "$(LINT_TYPE)" != "lob"
  8051.     @echo done >$@
  8052. ! endif
  8053.     $(LINT_CMD) $<
  8054.  
  8055. {..}.cpp{$(OBJ_PATH)\$O}.lob:
  8056. ! if "$(LINT_TYPE)" != "lob"
  8057.     @echo done >$@
  8058. ! endif
  8059.     $(LINT_CMD) $<
  8060.  
  8061. {..\$(TARGET_DIRECTORY)}.cpp{$(OBJ_PATH)\$O}.lob:
  8062. ! if "$(LINT_TYPE)" != "lob"
  8063.     @echo done >$@
  8064. ! endif
  8065.     $(LINT_CMD) $<
  8066.  
  8067. {}.c{$(OBJ_PATH)\$O}.lob:
  8068. ! if "$(LINT_TYPE)" != "lob"
  8069.     @echo done >$@
  8070. ! endif
  8071.     $(LINT_CMD) $<
  8072.  
  8073. {$(TARGET_DIRECTORY)}.c{$(OBJ_PATH)\$O}.lob:
  8074. ! if "$(LINT_TYPE)" != "lob"
  8075.     @echo done >$@
  8076. ! endif
  8077.     $(LINT_CMD) $<
  8078.  
  8079. {..}.c{$(OBJ_PATH)\$O}.lob:
  8080. ! if "$(LINT_TYPE)" != "lob"
  8081.     @echo done >$@
  8082. ! endif
  8083.     $(LINT_CMD) $<
  8084.  
  8085. {..\$(TARGET_DIRECTORY)}.c{$(OBJ_PATH)\$O}.lob:
  8086. ! if "$(LINT_TYPE)" != "lob"
  8087.     @echo done >$@
  8088. !endif
  8089.     $(LINT_CMD) $<
  8090.  
  8091. !endif
  8092. !endif
  8093.  
  8094.  
  8095. #
  8096. # Standard list of targets: all. all is the default target.
  8097. #
  8098.  
  8099. !IFNDEF PASS0ONLY
  8100. all: \
  8101. !if !defined(BUILD_PASS_INDEPENDENT)
  8102.         PassIndependentTargets_Infs \
  8103.         PassIndependentTargets_Binplace \
  8104. !endif
  8105.         $(OBJ_PATH)\$O\_objects.mac \
  8106.         $(OBJ_PATH)\$O\_objects.mac.verify.$(BUILD_PASS).mac \
  8107. ! ifdef DO_LANGUAGE_NEUTRAL
  8108.         $(RC_CONFIG_OBJ1) \
  8109. !   ifdef DELTA_RC_CONFIG
  8110.         $(RC_CONFIG_OBJ2) \
  8111. !   endif
  8112. ! endif
  8113. !ifdef _ASSEMBLY_IDENTITY
  8114.         $(OBJ_PATH)\$O\_asmid.inc \
  8115.         $(OBJ_PATH)\$O\_asmid.xml \
  8116. !endif
  8117.         $(_O_BINARY_METADATA) \
  8118.         $(NTTARGETFILE0)  \
  8119. # Support to compile licensing manifest
  8120. !if defined(SLS_LICENSING_MANIFEST)
  8121.         $(SLS_LICENSING_TARGETS) \
  8122. !endif
  8123. !if !defined(BUILD_PASS_INDEPENDENT)
  8124.         PassIndependentTargets_Manifests \
  8125. !endif
  8126.         $(WPP_TARGETS) \
  8127.         $(PASS0_OBJECTS) \
  8128. !if defined(EVENTS_MANIFEST)
  8129.         $(OBJ_PATH)\$O\_event_manifests \
  8130. !endif
  8131.         _concurrent_midl_join \
  8132.         PASS0_Pub    \
  8133.         PASS0_Binp   \
  8134.         $(PRECOMPILED_TARGET) \
  8135.         $(HEADEROBJNAME) \
  8136. !if "$(XAML_COMPILATION)" == "1"
  8137.         build_xaml  \
  8138. !endif
  8139. !if defined(COMPILE_RESOURCES_IN_PASS1) \
  8140.         || ("$(TARGETTYPE)" != "DYNLINK" \
  8141.             && "$(TARGETTYPE)" != "EXPORT_DRIVER" \
  8142.             && "$(TARGETTYPE)" != "PROGLIB")
  8143.         $(_RES_FILE) \
  8144. !endif
  8145.         build_objects \
  8146.         $(SXS_MANIFEST_OBJ1) \
  8147.         $(SXS_MANIFEST_OBJ2) \
  8148.         $(SXS_PDB_NAMER) \
  8149.         $(TARGETLOBFILES1) \
  8150.         $(TARGETLIBFILES) \
  8151.         $(NTTARGETFILE1)  \
  8152. !if defined(DO_LANGUAGE_NEUTRAL) && !defined(NOLINK) && "$(MYMUILINK)" != "" && "$(TARGET)" != ""
  8153.         $(TARGET).mui \
  8154. !endif
  8155. !if  defined(DO_LSBUILD) && !defined(NOLINK) && "$(LCG_DEPEND)" != ""
  8156.         $(LCG_TARGET) \
  8157. ! endif
  8158.         $(TARGETEXEFILES) \
  8159.         $(BROWSERFILE)   \
  8160.         $(TARGETLOBFILES2) \
  8161.         PASS1_Pub     \
  8162.         PASS1_Binp   \
  8163.         build_umobjects \
  8164. !ifndef NOLINK
  8165.         $(UMEXEFILES) \
  8166. !endif
  8167.         $(NTTARGETFILES) \
  8168. !if "$(BUILD_PASS)" == "PASS2" || "$(BUILD_PASS)" == "PASSALL"
  8169.         $(NTTARGETFILE2) \
  8170. !endif
  8171. !if !defined(NOLINK)
  8172. !endif
  8173. !if ("$(MAKEDLL)" != "" && !defined(NOLINK))
  8174.         $(_O_ASMMETA) \
  8175. !else
  8176. !  if "$(ASMMETA_INPUT)" != "" && "$(TARGETTYPE)" == "NOTARGET"
  8177. !    if exist($(ASMMETA_INPUT))
  8178.         $(_O_ASMMETA) \
  8179. !    endif
  8180. !  endif
  8181. !endif
  8182.         PASS2_Binp    \
  8183.         $(SN_SIGN_SPEC) \
  8184. !if defined(BOOT_SIGN_SPEC)
  8185. !  if "$(BUILD_PASS)" == "PASS2"
  8186.         $(BOOT_SIGN_SPEC) \
  8187. !  else
  8188. !    if defined(BOOT_LOADER_CRITICAL_MISC_FILES) && "$(BUILD_PASS)" == "PASS1"
  8189.         $(BOOT_SIGN_SPEC) \
  8190. !    endif
  8191. !  endif
  8192. !endif
  8193. !if defined(WDK_MANIFEST_NAME)
  8194. !   if "$(BUILD_PASS)" == "PASS2"
  8195.         $(WDK_MANIFEST_NAME) \
  8196. !   else if "$(TARGETTYPE)" == "NOTARGET" && (defined(WDKMSI) || defined(WDKFCI) || defined(WDKLCI) || defined(WDKFILES) || defined(WDKSXE) || defined(WDKBIND) || defined(WDKUI) || defined(WDKWIX) || defined(WDKUPDATE))
  8197.         $(WDK_MANIFEST_NAME) \
  8198. !   else if ("$(TARGETTYPE)" == "LIBRARY" || ("$(TARGETTYPE)" == "DYNLINK" && "$(MANAGED_CODE)" == "1")) && "$(BUILD_PASS)" == "PASS1" && defined(WDKMSI) && !defined(PASS2_BINPLACE)
  8199.         $(WDK_MANIFEST_NAME) \
  8200. !   endif
  8201. !endif
  8202.         $(_OUTPUT_MANIFEST) \
  8203. # These are very special macros that are created based on the pass currently running
  8204. # and the content of the PASS# variants of each macro. The code block we run in each
  8205. # pass is identical and they never run at the same time, so this enables us to
  8206. # re-use as much of the infrastructure as possible.
  8207.         $(LANG_MISCFILES_LOG) \
  8208.         $(LOC_MISCFILES_LOG) \
  8209.         $(LOC_MUI_MISCFILES_LOG) \
  8210.         $(PRELOC_MISCFILES_LOG) \
  8211.         $(PRELOC_MUI_MISCFILES_LOG) \
  8212.         $(PRELOC_MUI_ONLY_MISCFILES_LOG) \
  8213.         $(MULTI_MISCFILES_LOG) \
  8214.         $(MULTI_MUI_MISCFILES_LOG) \
  8215.         $(LOC_PLA_XML_FILES_LOG) \
  8216. !if "$(BUILD_PASS)" == "PASS1"
  8217. # Special target for binplacing Perf Counter files.
  8218. ! ifdef LOC_PERF_COUNTERS
  8219.         binplace_loc_perf_counters \
  8220. ! endif
  8221. # Special target for binplacing MSC files.
  8222. ! ifdef LOC_MSC_FILES
  8223.         binplace_loc_msc_files \
  8224. ! endif
  8225. !endif
  8226. !if !$(MISCFILES_DURING_LINK) || !defined(NOLINK)
  8227. ! if "$(MISCFILES: =)" != "" || defined(SXS_MISCFILES) || "$(_O_SXS_RESOURCES_MANIFEST)" != ""
  8228.         $(MISCFILES) \
  8229.         $(SXS_MISCFILES) \
  8230.         $(_O_SXS_RESOURCES_MANIFEST) \
  8231. !  ifdef _NTTREE
  8232.         binplace_miscfiles \
  8233. !  endif
  8234. ! endif
  8235. # Generate the files to binplace so that if they need to be built,
  8236. # nmake knows to build these files _before_ processing the macros.
  8237.         $(LANG_MISCFILES) \
  8238.         $(LOC_MISCFILES) \
  8239.         $(LOC_MUI_MISCFILES) \
  8240.         $(PRELOC_MISCFILES) \
  8241.         $(PRELOC_MUI_MISCFILES) \
  8242.         $(PRELOC_MUI_ONLY_MISCFILES) \
  8243.         $(MULTI_MISCFILES) \
  8244.         $(MULTI_MUI_MISCFILES) \
  8245. !endif
  8246. !ifdef _RUN_SXS_LOG_CMD
  8247.         sxs_log_cmd \
  8248. !endif
  8249.         BINARY_Pub  \
  8250. !if defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES)
  8251.         $(OBJ_PATH)\$O\_keyfile.al \
  8252.         $(OBJ_PATH)\$O\$(TARGETNAME).resources.dll \
  8253. !endif
  8254.  
  8255.  
  8256. !if defined(_O_SXS_RESOURCES_MANIFEST)
  8257.  
  8258. $(_O_SXS_RESOURCES_MANIFEST):
  8259.     set BUILDMSG=making $(@F)
  8260.     -$(_DEL)
  8261.     set createfile=<<$@.temp
  8262. <assembly
  8263.     xmlns="urn:schemas-microsoft-com:asm.v1"
  8264.     manifestVersion="1.0"
  8265.     >
  8266.     <assemblyIdentity
  8267.         type="win32"
  8268.         name="$(SXS_ASSEMBLY_NAME).Resources"
  8269.         version="$(SXS_ASSEMBLY_FULL_VERSION)"
  8270.         processorArchitecture="$(SXS_PROCESSOR_ARCHITECTURE)"
  8271.         publicKeyToken="6595b64144ccf1df"
  8272.     />
  8273.     <file name="$(TARGETNAME).$(TARGETEXT).mui"/>
  8274.     <memberships xmlns="urn:schemas-microsoft-com:asm.v3">
  8275.         <categoryMembership>
  8276.             <id
  8277.                 name="Microsoft.Windows.Fusion_Components_All"
  8278.                 version="$(VER_PRODUCTVERSION_STR)"
  8279.                 processorArchitecture="$(SXS_PROCESSOR_ARCHITECTURE)"
  8280.                 language="neutral"
  8281.                 buildType="$(MANIFEST_BUILD_TYPE)"
  8282.                 publicKeyToken="1122334455667788"
  8283.             />
  8284.         </categoryMembership>
  8285.     </memberships>
  8286. </assembly>
  8287. <<Keep
  8288.     $(_MOVE)
  8289.  
  8290. !endif
  8291.  
  8292. # make a target that always build
  8293. sxs_log_cmd:
  8294.     $(SXS_LOG_CMD)
  8295.  
  8296.  
  8297.  
  8298. binplace_miscfiles: $(MISCFILES) $(SXS_MISCFILES) $(_O_SXS_RESOURCES_MANIFEST)
  8299. !ifndef NO_BINPLACE
  8300.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  8301. $(MAKEDIR) BINPLACE_MISCFILES=$**
  8302. <<$(BUILD_NOKEEP)
  8303.     $(MAKE_PLACEFILE_CMD)
  8304.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) @<<$(BINPLACE_RESPONSE_FILE)
  8305. $**
  8306. <<$(BUILD_NOKEEP)
  8307. !endif
  8308.  
  8309. # These are special in that we binplace the files specified to two destinations -
  8310. # one language neutral and one language specific. We also create LCG files for them
  8311. # so that the language specific files can be localized. This is all done to support
  8312. # the legacy performance counter infrastrusture where English is assumed to be the
  8313. # neutral/default stuff all rolled into one file.
  8314. binplace_loc_perf_counters: $(LOC_PERF_COUNTERS)
  8315. !ifndef NO_BINPLACE
  8316.     @$(_TYPE) <<$(BINPLACE_RESPONSE_FILE)
  8317. $(MAKEDIR) BINPLACE_LOC_PERF_COUNTERS=$**
  8318. <<$(BUILD_NOKEEP)
  8319.     $(_PERL) $(RAZZLETOOLPATH)\VerifyUnicode.pl -files:<<$(PERL_RESPONSE_FILE)
  8320. $**
  8321. <<$(BUILD_NOKEEP)
  8322.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST $(LOC_PERF_COUNTERS_TARGET_DESTINATION):$(PERF_COUNTERS_TARGET_DESTINATION) @<<$(BINPLACE_RESPONSE_FILE)
  8323. $**
  8324. <<$(BUILD_NOKEEP)
  8325. !endif
  8326. # LOC_PERF_COUNTERS always runs regardless of BUILD_LCG or it's cousins
  8327. !if "$(DO_LSBUILD)" == "1"
  8328.     set BUILDMSG=making LOC_PERF_COUNTERS with CreateLCGFile.pl
  8329.     set createfile=<<$(OBJ_PATH)\$O\loc_perf_counters.lcg.lst
  8330. $(**: =
  8331. )
  8332. <<Keep
  8333. ! ifndef NO_BINPLACE
  8334.      set createfile=<<$(OBJ_PATH)\$O\loc_perf_counters.lcg.binplace.txt
  8335. $(BINPLACE_FLAGS) /:DEST $(LOC_PERF_COUNTERS_TARGET_DESTINATION)
  8336. <<Keep
  8337. ! endif # NO_BINPLACE
  8338.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8339.         /m:$(OBJ_PATH)\$O\loc_perf_counters.lcg.lst \
  8340.         /t:$(OBJ_PATH)\$O \
  8341.         $(LSBUILD_PARSER_ID_OPTION) \
  8342.         $(ALT_LCI_DIR_OPTION) \
  8343.         /l:$(LANGUAGE) \
  8344.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8345.         /unicode \
  8346. ! ifndef NO_BINPLACE
  8347.         /b:$(OBJ_PATH)\$O\loc_perf_counters.lcg.binplace.txt \
  8348.         /r:$(LCG_BINPLACE_TARGET) \
  8349. ! endif # NO_BINPLACE
  8350.         $(LSBUILD_LCE_OPTION)
  8351. !endif # DO_LSBUILD
  8352.  
  8353.  
  8354.  
  8355. # These are special in that we binplace the files specified to two destinations -
  8356. # one language neutral and one language specific. We also create LCG files for them
  8357. # so that the language specific files can be localized. This is all done to support
  8358. # the legacy MSC files we have to ship but cannot change the format of - and where English
  8359. # is assumed to be the neutral/default stuff all rolled into one file.
  8360. binplace_loc_msc_files: $(LOC_MSC_FILES)
  8361. !ifndef NO_BINPLACE
  8362.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  8363. $(MAKEDIR) BINPLACE_LOC_MSC_FILES=$**
  8364. <<$(BUILD_NOKEEP)
  8365.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST $(LOC_MSC_FILES_TARGET_DESTINATION):$(MSC_FILES_TARGET_DESTINATION) @<<$(BINPLACE_RESPONSE_FILE)
  8366. $**
  8367. <<$(BUILD_NOKEEP)
  8368. !endif
  8369. # LOC_MSC_FILES always runs regardless of BUILD_LCG or it's cousins
  8370. !if "$(DO_LSBUILD)" == "1"
  8371.     set BUILDMSG=making LOC_MSC_FILES with CreateLCGFile.pl
  8372.     set createfile=<<$(OBJ_PATH)\$O\loc_msc_files.lcg.lst
  8373. $(**: =
  8374. )
  8375. <<Keep
  8376. ! ifndef NO_BINPLACE
  8377.      set createfile=<<$(OBJ_PATH)\$O\loc_msc_files.lcg.binplace.txt
  8378. $(BINPLACE_FLAGS) /:DEST $(LOC_MSC_FILES_TARGET_DESTINATION)
  8379. <<Keep
  8380. ! endif # NO_BINPLACE
  8381.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8382.         /m:$(OBJ_PATH)\$O\loc_msc_files.lcg.lst \
  8383.         /t:$(OBJ_PATH)\$O \
  8384.         $(LSBUILD_PARSER_ID_OPTION) \
  8385.         $(ALT_LCI_DIR_OPTION) \
  8386.         /l:$(LANGUAGE) \
  8387.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8388. ! ifndef NO_BINPLACE
  8389.         /b:$(OBJ_PATH)\$O\loc_msc_files.lcg.binplace.txt \
  8390.         /r:$(LCG_BINPLACE_TARGET) \
  8391. ! endif # NO_BINPLACE
  8392.         $(LSBUILD_LCE_OPTION)
  8393. !endif # DO_LSBUILD
  8394.  
  8395.  
  8396. # LOC_PLA_XML_FILES need to be binplaced and run through SplitStrings.js to create a
  8397. # language specific .plaxml file which also needs to be binplaced. We also need to
  8398. # create and binplace an LCG for the language specific .plaxml file we created.
  8399. # $? is the files with a later timestamp than $(LOC_PLA_XML_FILES_LOG)
  8400. # $(LOC_PLA_XML_FILES_LOG) is the list of files that were processed, binplaced,
  8401. # and had LCG files generated for them.
  8402. !if defined(LOC_PLA_XML_FILES_LOG)
  8403. $(LOC_PLA_XML_FILES_LOG): $(LOC_PLA_XML_FILES)
  8404.      set createfile=<<$(LOC_PLA_XML_FILES_LOG)
  8405. $?
  8406. <<Keep
  8407.      $(_PERL) $(RAZZLETOOLPATH)\SplitPlaXmlStrings.pl \
  8408.         /i:$(LOC_PLA_XML_FILES_LOG) \
  8409.         /o:$(LOC_PLA_XML_FILES_RESOURCE_LIST) \
  8410.         /d:$(OBJ_PATH)\$O
  8411. ! ifndef NO_BINPLACE
  8412.      $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) @$(LOC_PLA_XML_FILES_LOG)
  8413.      $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) /R $(_NTTREE)\$(LOC_BIN) @$(LOC_PLA_XML_FILES_RESOURCE_LIST)
  8414. ! endif
  8415. # LOC_PLA_XML_FILES always runs regardless of BUILD_LCG or it's cousins
  8416. ! if "$(DO_LSBUILD)" == "1"
  8417.      set BUILDMSG=making LOC_PLA_XML_FILES with CreateLCGFile.pl
  8418.      set createfile=<<$(OBJ_PATH)\$O\loc_pla_xml_files.lcg.lst
  8419. $(?:.xml=.plaxml)
  8420. <<Keep
  8421. !  ifndef NO_BINPLACE
  8422.      set createfile=<<$(LOC_PLA_XML_FILES_LCG_BINPLACE_TXT)
  8423. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8424. <<Keep
  8425. !  endif # NO_BINPLACE
  8426.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8427.         /m:$(LOC_PLA_XML_FILES_RESOURCE_LIST) \
  8428.         /t:$(OBJ_PATH)\$O \
  8429.         $(LSBUILD_PARSER_ID_OPTION) \
  8430.         $(ALT_LCI_DIR_OPTION) \
  8431.         /l:$(LANGUAGE) \
  8432.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8433. !  ifndef NO_BINPLACE
  8434.         /b:$(LOC_PLA_XML_FILES_LCG_BINPLACE_TXT) \
  8435.         /r:$(LCG_BINPLACE_TARGET) \
  8436. !  endif # NO_BINPLACE
  8437.         $(LSBUILD_LCE_OPTION)
  8438. ! endif # DO_LSBUILD
  8439. !endif # LOC_PLA_XML_FILES_LOG
  8440.  
  8441. build_objects: $(TARGETOBJFILES)
  8442.  
  8443. build_umobjects: $(UMOBJFILES)
  8444.  
  8445. !ELSE   # PASS0ONLY
  8446.  
  8447. all: \
  8448. !if !defined(BUILD_PASS_INDEPENDENT)
  8449.         PassIndependentTargets_Infs \
  8450.         PassIndependentTargets_Binplace \
  8451. !endif
  8452.         $(OBJ_PATH)\$O\_objects.mac.verify.$(BUILD_PASS).mac \
  8453. !ifdef _ASSEMBLY_IDENTITY
  8454.         $(OBJ_PATH)\$O\_asmid.inc \
  8455.         $(OBJ_PATH)\$O\_asmid.xml \
  8456. !endif
  8457.         $(_O_BINARY_METADATA) \
  8458.         $(NTTARGETFILE0)  \
  8459. # Support to compile licensing manifest
  8460. !if defined(SLS_LICENSING_MANIFEST)
  8461.         $(SLS_LICENSING_TARGETS) \
  8462. !endif
  8463. !if !defined(BUILD_PASS_INDEPENDENT)
  8464.         $(SOURCE_MANIFEST) \
  8465.         $(WOW64_SOURCE_MANIFEST) \
  8466.         $(MULTI_SOURCE_MANIFEST) \
  8467.         $(MULTI_WOW64_SOURCE_MANIFEST) \
  8468.         $(PROD_SOURCE_MANIFEST) \
  8469.         $(PROD_WOW64_SOURCE_MANIFEST) \
  8470.         $(INTERNAL_SOURCE_MANIFEST) \
  8471.         $(INTERNAL_WOW64_SOURCE_MANIFEST) \
  8472.         $(EDITION_SOURCE_MANIFEST) \
  8473.         $(WINPE_SOURCE_MANIFEST) \
  8474. !endif
  8475.         $(WPP_TARGETS) \
  8476.         $(PASS0_OBJECTS) \
  8477. !if defined(EVENTS_MANIFEST)
  8478.         $(OBJ_PATH)\$O\_event_manifests \
  8479. !endif
  8480. !if defined(COUNTERS_MANIFEST)
  8481.         BUILD_COUNTERS_MANIFEST \
  8482. !endif
  8483. !if defined(WSUTIL_METADATA)
  8484.         WSUTIL \
  8485. !endif
  8486. ! ifdef DO_LANGUAGE_NEUTRAL
  8487.         $(RC_CONFIG_OBJ1) \
  8488. !   ifdef DELTA_RC_CONFIG
  8489.         $(RC_CONFIG_OBJ2) \
  8490. !   endif
  8491. ! endif
  8492. # These are very special macros that are created based on the pass currently running
  8493. # and the content of the PASS# variants of each macro. The code block we run in each
  8494. # pass is identical and they never run at the same time, so this enables us to
  8495. # re-use as much of the infrastructure as possible.
  8496.         $(LANG_MISCFILES_LOG) \
  8497.         $(LOC_MISCFILES_LOG) \
  8498.         $(LOC_MUI_MISCFILES_LOG) \
  8499.         $(PRELOC_MISCFILES_LOG) \
  8500.         $(PRELOC_MUI_MISCFILES_LOG) \
  8501.         $(PRELOC_MUI_ONLY_MISCFILES_LOG) \
  8502.         $(MULTI_MISCFILES_LOG) \
  8503.         $(MULTI_MUI_MISCFILES_LOG) \
  8504.     _concurrent_midl_join \
  8505.     PASS0_Pub \
  8506.     PASS0_Binp \
  8507. !if "$(XAML_COMPILATION)" == "1"
  8508.     build_xaml  \
  8509. !endif
  8510. !if defined(RESGEN_SOURCES)
  8511.     PASS0_Resgen \
  8512. !endif
  8513.  
  8514. !ENDIF  # PASS0ONLY
  8515.  
  8516. _concurrent_midl_join:
  8517. !if defined(_CONCURRENT_MIDL_JOIN)
  8518.     set BUILDMSG=waiting for asynchronous midl
  8519.     $(_CONCURRENT_MIDL_JOIN)
  8520. !endif
  8521.  
  8522. #
  8523. # temporary to validate changes in build.exe
  8524. #
  8525. $(OBJ_PATH)\$O\_objects.mac.verify.$(BUILD_PASS).mac:
  8526. !if 0
  8527.     <<$@.cmd
  8528.         if not exist $(OBJ_PATH)\$O\_objects.mac goto :eof
  8529.         $(_COPYFILE) /y $(OBJ_PATH)\$O\_objects.mac $@
  8530.         for %%a in ($(OBJ_PATH)\$O\_objects.mac.verify.*.mac) do (diff $(OBJ_PATH)\$O\_objects.mac %%a > $@.diff || $(_PERL) -pi -e "s/^(.)/$(@F) : error \1/g" < $@.diff)
  8531. <<Keep
  8532. !endif
  8533.  
  8534. $(OBJ_PATH)\$O\_objects.mac: $(SOURCES_USED)
  8535.     @echo Rebuilding $@ $(SOURCES_USED).
  8536.     @build /O /Z /f /$(TARGET_DIRECTORY:i386=x86)
  8537.     @if exist $@ @echo nmake : error: $@ was changed during the build process and the build results may not be valid. Please re-build this directory.
  8538. # The following line is intended to produce an error -- access denied.
  8539.     @if exist $@ mkdir \ 2>nul
  8540.  
  8541.  
  8542. #
  8543. # LANG_MISCFILES support
  8544. #
  8545. # These are files that are "language specific but not localizable". They need
  8546. # to be in the language pack but do not need to be localized. We just binplace
  8547. # the files as-is. No MUI splitting needs needs to be done on these files.
  8548. #
  8549. !if defined(LANG_MISCFILES_LOG)
  8550. $(LANG_MISCFILES_LOG): $(LANG_MISCFILES)
  8551. # $? is the files with a later timestamp than $(LANG_MISCFILES_LOG)
  8552. # $(LANG_MISCFILES_LOG) is the list of files that were binplaced.
  8553.      set createfile=<<$(LANG_MISCFILES_LOG)
  8554. $?
  8555. <<Keep
  8556. ! ifndef NO_BINPLACE
  8557.      $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) /R $(_NTTREE)\$(LOC_BIN) @$(LANG_MISCFILES_LOG)
  8558. ! endif
  8559. !endif # LANG_MISCFILES_LOG
  8560.  
  8561.  
  8562. #
  8563. # LOC_MISCFILES support
  8564. #
  8565. # These are files that need to be localized so we just need to create an LCG
  8566. # for them and then binplace the file and the LCG files. No MUI splitting needs
  8567. # needs to be done on these files. This is typically done on checked in files
  8568. # or on files generated by other directories where you are using the proper
  8569. # cross-directory syncronization to make this directory/operation happen last.
  8570. #
  8571. !if defined(LOC_MISCFILES_LOG)
  8572. $(LOC_MISCFILES_LOG): $(LOC_MISCFILES)
  8573. # $? is the files with a later timestamp than $(LOC_MISCFILES_LOG)
  8574. # $(LOC_MISCFILES_LOG) is the list of files that were split, binplaced,
  8575. # and had LCG files generated for them.
  8576.      set createfile=<<$(LOC_MISCFILES_LOG)
  8577. $?
  8578. <<Keep
  8579. ! ifndef NO_BINPLACE
  8580.      $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) /R $(_NTTREE)\$(LOC_BIN) @$(LOC_MISCFILES_LOG)
  8581. ! endif
  8582. ! if "$(DO_LSBUILD)" == "1"
  8583. !  ifndef NO_BINPLACE
  8584.      set BUILDMSG=making $(BUILD_PASS)_LOC_MISCFILES with CreateLCGFile.pl
  8585.      set createfile=<<$(LOC_MISCFILES_LCG_BINPLACE_TXT)
  8586. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8587. <<Keep
  8588. !  endif # NO_BINPLACE
  8589.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8590.         /m:$(LOC_MISCFILES_LOG) \
  8591.         /t:$(OBJ_PATH)\$O \
  8592.         $(LSBUILD_PARSER_ID_OPTION) \
  8593.         $(ALT_LCI_DIR_OPTION) \
  8594.         /l:$(LANGUAGE) \
  8595.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8596. !  ifndef NO_BINPLACE
  8597.         /b:$(LOC_MISCFILES_LCG_BINPLACE_TXT) \
  8598.         /r:$(LCG_BINPLACE_TARGET) \
  8599. !  endif # NO_BINPLACE
  8600.         $(LSBUILD_LCE_OPTION)
  8601. ! endif # DO_LSBUILD
  8602. !endif # LOC_MISCFILES_LOG
  8603.  
  8604.  
  8605. #
  8606. # LOC_MUI_MISCFILES support
  8607. #
  8608. # These are similar to LOC_MISCFILES, but we need to do MUI splitting on these files
  8609. # first, then binplace both of the resulting files, and then create LCG files
  8610. # for each of the resulting MUI files. This is typically done on checked in files
  8611. # or on files generated by other directories where you are using the proper
  8612. # cross-directory syncronization to make this directory/operation happen last.
  8613. #
  8614. !if defined(LOC_MUI_MISCFILES_LOG)
  8615. $(LOC_MUI_MISCFILES_LOG): $(LOC_MUI_MISCFILES)
  8616. # $? is the files with a later timestamp than $(LOC_MUI_MISCFILES_LOG)
  8617. # $(LOC_MUI_MISCFILES_LOG) is the list of files that were split, binplaced,
  8618. # and had LCG files generated for them.
  8619.      set createfile=<<$(LOC_MUI_MISCFILES_LOG)
  8620. $?
  8621. <<Keep
  8622.     $(_PERL) $(RAZZLETOOLPATH)\SplitMiscFiles.pl \
  8623. !if defined(BINPLACE_NO_SYMCHK) || defined(NO_BINPLACE)
  8624.         /nosym \
  8625. !endif
  8626.         /i:$(LOC_MUI_MISCFILES_LOG) \
  8627.         /n:$(LOC_MUI_MISCFILES_NEUTRAL_LIST) \
  8628.         /r:$(LOC_MUI_MISCFILES_RESOURCE_LIST) \
  8629.         /m:"$(LANGUAGE_NEUTRAL_RESOURCE_MUIRCT)" \
  8630.         /t:$(OBJ_PATH)\$O
  8631. ! ifndef NO_BINPLACE
  8632.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  8633. !  if "$(LOCALIZE_BASE_FILE)" == "1"
  8634.     /R $(_NTTREE)\$(LOC_MULTI) \
  8635. !  endif # LOCALIZE_BASE_FILE
  8636.     @$(LOC_MUI_MISCFILES_NEUTRAL_LIST)
  8637.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  8638.     -G5 $(LANGUAGE_NEUTRAL_RESDIR) @$(LOC_MUI_MISCFILES_RESOURCE_LIST)
  8639. ! endif # NO_BINPLACE
  8640. ! if "$(DO_LSBUILD)" == "1"
  8641. !  ifndef NO_BINPLACE
  8642.      set BUILDMSG=making $(BUILD_PASS)_LOC_MUI_MISCFILES with CreateLCGFile.pl
  8643.      set createfile=<<$(LOC_MUI_MISCFILES_LCG_BINPLACE_TXT)
  8644. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8645. <<Keep
  8646. !  endif # NO_BINPLACE
  8647. !  if "$(LOCALIZE_BASE_FILE)" == "1"
  8648.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8649.         /m:$(LOC_MUI_MISCFILES_NEUTRAL_LIST) \
  8650.         /t:$(OBJ_PATH)\$O \
  8651.         $(LSBUILD_PARSER_ID_OPTION) \
  8652.         $(ALT_LCI_DIR_OPTION) \
  8653.         /l:$(LANGUAGE) \
  8654.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8655. !   ifndef NO_BINPLACE
  8656.         /b:$(LOC_MUI_MISCFILES_LCG_BINPLACE_TXT) \
  8657.         /r:$(LCG_BINPLACE_TARGET) \
  8658. !   endif # NO_BINPLACE
  8659.         $(LSBUILD_LCE_OPTION)
  8660. !  endif # LOCALIZE_BASE_FILE
  8661.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8662.         /m:$(LOC_MUI_MISCFILES_RESOURCE_LIST) \
  8663.         /t:$(OBJ_PATH)\$O \
  8664.         $(LSBUILD_PARSER_ID_OPTION) \
  8665.         $(ALT_LCI_DIR_OPTION) \
  8666.         /l:$(LANGUAGE) \
  8667.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8668. !  ifndef NO_BINPLACE
  8669.         /b:$(LOC_MUI_MISCFILES_LCG_BINPLACE_TXT) \
  8670.         /r:$(LCG_BINPLACE_TARGET) \
  8671. !  endif # NO_BINPLACE
  8672.         $(LSBUILD_LCE_OPTION)
  8673. ! endif # DO_LSBUILD
  8674. !endif # LOC_MUI_MISCFILES_LOG
  8675.  
  8676.  
  8677. #
  8678. # PRELOC_MISCFILES support
  8679. #
  8680. # These are similar to MISCFILES, except that they are pre-localized.
  8681. # This is typically done on checked in files that are already localized.
  8682. # We do not need to create an LCG file for these files.
  8683. #
  8684. !if defined(PRELOC_MISCFILES_LOG)
  8685. $(PRELOC_MISCFILES_LOG): $(PRELOC_MISCFILES)
  8686. # $? is the files with a later timestamp than $(PRELOC_MISCFILES_LOG)
  8687.      set createfile=<<$(PRELOC_MISCFILES_LOG)
  8688. $?
  8689. <<Keep
  8690. ! ifndef NO_BINPLACE
  8691.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) /R $(_NTTREE)\$(PRELOC_BINPLACE_DIR) @$(PRELOC_MISCFILES_LOG)
  8692. ! endif
  8693. !endif # PRELOC_MISCFILES_LOG
  8694.  
  8695.  
  8696. #
  8697. # PRELOC_MUI_MISCFILES support
  8698. #
  8699. # These are similar to MISCFILES, except that they are pre-localized and
  8700. # that they need to be MUI split and the resulting file + MUI file
  8701. # binplaced. This is typically done on checked in files that are already
  8702. # localized. We do not need to create an LCG file for these files.
  8703. #
  8704. !if defined(PRELOC_MUI_MISCFILES_LOG)
  8705. $(PRELOC_MUI_MISCFILES_LOG): $(PRELOC_MUI_MISCFILES)
  8706. # $? is the files with a later timestamp than $(PRELOC_MUI_MISCFILES_LOG)
  8707.      set createfile=<<$(PRELOC_MUI_MISCFILES_LOG)
  8708. $?
  8709. <<Keep
  8710.     $(_PERL) $(RAZZLETOOLPATH)\SplitMiscFiles.pl \
  8711. !if defined(BINPLACE_NO_SYMCHK) || defined(NO_BINPLACE)
  8712.         /nosym \
  8713. !endif
  8714.         /i:$(PRELOC_MUI_MISCFILES_LOG) \
  8715.         /n:$(PRELOC_MUI_MISCFILES_NEUTRAL_LIST) \
  8716.         /r:$(PRELOC_MUI_MISCFILES_RESOURCE_LIST) \
  8717.         /m:"$(LANGUAGE_NEUTRAL_RESOURCE_MUIRCT)" \
  8718.         /t:$(OBJ_PATH)\$O
  8719. ! ifndef NO_BINPLACE
  8720.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) @$(PRELOC_MUI_MISCFILES_NEUTRAL_LIST) \
  8721.     /R $(_NTTREE)\$(PRELOC_BINPLACE_DIR) @$(PRELOC_MUI_MISCFILES_RESOURCE_LIST)
  8722. ! endif
  8723. !endif # PRELOC_MUI_MISCFILES_LOG
  8724.  
  8725.  
  8726. #
  8727. # PRELOC_MUI_ONLY_MISCFILES support
  8728. #
  8729. # These are similar to MISCFILES, except that they are pre-localized and
  8730. # that they need to be MUI split - but only the resulting MUI file needs
  8731. # to be binplaced. This is typically done on checked in files that are
  8732. # already localized. We do not need to create an LCG file for these files.
  8733. #
  8734. !if defined(PRELOC_MUI_ONLY_MISCFILES_LOG)
  8735. $(PRELOC_MUI_ONLY_MISCFILES_LOG): $(PRELOC_MUI_ONLY_MISCFILES)
  8736. # $? is the files with a later timestamp than $(PRELOC_MUI_ONLY_MISCFILES_LOG)
  8737.      set createfile=<<$(PRELOC_MUI_ONLY_MISCFILES_LOG)
  8738. $?
  8739. <<Keep
  8740.     $(_PERL) $(RAZZLETOOLPATH)\SplitMiscFiles.pl \
  8741. !if defined(BINPLACE_NO_SYMCHK) || defined(NO_BINPLACE)
  8742.         /nosym \
  8743. !endif
  8744.         /i:$(PRELOC_MUI_ONLY_MISCFILES_LOG) \
  8745.         /n:$(PRELOC_MUI_ONLY_MISCFILES_NEUTRAL_LIST) \
  8746.         /r:$(PRELOC_MUI_ONLY_MISCFILES_RESOURCE_LIST) \
  8747.         /m:"$(LANGUAGE_NEUTRAL_RESOURCE_MUIRCT)" \
  8748.         /t:$(OBJ_PATH)\$O
  8749. ! ifndef NO_BINPLACE
  8750.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) /R $(_NTTREE)\$(PRELOC_BINPLACE_DIR) @$(PRELOC_MUI_ONLY_MISCFILES_RESOURCE_LIST)
  8751. ! endif
  8752. !endif # PRELOC_MUI_ONLY_MISCFILES_LOG
  8753.  
  8754.  
  8755. #
  8756. # Any localizable MISCFILES that need to go into the ML postbuild go into the
  8757. # MULTI_MISCFILES macro instead of the MISCFILES macro. Any files specified by
  8758. # MULTI_MISCFILES will have LCG files created for them by calling CreateLCGFile.pl
  8759. # for them, in addition to the binplacing of the files to %_NTTREE%\loc\src\multi.
  8760. # The resulting LCG file will be binplaced to %_NTTREE%\%LCG_BINPLACE_ROOT%, plus
  8761. # any additional relative destination path for the original file.
  8762. #
  8763. !if defined(MULTI_MISCFILES_LOG)
  8764. $(MULTI_MISCFILES_LOG): $(MULTI_MISCFILES)
  8765. # $? is the files with a later timestamp than $(MULTI_MISCFILES_LOG)
  8766. # $(MULTI_MISCFILES_LOG) is the list of files that were split, binplaced,
  8767. # and had LCG files generated for them.
  8768.      set createfile=<<$(MULTI_MISCFILES_LOG)
  8769. $?
  8770. <<Keep
  8771. ! ifndef NO_BINPLACE
  8772.      $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) /R $(_NTTREE)\$(LOC_MULTI) @$(MULTI_MISCFILES_LOG)
  8773. ! endif # NO_BINPLACE
  8774. ! if "$(DO_LSBUILD)" == "1"
  8775. !  ifndef NO_BINPLACE
  8776.      set BUILDMSG=making $(BUILD_PASS)_MULTI_MISCFILES with CreateLCGFile.pl
  8777.      set createfile=<<$(MULTI_MISCFILES_LCG_BINPLACE_TXT)
  8778. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8779. <<Keep
  8780. !  endif # NO_BINPLACE
  8781.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8782.         /m:$(MULTI_MISCFILES_LOG) \
  8783.         /t:$(OBJ_PATH)\$O \
  8784.         $(LSBUILD_PARSER_ID_OPTION) \
  8785.         $(ALT_LCI_DIR_OPTION) \
  8786.         /l:$(LANGUAGE) \
  8787.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8788. !  ifndef NO_BINPLACE
  8789.         /b:$(MULTI_MISCFILES_LCG_BINPLACE_TXT) \
  8790.         /r:$(LCG_BINPLACE_TARGET) \
  8791. !  endif # NO_BINPLACE
  8792.         $(LSBUILD_LCE_OPTION)
  8793. ! endif # DO_LSBUILD
  8794. !endif # MULTI_MISCFILES_LOG
  8795.  
  8796.  
  8797. #
  8798. # MULTI_MUI_MISCFILES support
  8799. #
  8800. # These are similar to MULTI_MISCFILES, but we need to do MUI splitting on these files
  8801. # first, then binplace both of the resulting files, and then create LCG files
  8802. # for each of the resulting MUI files. This is typically done on checked in files
  8803. # or on files generated by other directories where you are using the proper
  8804. # cross-directory syncronization to make this directory/operation happen last.
  8805. #
  8806. !if defined(MULTI_MUI_MISCFILES_LOG)
  8807. $(MULTI_MUI_MISCFILES_LOG): $(MULTI_MUI_MISCFILES)
  8808. # $? is the files with a later timestamp than $(MULTI_MUI_MISCFILES_LOG)
  8809. # $(MULTI_MUI_MISCFILES_LOG) is the list of files that were split, binplaced,
  8810. # and had LCG files generated for them.
  8811.      set createfile=<<$(MULTI_MUI_MISCFILES_LOG)
  8812. $?
  8813. <<Keep
  8814.     $(_PERL) $(RAZZLETOOLPATH)\SplitMiscFiles.pl \
  8815. !if defined(BINPLACE_NO_SYMCHK) || defined(NO_BINPLACE)
  8816.         /nosym \
  8817. !endif
  8818.         /i:$(MULTI_MUI_MISCFILES_LOG) \
  8819.         /n:$(MULTI_MUI_MISCFILES_NEUTRAL_LIST) \
  8820.         /r:$(MULTI_MUI_MISCFILES_RESOURCE_LIST) \
  8821.         /m:"$(LANGUAGE_NEUTRAL_RESOURCE_MUIRCT)" \
  8822.         /t:$(OBJ_PATH)\$O
  8823. ! ifndef NO_BINPLACE
  8824.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(BINPLACE_LC_MISCFLAGS) @$(MULTI_MUI_MISCFILES_NEUTRAL_LIST) \
  8825.         /R $(_NTTREE)\$(LOC_MULTI) @$(MULTI_MUI_MISCFILES_RESOURCE_LIST)
  8826. ! endif
  8827. ! if "$(DO_LSBUILD)" == "1"
  8828. !  ifndef NO_BINPLACE
  8829.      set BUILDMSG=making $(BUILD_PASS)_MULTI_MUI_MISCFILES with CreateLCGFile.pl
  8830.      set createfile=<<$(MULTI_MUI_MISCFILES_LCG_BINPLACE_TXT)
  8831. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8832. <<Keep
  8833. !  endif # NO_BINPLACE
  8834. !  if "$(LOCALIZE_BASE_FILE)" == "1"
  8835.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8836.         /m:$(MULTI_MUI_MISCFILES_NEUTRAL_LIST) \
  8837.         /t:$(OBJ_PATH)\$O \
  8838.         $(LSBUILD_PARSER_ID_OPTION) \
  8839.         $(ALT_LCI_DIR_OPTION) \
  8840.         /l:$(LANGUAGE) \
  8841.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8842. !   ifndef NO_BINPLACE
  8843.         /b:$(MULTI_MUI_MISCFILES_LCG_BINPLACE_TXT) \
  8844.         /r:$(LCG_BINPLACE_TARGET) \
  8845. !   endif # NO_BINPLACE
  8846.         $(LSBUILD_LCE_OPTION)
  8847. !  endif # LOCALIZE_BASE_FILE
  8848.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  8849.         /m:$(MULTI_MUI_MISCFILES_RESOURCE_LIST) \
  8850.         /t:$(OBJ_PATH)\$O \
  8851.         $(LSBUILD_PARSER_ID_OPTION) \
  8852.         $(ALT_LCI_DIR_OPTION) \
  8853.         /l:$(LANGUAGE) \
  8854.         /s:$(LSBUILD_PARSER_SETTINGS) \
  8855. !  ifndef NO_BINPLACE
  8856.         /b:$(MULTI_MUI_MISCFILES_LCG_BINPLACE_TXT) \
  8857.         /r:$(LCG_BINPLACE_TARGET) \
  8858. !  endif # NO_BINPLACE
  8859.         $(LSBUILD_LCE_OPTION)
  8860. ! endif # DO_LSBUILD
  8861. !endif # MULTI_MUI_MISCFILES_LOG
  8862.  
  8863. !endif
  8864.  
  8865. !ifdef NO_BINPLACE
  8866. PassIndependentTargets_Binplace:
  8867.  
  8868. PASS0_BINP:
  8869.  
  8870. PASS1_BINP:
  8871.  
  8872. PASS2_BINP:
  8873.  
  8874. !else
  8875. #
  8876. # TBD clean this up the way I had MikeR clean up his stuff -- move the per-pass macros
  8877. # into pass agnostic macros and then write the code just once.
  8878. #
  8879. # Other cleanup is needed here too.
  8880. #
  8881. PassIndependentTargets_Binplace:
  8882. !if (defined(PASS_INDEPENDENT_BINPLACE) || defined(DL_MANIFESTS) || defined(REPL_MANIFESTS)) && "$(BUILD_PASS)" != "PASS1" && "$(BUILD_PASS)" != "PASS2"
  8883. ! if defined(BUILD_DEBUG)
  8884.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  8885. $(MAKEDIR) PASS_INDEPENDENT_BINPLACE=$(PASS_INDEPENDENT_BINPLACE)
  8886. $(MAKEDIR) DL_MANIFESTS=$(DL_MANIFESTS)
  8887. $(MAKEDIR) MUI= $(MUI)
  8888. !  if "$(MUI)" == "0"
  8889. $(MAKEDIR) MUI_COMMENT= $(MUI_COMMENT)
  8890. !  endif
  8891. $(MAKEDIR) MISC_MUI_OFF= $(MISC_MUI_OFF)
  8892. <<$(BUILD_NOKEEP)
  8893. ! endif
  8894.     @set createfile=<<$(OBJ_PATH)\$O\misc_mui_off
  8895. $(MISC_MUI_OFF)
  8896. <<$(BUILD_NOKEEP)
  8897.    @set createfile=<<$(OBJ_PATH)\$O\pass_independent_binp_mui_exclude
  8898. <<$(BUILD_NOKEEP)
  8899.   $(NOECHO)$(_PERL) -e "my $$muioff;open MISCMUIOFF,'$(OBJ_PATH)\$O\misc_mui_off';while (<MISCMUIOFF>){$$muioff .= $$_;}close MISCMUIOFF;open EXCLUDE, '>>$(OBJ_PATH)\$O\pass0_binp_mui_exclude';foreach $$i (split(';',$$muioff)){$$i=~ s/,.+$$//;$$i=~ s/^\s*//;$$i=~ s/\s*$$//;print EXCLUDE qq($$i\n);}close EXCLUDE;"
  8900.   $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=$(OBJ_PATH)\$O\pass0_independent_binp_mui_exclude
  8901.     $(BINPLACE_TOOL) @<<$(BINPLACE_RESPONSE_FILE_IND)
  8902.         $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8903. !  if defined(PASS_INDEPENDENT_BINPLACE)
  8904.         $(PASS_INDEPENDENT_BINPLACE)
  8905. !  endif
  8906. !  if defined(DL_MANIFESTS)
  8907.         /:DEST Setup\Sources\dlmanifests
  8908.         $(DL_MANIFESTS)
  8909. !  endif
  8910. !  if defined(REPL_MANIFESTS)
  8911.         /:DEST Setup\Sources\ReplacementManifests
  8912.         $(REPL_MANIFESTS)
  8913. !  endif
  8914. <<$(BUILD_NOKEEP)
  8915.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=
  8916. !endif
  8917.  
  8918. PASS0_BINP:
  8919. !if defined(PASS0_BINPLACE) && "$(BUILD_PASS)" != "PASS1" && "$(BUILD_PASS)" != "PASS2"
  8920. !if defined(BUILD_DEBUG)
  8921.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  8922. $(MAKEDIR) PASS0_BINPLACE=$(PASS0_BINPLACE)
  8923. $(MAKEDIR) MUI= $(MUI)
  8924. ! if "$(MUI)" == "0"
  8925. $(MAKEDIR) MUI_COMMENT= $(MUI_COMMENT)
  8926. ! endif
  8927. $(MAKEDIR) MISC_MUI_OFF= $(MISC_MUI_OFF)
  8928. <<$(BUILD_NOKEEP)
  8929. !endif
  8930.     @set createfile=<<$(OBJ_PATH)\$O\misc_mui_off
  8931. $(MISC_MUI_OFF)
  8932. <<$(BUILD_NOKEEP)
  8933.     @set createfile=<<$(OBJ_PATH)\$O\pass0_binp_mui_exclude
  8934. <<$(BUILD_NOKEEP)
  8935.     $(NOECHO)$(_PERL) -e "my $$muioff;open MISCMUIOFF,'$(OBJ_PATH)\$O\misc_mui_off';while (<MISCMUIOFF>){$$muioff .= $$_;}close MISCMUIOFF;open EXCLUDE, '>>$(OBJ_PATH)\$O\pass0_binp_mui_exclude';foreach $$i (split(';',$$muioff)){$$i=~ s/,.+$$//;$$i=~ s/^\s*//;$$i=~ s/\s*$$//;print EXCLUDE qq($$i\n);}close EXCLUDE;"
  8936.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=$(OBJ_PATH)\$O\pass0_binp_mui_exclude
  8937.     $(BINPLACE_TOOL) @<<$(BINPLACE_RESPONSE_FILE)
  8938. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8939. $(PASS0_BINPLACE)
  8940. <<$(BUILD_NOKEEP)
  8941.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=
  8942. !endif
  8943.  
  8944. PASS1_BINP:
  8945. !if defined(PASS1_BINPLACE) && "$(BUILD_PASS)" != "PASS0" && "$(BUILD_PASS)" != "PASS2"
  8946. !if defined(BUILD_DEBUG)
  8947.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  8948. $(MAKEDIR) PASS1_BINPLACE=$(PASS1_BINPLACE)
  8949. $(MAKEDIR) MUI= $(MUI)
  8950. ! if "$(MUI)" == "0"
  8951. $(MAKEDIR) MUI_COMMENT= $(MUI_COMMENT)
  8952. ! endif
  8953. $(MAKEDIR) MISC_MUI_OFF= $(MISC_MUI_OFF)
  8954. <<$(BUILD_NOKEEP)
  8955. !endif
  8956.     @set createfile=<<$(OBJ_PATH)\$O\misc_mui_off
  8957. $(MISC_MUI_OFF)
  8958. <<$(BUILD_NOKEEP)
  8959.     @set createfile=<<$(OBJ_PATH)\$O\pass1_binp_mui_exclude
  8960. <<$(BUILD_NOKEEP)
  8961.     $(NOECHO)$(_PERL) -e "my $$muioff;open MISCMUIOFF,'$(OBJ_PATH)\$O\misc_mui_off';while (<MISCMUIOFF>){$$muioff .= $$_;}close MISCMUIOFF;open EXCLUDE, '>>$(OBJ_PATH)\$O\pass1_binp_mui_exclude';foreach $$i (split(';',$$muioff)){$$i=~ s/,.+$$//;$$i=~ s/^\s*//;$$i=~ s/\s*$$//;print EXCLUDE qq($$i\n);}close EXCLUDE;"
  8962.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=$(OBJ_PATH)\$O\pass1_binp_mui_exclude
  8963.     $(BINPLACE_TOOL) @<<$(BINPLACE_RESPONSE_FILE)
  8964. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8965. $(PASS1_BINPLACE)
  8966. <<$(BUILD_NOKEEP)
  8967.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=
  8968. !endif
  8969.  
  8970. PASS2_BINP:
  8971. !if defined(PASS2_BINPLACE) && "$(BUILD_PASS)" != "PASS0" && "$(BUILD_PASS)" != "PASS1"
  8972. !if defined(BUILD_DEBUG)
  8973.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  8974. $(MAKEDIR) PASS2_BINPLACE=$(PASS2_BINPLACE)
  8975. $(MAKEDIR) MUI= $(MUI)
  8976. ! if "$(MUI)" == "0"
  8977. $(MAKEDIR) MUI_COMMENT= $(MUI_COMMENT)
  8978. ! endif
  8979. $(MAKEDIR) MISC_MUI_OFF= $(MISC_MUI_OFF)
  8980. <<$(BUILD_NOKEEP)
  8981. !endif
  8982.     @set createfile=<<$(OBJ_PATH)\$O\misc_mui_off
  8983. $(MISC_MUI_OFF)
  8984. <<$(BUILD_NOKEEP)
  8985.     @set createfile=<<$(OBJ_PATH)\$O\pass2_binp_mui_exclude
  8986. <<$(BUILD_NOKEEP)
  8987.     $(NOECHO)$(_PERL) -e "my $$muioff;open MISCMUIOFF,'$(OBJ_PATH)\$O\misc_mui_off';while (<MISCMUIOFF>){$$muioff .= $$_;}close MISCMUIOFF;open EXCLUDE, '>>$(OBJ_PATH)\$O\pass2_binp_mui_exclude';foreach $$i (split(';',$$muioff)){$$i=~ s/,.+$$//;$$i=~ s/^\s*//;$$i=~ s/\s*$$//;print EXCLUDE qq($$i\n);}close EXCLUDE;"
  8988.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=$(OBJ_PATH)\$O\pass2_binp_mui_exclude
  8989.     $(BINPLACE_TOOL) @<<$(BINPLACE_RESPONSE_FILE)
  8990. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  8991. $(PASS2_BINPLACE)
  8992. <<$(BUILD_NOKEEP)
  8993.     $(NOECHO)set LANGUAGE_NEUTRAL_EXCLUDE_FILE=
  8994. !endif
  8995. !endif
  8996.  
  8997. !ifndef PASS_INDEPENDENT_TARGETS  # { {
  8998.  
  8999. !ifdef PASS0_PUBLISH
  9000. _PASS0_PUBLISH_LOWERCASE=$(PASS0_PUBLISH)
  9001. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:A=a)
  9002. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:D=d)
  9003. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:E=e)
  9004. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:M=m)
  9005. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:L=l)
  9006. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:T=t)
  9007. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:X=x)
  9008.  
  9009. # Remove spaces, tabs, and carriage returns, so that when
  9010. # we search for ".dll}", etc. below it will effectively
  9011. # check if the destination filename ends with ".dll".
  9012. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE: =)
  9013. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:    =)
  9014. _PASS0_PUBLISH_LOWERCASE=$(_PASS0_PUBLISH_LOWERCASE:^
  9015. =)
  9016. !endif
  9017.  
  9018. !ifdef PASS1_PUBLISH
  9019. _PASS1_PUBLISH_LOWERCASE=$(PASS1_PUBLISH)
  9020. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:A=a)
  9021. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:D=d)
  9022. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:E=e)
  9023. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:M=m)
  9024. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:L=l)
  9025. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:S=s)
  9026. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:T=t)
  9027. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:X=x)
  9028.  
  9029. # Remove spaces, tabs, and carriage returns, so that when
  9030. # we search for ".dll}", etc. below it will effectively
  9031. # check if the destination filename ends with ".dll".
  9032. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE: =)
  9033. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:    =)
  9034. _PASS1_PUBLISH_LOWERCASE=$(_PASS1_PUBLISH_LOWERCASE:^
  9035. =)
  9036.  
  9037. !if    "$(_PASS1_PUBLISH_LOWERCASE:.asmmeta}=)" != "$(_PASS1_PUBLISH_LOWERCASE)"
  9038. ! error : Publish .asmmeta files in pass 0, not pass 1.
  9039. !endif
  9040.  
  9041. !endif
  9042.  
  9043. !if    "$(_PASS0_PUBLISH_LOWERCASE:.dll}=)" != "$(_PASS0_PUBLISH_LOWERCASE)" \
  9044.     || "$(_PASS0_PUBLISH_LOWERCASE:.exe}=)" != "$(_PASS0_PUBLISH_LOWERCASE)" \
  9045.     || "$(_PASS0_PUBLISH_LOWERCASE:.metadata_dll}=)" != "$(_PASS0_PUBLISH_LOWERCASE)" \
  9046.     || "$(_PASS0_PUBLISH_LOWERCASE:.metadata_exe}=)" != "$(_PASS0_PUBLISH_LOWERCASE)" \
  9047.  
  9048. #
  9049. # only redist drops from devdiv should publish .metadata_dll, .metadata_exe, exe, .dll
  9050. #
  9051. !if ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\com\netfx\binary_release") \
  9052.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\com\netfx\1.1") \
  9053.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\intl\en-us\src\redist\mspartners\winfx.35") \
  9054.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\intl\en-us\src\redist\mspartners\winfx.30\wpf\binary_release") \
  9055.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\intl\en-us\src\redist\mspartners\winfx.30\wcf\binary_release") \
  9056.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\intl\en-us\src\redist\mspartners\winfx.30\wwf\binary_release") \
  9057.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\redist\mspartners\netfx35\cdf\binary_release") \
  9058.  || ("$(MAKEDIR_LOWERCASE)" == "$(BASEDIR)\redist\mspartners\netfx35\linq\binary_release")
  9059.  
  9060. !else
  9061.  
  9062. ! error Do not publish .exes or .dlls or .metadata_dll or .metadata_exe files.
  9063. !ifdef _PROJECT_BUILDS_MANAGED_CODE
  9064. ! error Just publish .asmmeta files.
  9065. !endif # } }
  9066.  
  9067.  
  9068. #
  9069. # Check pass1_publish only during pass 1 because it can contain $(TARGET) that is .lib in pass 1
  9070. #  but .dll in pass 2.
  9071. #
  9072. !if defined(PASS1_PUBLISH) && "$(BUILD_PASS)" != "PASS0" && "$(BUILD_PASS)" != "PASS2" && !defined(PASS1_NOLIB) # { {
  9073. !if    "$(_PASS1_PUBLISH_LOWERCASE:.dll}=)" != "$(_PASS1_PUBLISH_LOWERCASE)" \
  9074.     || "$(_PASS1_PUBLISH_LOWERCASE:.exe}=)" != "$(_PASS1_PUBLISH_LOWERCASE)" \
  9075.     || "$(_PASS1_PUBLISH_LOWERCASE:.metadata_dll}=)" != "$(_PASS1_PUBLISH_LOWERCASE)" \
  9076.     || "$(_PASS1_PUBLISH_LOWERCASE:.metadata_exe}=)" != "$(_PASS1_PUBLISH_LOWERCASE)" # { {
  9077. ! error Do not publish .exes or .dlls or .metadata_dll or .metadata_exe files.
  9078. !ifdef _PROJECT_BUILDS_MANAGED_CODE # { {
  9079. ! error Just publish .asmmeta files.
  9080. !endif # } }
  9081. !endif # } }
  9082. !endif # } }
  9083. !endif # } }
  9084. !endif # } }
  9085.  
  9086. # { {
  9087.  
  9088. PASS0_Pub: $(PASS0_OBJECTS) $(NTTARGETFILE0) _concurrent_midl_join
  9089. !if defined(PASS0_PUBLISH) && "$(BUILD_PASS)" != "PASS1" && "$(BUILD_PASS)" != "PASS2"
  9090.     set BUILDMSG=$(@F)
  9091.     $(PUBLISH_CMD) /O_BINARY_METADATA:$(_O_BINARY_METADATA) -F <<$(PUBLISH_RESPONSE_FILE).pass0
  9092. $(PASS0_PUBLISH:}=}
  9093. )
  9094. <<$(BUILD_NOKEEP)
  9095.     set BUILDMSG=$(@F) done
  9096. !endif
  9097.  
  9098. # { {
  9099.  
  9100. PASS1_Pub: $(NTTARGETFILE1)
  9101. !if defined(PASS1_PUBLISH) && "$(BUILD_PASS)" != "PASS0" && "$(BUILD_PASS)" != "PASS2" && !defined(PASS1_NOLIB)
  9102.     set BUILDMSG=$(@F)
  9103.     $(PUBLISH_CMD) -F <<$(PUBLISH_RESPONSE_FILE).pass1
  9104. $(PASS1_PUBLISH:}=}
  9105. )
  9106. <<$(BUILD_NOKEEP)
  9107.     set BUILDMSG=$(@F) done
  9108. !endif
  9109.  
  9110. #
  9111. # Binary drop runs only during the link phase
  9112. #
  9113.  
  9114. # { {
  9115.  
  9116. BINARY_Pub:
  9117. !ifdef BINARY_PUBLISH
  9118. ! if "$(BINPUBLISH)" == "1"
  9119.     $(BINDROP_CMD) -F <<$(BINDROP_RESPONSE_FILE)
  9120. $(BINARY_PUBLISH:}=}
  9121. )
  9122. <<$(BUILD_NOKEEP)
  9123. ! else
  9124.     @echo BINARY_PUBLISH_PROJECTS in environment doesn't contain $(_PROJECT_) -
  9125.     @echo binaries will not be published.
  9126. ! endif
  9127. !else if defined(BINARY_PUBLISH_FILES)
  9128. ! if "$(BINPUBLISH)" == "1"
  9129.     @cmd /v:on /c make_publish_spec $(BINARY_PUBLISH_ROOT) $(OBJ_PATH)\$O $(BINARY_PUBLISH_FILES) | $(BINDROP_CMD) -I
  9130. ! else
  9131.     @echo BINARY_PUBLISH_PROJECTS in environment doesn't contain $(_PROJECT_) -
  9132.     @echo binaries will not be published.
  9133. ! endif
  9134. !endif
  9135.  
  9136. !endif
  9137.  
  9138.  
  9139. # Support to compile licensing manifest
  9140. !if defined(SLS_LICENSING_MANIFEST)
  9141. !    include $(RAZZLETOOLPATH)\licensing.inc
  9142. !endif
  9143.  
  9144. !  if $(FREEBUILD) || defined(BUILD_CHECKED_KERNEL)
  9145. MANIFEST_BUILD_TYPE=release
  9146. !  else
  9147. MANIFEST_BUILD_TYPE=debug
  9148. !  endif
  9149.  
  9150.  
  9151. # Support to compile CMI manifests
  9152. !if    defined(SOURCE_MANIFEST) \
  9153.     || defined(WOW64_SOURCE_MANIFEST) \
  9154.     || defined(MULTI_SOURCE_MANIFEST) \
  9155.     || defined(MULTI_WOW64_SOURCE_MANIFEST) \
  9156.     || defined(PROD_SOURCE_MANIFEST) \
  9157.     || defined(PROD_WOW64_SOURCE_MANIFEST) \
  9158.     || defined(EVENTS_MANIFEST) \
  9159.     || defined(SLS_LICENSING_MANIFEST) \
  9160.     || defined(EDITION_SOURCE_MANIFEST) \
  9161.     || defined(WINPE_SOURCE_MANIFEST)
  9162.  
  9163. ! ifndef MANIFEST_COMPILER_ARGUMENTS
  9164.  
  9165. MANIFEST_HASH_ALGORITHM=SHA1
  9166.  
  9167. MANIFEST_VERSION=$(VER_PRODUCTVERSION_STR)
  9168.  
  9169.  
  9170. # We don't do the language replacements unless someone tells us to.
  9171. # Everything in the product should have these handled during postbuild.
  9172. !ifndef CMI_MANIFEST_REPLACE_LANGUAGES
  9173. CMI_MANIFEST_REPLACE_LANGUAGES=0
  9174. !endif
  9175.  
  9176. !if defined(CMI_MANIFEST_REPLACE_LANGUAGES)
  9177. ! if "$(CMI_MANIFEST_REPLACE_LANGUAGES)" != "1" && "$(CMI_MANIFEST_REPLACE_LANGUAGES)" != "0"
  9178. !  error CMI_MANIFEST_REPLACE_LANGUAGES must 0, 1, or not defined.
  9179. ! endif
  9180. !endif
  9181.  
  9182. !if "$(CMI_MANIFEST_REPLACE_LANGUAGES)" == "1"
  9183.  
  9184. #
  9185. # People who specify their CMI manifest language
  9186. #
  9187. !  ifdef CMI_MANIFEST_LANGUAGE
  9188. MANIFEST_LANGUAGE=$(CMI_MANIFEST_LANGUAGE)
  9189. !  else
  9190. MANIFEST_LANGUAGE=neutral
  9191. !  endif
  9192.  
  9193. #
  9194. # MUI related substitutions
  9195. #
  9196. !  ifdef CMI_MANIFEST_CULTURE_NAME_STRING
  9197. MANIFEST_CULTURE_NAME_STRING=$(CMI_MANIFEST_CULTURE_NAME_STRING)
  9198. !  else
  9199. MANIFEST_CULTURE_NAME_STRING=en-US
  9200. !  endif
  9201.  
  9202. !  ifdef CMI_MANIFEST_CULTURE_NEUTRAL_NAME_STRING
  9203. MANIFEST_CULTURE_NEUTRAL_NAME_STRING=$(CMI_MANIFEST_CULTURE_NEUTRAL_NAME_STRING)
  9204. !  else
  9205. MANIFEST_CULTURE_NEUTRAL_NAME_STRING=en
  9206. !  endif
  9207.  
  9208. !  ifdef CMI_MANIFEST_CULTURE_SPECIFIC_NAME_STRING
  9209. MANIFEST_CULTURE_SPECIFIC_NAME_STRING=$(CMI_MANIFEST_CULTURE_SPECIFIC_NAME_STRING)
  9210. !  else
  9211. MANIFEST_CULTURE_SPECIFIC_NAME_STRING=en-US
  9212. !  endif
  9213.  
  9214. !  ifdef CMI_MANIFEST_CULTURE_LANG_ID_HEX
  9215. MANIFEST_CULTURE_LANG_ID_HEX=$(CMI_MANIFEST_CULTURE_LANG_ID_HEX)
  9216. !  else
  9217. MANIFEST_CULTURE_LANG_ID_HEX=0409
  9218. !  endif
  9219.  
  9220. !  ifdef CMI_MANIFEST_CULTURE_PRIMARY_LANG_ID_HEX
  9221. MANIFEST_CULTURE_PRIMARY_LANG_ID_HEX=$(CMI_MANIFEST_CULTURE_PRIMARY_LANG_ID_HEX)
  9222. !  else
  9223. MANIFEST_CULTURE_PRIMARY_LANG_ID_HEX=0009
  9224. !  endif
  9225.  
  9226. !  ifdef CMI_MANIFEST_CULTURE_FULL_LANG_ID_HEX
  9227. MANIFEST_CULTURE_FULL_LANG_ID_HEX=$(CMI_MANIFEST_CULTURE_FULL_LANG_ID_HEX)
  9228. !  else
  9229. MANIFEST_CULTURE_FULL_LANG_ID_HEX=0409
  9230. !  endif
  9231.  
  9232. !endif #!if $(CMI_MANIFEST_REPLACE_LANGUAGES) == "1"
  9233.  
  9234.  
  9235.  
  9236. #
  9237. # URT related substitutions
  9238. #
  9239.  
  9240. #
  9241. # MANIFEST_CLR_VERSION_STR is expected to have this format: v(\d+)\.(\d+)\.(\d+)
  9242. # for example v1.0.3705
  9243. #
  9244.  
  9245. !if 0 # FUTURE This will take a bit more work to jive with the
  9246.       # various manifest content around the tree.
  9247.       # People hardcode various values and some people use the bogus 1.0.0 value.
  9248.  
  9249. !if defined(URT_VER)
  9250. !include $(NTMAKEENV)\clr_versions.inc
  9251. !  if "$(URT_VER)" == "1.1"
  9252. MANIFEST_CLR_VERSION_STR=$(URT_VER_1_1)
  9253. !  elseif "$(URT_VER)" == "2.0"
  9254. MANIFEST_CLR_VERSION_STR=$(URT_VER_2_0)
  9255. !  else
  9256. !    error Unknown URT_VER.
  9257. !  endif
  9258. MANIFEST_CLR_PATH=$$(runtime.windows)\Microsoft.NET\Framework\$(MANIFEST_CLR_VERSION_STR)
  9259. !endif
  9260.  
  9261. !else
  9262.  
  9263. !  if (!defined(URT_VER) || "$(URT_VER)" == "1.2") && defined(URT_VER_1_2)
  9264. MANIFEST_CLR_VERSION_STR=$(URT_VER_1_2)
  9265. !  endif
  9266. !  if "$(URT_VER)" == "1.1" && defined(URT_VER_1_2)
  9267. MANIFEST_CLR_VERSION_STR=$(URT_VER_1_1)
  9268. !  endif
  9269. !  if "$(URT_VER)" == "1.0" && defined(URT_VER_1_2)
  9270. MANIFEST_CLR_VERSION_STR=$(URT_VER_1_0)
  9271. !  endif
  9272.  
  9273. #
  9274. # in case nothing is defined
  9275. #
  9276. !  ifndef MANIFEST_CLR_VERSION_STR
  9277. MANIFEST_CLR_VERSION_STR=v1.0.0
  9278. !endif
  9279.  
  9280. MANIFEST_CLR_PATH=$$(runtime.windows)\Microsoft.NET\Framework\$(MANIFEST_CLR_VERSION_STR)
  9281.  
  9282. !endif
  9283.  
  9284. #
  9285. # temporary public key token until the fusion manifest compilation support
  9286. # gets checked in
  9287. #
  9288. !  ifndef MANIFEST_PUBLIC_KEY_TOKEN
  9289. MANIFEST_PUBLIC_KEY_TOKEN=1122334455667788
  9290. !  endif
  9291.  
  9292. #
  9293. # file containing security descriptor definitions for WRP objects
  9294. #
  9295. !  ifndef MANIFEST_SDDL_FILE
  9296. MANIFEST_SDDL_FILE=@$(NTMAKEENV)\manifest_sddl.txt
  9297. !  endif
  9298.  
  9299. #
  9300. # build platform, for x86/wow64 it is win32, for 64-bit builds it is win64
  9301. #
  9302. !ifndef BUILD_WIN_PLATFORM
  9303. !if $(386)
  9304. BUILD_WIN_PLATFORM=win32
  9305. !else
  9306. BUILD_WIN_PLATFORM=win64
  9307. !endif
  9308. !endif
  9309.  
  9310. #
  9311. # all the $(build.xyz) keys are case insensitive, but values are case sensitive
  9312. #
  9313. MANIFEST_COMPILER_BASE_ARGUMENTS=\
  9314.     $$(build.version) $(MANIFEST_VERSION) \
  9315. !if "$(TARGETTYPE)" != "NOTARGET"
  9316. # This is for if the manifests live with the code.
  9317. # It doesn't yet work, but only one directory could even use it: \nt\ds\security\services\ca\certmmc.
  9318. #   $$(build.assemblyVersion) $(ASSEMBLY_IDENTITY_VERSION) \
  9319. !endif
  9320. # This is a compromise for manifests that don't live with the code.
  9321.     $$(build.WindowsManagedAssemblyVersion) $(WINDOWS_ASSEMBLY_VERSION) \
  9322.     $$(build.MediaCenterManagedVersion) $(M_C_MANAGED_VERSION) \
  9323.     $$(build.majorVersion),$$(build.minorVersion),$$(build.buildNumber),$$(build.revision):(\d+)\.(\d+)\.(\d+)\.(\d+) $(MANIFEST_VERSION) \
  9324.     $$(build.majorMinor) $(VER_PRODUCTVERSION_STRING) \
  9325.     $$(build.majorMinorZeroZero) $(VER_PRODUCTVERSION_STRING).0.0 \
  9326.     $$(build.majorMinorStarStar) $(VER_PRODUCTVERSION_STRING).*.* \
  9327.     $$build.version $(MANIFEST_VERSION) \
  9328.     $$(build.language) $(MANIFEST_LANGUAGE) \
  9329.     $$build.language $(MANIFEST_LANGUAGE) \
  9330.     $$(build.buildType) $(MANIFEST_BUILD_TYPE) \
  9331.     $$build.buildType $(MANIFEST_BUILD_TYPE) \
  9332.     $$(build.processorArchitecture) $(SXS_PROCESSOR_ARCHITECTURE) \
  9333.     $$(build.hashAlgorithmType) $(MANIFEST_HASH_ALGORITHM) \
  9334.     $$build.processor $(SXS_PROCESSOR_ARCHITECTURE) \
  9335.     $$(build.winPlatform) $(BUILD_WIN_PLATFORM) \
  9336. !if "$(PROCESSOR_ARCHITECTURE_LOWERCASE)" == "$(_BUILDARCH)"
  9337.     $$(build.hostarch) $(PROCESSOR_ARCHITECTURE) \
  9338. !else
  9339.     $$(build.hostarch) x86 \
  9340. !endif
  9341. !if "$(CMI_MANIFEST_REPLACE_LANGUAGES)" == "1"
  9342.     $$(build.cultureNameString) $(MANIFEST_CULTURE_NAME_STRING) \
  9343.     $$(build.cultureNeutralNameString) $(MANIFEST_CULTURE_NEUTRAL_NAME_STRING) \
  9344.     $$(build.cultureSpecificNameString) $(MANIFEST_CULTURE_SPECIFIC_NAME_STRING) \
  9345.     $$(build.cultureLangIdHex) $(MANIFEST_CULTURE_LANG_ID_HEX) \
  9346.     $$(build.culturePrimaryLangIdHex) $(MANIFEST_CULTURE_PRIMARY_LANG_ID_HEX) \
  9347.     $$(build.cultureFullLangIdHex) $(MANIFEST_CULTURE_FULL_LANG_ID_HEX) \
  9348. !endif
  9349. !if defined(MANIFEST_CLR_VERSION_STR)
  9350.     $$(build.clrVersionStr) $(MANIFEST_CLR_VERSION_STR) \
  9351. !endif
  9352. !if defined(MANIFEST_CLR_PATH)
  9353.     $$(build.clrPath) $(MANIFEST_CLR_PATH) \
  9354. !endif
  9355.     $$(build.windowsPublicKeyToken) $(WINDOWS_PUBLIC_KEY_TOKEN) \
  9356.     $$(build.publicKeyToken) $(MANIFEST_PUBLIC_KEY_TOKEN) \
  9357. !if defined(MANIFEST_CLR_VERSION_STR)
  9358.     $$(build.clrVersion):v(.+) $(MANIFEST_CLR_VERSION_STR) \
  9359. !endif
  9360.     -SDDL_CONFIG_FILE $(MANIFEST_SDDL_FILE)
  9361. ! endif
  9362.  
  9363. #
  9364. # CMI_MANIFEST_COMPILER_EXTRA_ARGUMENTS must be a list of name-value pairs.
  9365. #
  9366. # 1. The name must either of format $(build.*) or $build.*
  9367. # 2. The value must not be spaces or empty.
  9368. # 3. If name or value contains space, it must be quoted.
  9369. # 4. name and value must be delimited by a space
  9370. # 5. each pair must be delimited by a space
  9371. # 6. a name specified here can NOT override any default name specified in
  9372. #    this makefile.def
  9373. #
  9374. # N.B. name is case-censitive.
  9375. #
  9376. # e.g.
  9377. #
  9378. # CMI_MANIFEST_COMPILER_EXTRA_ARGUMENTS=\
  9379. #    $$(build.myTargetName) $(TARGETNAME) \
  9380. #    $$(build.myTargetPath) $(TARGETPATH)
  9381. #
  9382. ! ifdef CMI_MANIFEST_COMPILER_EXTRA_ARGUMENTS
  9383. MANIFEST_COMPILER_ARGUMENTS=$(CMI_MANIFEST_COMPILER_EXTRA_ARGUMENTS) $(MANIFEST_COMPILER_BASE_ARGUMENTS)
  9384. !else
  9385. MANIFEST_COMPILER_ARGUMENTS=$(MANIFEST_COMPILER_BASE_ARGUMENTS)
  9386. ! endif
  9387.  
  9388. ! ifdef CMI_MANIFEST_BINPLACE
  9389. MANIFEST_DIRECTORY=$(CMI_MANIFEST_BINPLACE)
  9390. !undef MANIFEST_DIRECTORY2
  9391. ! else
  9392. MANIFEST_DIRECTORY=cmicomponents
  9393. MANIFEST_DIRECTORY2=cmiconverted
  9394. !undef MANIFEST_DIRECTORY2
  9395. ! endif
  9396.  
  9397. ! ifdef CMI_MANIFEST_LANGUAGE
  9398. MANIFEST_DIRECTORY=$(MANIFEST_DIRECTORY)\$(LANGUAGE)
  9399. !  ifdef MANIFEST_DIRECTORY2
  9400. MANIFEST_DIRECTORY2=$(MANIFEST_DIRECTORY2)\$(LANGUAGE)
  9401. !  endif
  9402. ! endif
  9403.  
  9404. ! ifndef CMI_BINPLACE_OVERRIDE
  9405. CMI_RES_BINPLACE=$(LOC_BIN)\cmicomponents.raw
  9406. ! else
  9407. CMI_RES_BINPLACE=$(CMI_BINPLACE_OVERRIDE)
  9408. ! endif
  9409.  
  9410. ! ifndef CMI_MULTI_BINPLACE_OVERRIDE
  9411. CMI_MULTI_BINPLACE=$(LOC_MULTI)\cmicomponents.raw
  9412. ! else
  9413. CMI_MULTI_BINPLACE=$(CMI_MULTI_BINPLACE_OVERRIDE)
  9414. ! endif
  9415.  
  9416. CV_BCZOPTIONS=/systemerrorstoconsole /nowarnings /failurestoconsole /ignorescope=inter /ignoreviewtype=compiled /basedir=$(MAKEDIR) /omitmetadata /logdir=$(OBJ_PATH)\$O /savemeta=$(OBJ_PATH)\$O\cvexceptionlists /findstaleexceptions=$(OBJ_PATH)\$O
  9417.  
  9418. !if !defined(CV_BCZPROFILE) || "$(CV_BCZPROFILE)" == ""
  9419. CV_BCZPROFILE=bcz.profile
  9420. !endif
  9421.  
  9422. ! ifdef SOURCE_MANIFEST
  9423. $(SOURCE_MANIFEST): $(CMI_MANIFESTS)
  9424.     set BUILDMSG=DiagValid is validating manifest instrumentation.
  9425.     "diagvalid.exe" "$(RAZZLETOOLPATH)\diagvalid\exceptions.xml" $?
  9426. !  ifndef DISABLE_CV
  9427.     set BUILDMSG=Component Validation is validating manifests.
  9428.     $(_URTRUN_20) ValidateManifest $(CV_BCZOPTIONS) $(CV_OPTIONS) /useprofile=$(CV_BCZPROFILE) <<$(@D)\ManifestsToBevalidated
  9429. $?
  9430. <<$(BUILD_NOKEEP)
  9431. !  endif
  9432. !   ifdef CACHE_SOURCE_MANIFESTS
  9433.     set BUILDMSG=Source manifests are being cached.
  9434.     $(_URTRUN_20) CacheManifest $(MAKEDIR) $(CACHE_SOURCE_MANIFESTS) <<$(@D)\ManifestsToBeCached
  9435. $?
  9436. <<$(BUILD_NOKEEP)
  9437. !   endif
  9438. ! if !defined(DISABLE_SOURCE_MANIFEST_VALIDATION)
  9439.     set BUILDMSG=Manifest schema and formatting is being checked.
  9440.     checksourcemanifests -obj:$(OBJ_PATH)\$O <<$(@D)\ManifestsToBeChecked
  9441. $(**: =
  9442. )
  9443. <<$(BUILD_NOKEEP)
  9444. ! endif
  9445. #
  9446. # ! means loop
  9447. # $? is the manifests with a later timestamp than $(SOURCE_MANIFEST)
  9448. # $(SOURCE_MANIFEST) is the list of manifests to be binplaced
  9449. # The .vbs manifest compiler takes ....foo.man and outputs $O\foo.man.temp0
  9450. # The RC manifest compiler takes $O\foo.man.temp0 and outputs $O\foo.man.temp1
  9451. # The temp file $O\foo.man.temp0 is deleted
  9452. # ManifestCompilerPass2.cmd takes $O\foo.man.temp1 and outputs $O\foo.man.
  9453. #
  9454.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE)
  9455.     !$(MANIFEST_RCPARSER_CMD) $(@D)\$(?F).temp0 $(@D)\$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9456.     !$(_DELFILE) $(@D)\$(?F).temp0
  9457.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9458. $?
  9459. <<$(BUILD_NOKEEP)
  9460. !  ifndef NO_BINPLACE
  9461.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9462. !   ifdef MANIFEST_DIRECTORY2
  9463.         $(MANIFEST_DIRECTORY2):$(MANIFEST_DIRECTORY) \
  9464. !   else
  9465.     $(MANIFEST_DIRECTORY) \
  9466. !   endif
  9467.     @$@.temp /:DEST $(CMI_RES_BINPLACE) @$@.temp.resources
  9468. !  endif
  9469.  
  9470. !  if defined(WINPE_COMPILE_SMI_MANIFEST) && !defined(NO_BINPLACE)
  9471. !   if "$(WINPE_COMPILE_SMI_MANIFEST)" != "1"
  9472. !    error WINPE_COMPILE_SMI_MANIFEST must be set to 1 or not defined
  9473. !   endif
  9474.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  9475. !   if !defined(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE)
  9476.                     /:DEST WinPE_SMI_Manifests \
  9477. !   else
  9478.                     /P $(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE) \
  9479. !   endif
  9480.                     @$@.temp
  9481. !  endif
  9482. !  if defined(SKU_SETTINGS_OVERRIDE_FILES)
  9483.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  9484.         /:DEST SKU-Settings-Overrides $(SKU_SETTINGS_OVERRIDE_FILES)
  9485. !  endif
  9486.  
  9487. # Create LCG files for CMI_MANIFESTS files if needed
  9488. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9489.        set BUILDMSG=making CMI_MANIFESTS with CreateLCGFile.pl
  9490.        set createfile=<<$(@D)\cmi_manifests.lcg.lst
  9491. $(**: =
  9492. )
  9493. <<keep
  9494. !   ifndef NO_BINPLACE
  9495.         set createfile=<<$(@D)\cmi_manifests.lcg.binplace.txt
  9496. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw
  9497. <<keep
  9498. !   endif # NO_BINPLACE
  9499.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9500.             /c \
  9501.             /m:$(@D)\cmi_manifests.lcg.lst \
  9502.             /t:$(@D) \
  9503.             $(LSBUILD_PARSER_ID_OPTION) \
  9504.             $(ALT_LCI_DIR_OPTION) \
  9505.             /s:$(LSBUILD_PARSER_SETTINGS) \
  9506. !   ifndef NO_BINPLACE
  9507.             /b:$(@D)\cmi_manifests.lcg.binplace.txt \
  9508.             /r:$(LCG_BINPLACE_TARGET) \
  9509. !   endif # ifndef NO_BINPLACE
  9510.             /l:$(LANGUAGE)
  9511. !  endif # if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9512.  
  9513.     move $@.temp $@
  9514.  
  9515. ! endif # ifdef SOURCE_MANIFEST
  9516.  
  9517.  
  9518.  
  9519. ! ifdef WOW64_SOURCE_MANIFEST
  9520. $(WOW64_SOURCE_MANIFEST): $(CMI_WOW64_MANIFESTS)
  9521.     set build.arch=wow64
  9522.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\wow64_$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) wow64
  9523.     !$(MANIFEST_RCPARSER_CMD) $(@D)\wow64_$(?F).temp0 $(@D)\wow64_$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9524.     set build.arch=$(_BUILDARCH)
  9525.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix wow64_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS) $(CMI_WOW64_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9526. $?
  9527. <<$(BUILD_NOKEEP)
  9528. !  ifndef NO_BINPLACE
  9529.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9530. !   ifdef MANIFEST_DIRECTORY2
  9531.         $(MANIFEST_DIRECTORY2)\wow6432:$(MANIFEST_DIRECTORY)\wow6432 \
  9532. !   else
  9533.         $(MANIFEST_DIRECTORY)\wow6432 \
  9534. !   endif
  9535.         @$@.temp /:DEST $(CMI_RES_BINPLACE)\wow6432 @$@.temp.resources
  9536. !  endif
  9537.  
  9538. # Create LCG files for CMI_WOW64_MANIFESTS files if needed
  9539. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9540.        set BUILDMSG=making CMI_WOW64_MANIFESTS with CreateLCGFile.pl
  9541.        set BUILDMSG=$(@D)\cmi_wow64_manifests.lcg.lst
  9542.        set createfile=<<$(@D)\cmi_wow64_manifests.lcg.lst
  9543. wow64_$(**F: =
  9544. wow64_)
  9545. <<keep
  9546. !   ifndef NO_BINPLACE
  9547.         set createfile=<<$(@D)\cmi_wow64_manifests.lcg.binplace.txt
  9548. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw\wow6432
  9549. <<keep
  9550. !   endif # NO_BINPLACE
  9551.         cd $(@D)
  9552.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9553.             /c \
  9554.             /m:$(@D)\cmi_wow64_manifests.lcg.lst \
  9555.             /t:$(@D) \
  9556.             $(LSBUILD_PARSER_ID_OPTION) \
  9557.             $(ALT_LCI_DIR_OPTION) \
  9558.             /s:$(LSBUILD_PARSER_SETTINGS) \
  9559. !   ifndef NO_BINPLACE
  9560.             /b:$(@D)\cmi_wow64_manifests.lcg.binplace.txt \
  9561.             /r:$(LCG_BINPLACE_TARGET) \
  9562. !   endif # NO_BINPLACE
  9563.             /l:$(LANGUAGE)
  9564.         cd $(MAKEDIR)
  9565. !  endif # DO_LSBUILD && BUILD_CMI_LCG
  9566.  
  9567.     move $@.temp $@
  9568.  
  9569. ! endif
  9570.  
  9571.  
  9572.  
  9573.  
  9574.  
  9575. ! ifdef MULTI_SOURCE_MANIFEST
  9576. !message MULTI_SOURCE_MANIFEST is $(MULTI_SOURCE_MANIFEST) : $(CMI_MULTI_MANIFESTS)
  9577. $(MULTI_SOURCE_MANIFEST): $(CMI_MULTI_MANIFESTS)
  9578.     set BUILDMSG=Making CMI_MULTI_MANIFESTS with $(MULTI_SOURCE_MANIFEST) : $(CMI_MULTI_MANIFESTS)
  9579.     set BUILDMSG=DiagValid is validating manifest instrumentation.
  9580.     "diagvalid.exe" "$(RAZZLETOOLPATH)\diagvalid\exceptions.xml" $?
  9581. !  ifndef DISABLE_CV
  9582.     set BUILDMSG=Component Validation is validating manifests.
  9583.     $(_URTRUN_20) ValidateManifest $(CV_BCZOPTIONS) $(CV_OPTIONS) /useprofile=$(CV_BCZPROFILE) <<$(@D)\MultiManifestsToBevalidated
  9584. $?
  9585. <<$(BUILD_NOKEEP)
  9586. !  endif
  9587. !   ifdef CACHE_SOURCE_MANIFESTS
  9588.     set BUILDMSG=Source manifests are being cached.
  9589.     $(_URTRUN_20) CacheManifest $(MAKEDIR) $(CACHE_SOURCE_MANIFESTS) <<$(@D)\ManifestsToBeCached
  9590. $?
  9591. <<$(BUILD_NOKEEP)
  9592. !   endif
  9593. #
  9594. # ! means loop
  9595. # $? is the manifests with a later timestamp than $(MULTI_SOURCE_MANIFEST)
  9596. # $(MULTI_SOURCE_MANIFEST) is the list of manifests to be binplaced
  9597. # The .vbs manifest compiler takes ....foo.man and outputs $O\foo.man.temp0
  9598. # The RC manifest compiler takes $O\foo.man.temp0 and outputs $O\foo.man.temp1
  9599. # The temp file $O\foo.man.temp0 is deleted
  9600. # ManifestCompilerPass2.cmd takes $O\foo.man.temp1 and outputs $O\foo.man.
  9601. #
  9602.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE)
  9603.     !$(MANIFEST_RCPARSER_CMD) $(@D)\$(?F).temp0 $(@D)\$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9604.     !$(_DELFILE) $(@D)\$(?F).temp0
  9605.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9606. $?
  9607. <<$(BUILD_NOKEEP)
  9608. !  ifndef NO_BINPLACE
  9609.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9610. !   ifdef MANIFEST_DIRECTORY2
  9611.         $(MANIFEST_DIRECTORY2):$(MANIFEST_DIRECTORY) \
  9612. !   else
  9613.     $(MANIFEST_DIRECTORY) \
  9614. !   endif
  9615.     @$@.temp /:DEST $(CMI_MULTI_BINPLACE) @$@.temp.resources
  9616. !  endif
  9617.  
  9618. !  if defined(WINPE_COMPILE_SMI_MANIFEST) && !defined(NO_BINPLACE)
  9619. !   if "$(WINPE_COMPILE_SMI_MANIFEST)" != "1"
  9620. !    error WINPE_COMPILE_SMI_MANIFEST must be set to 1 or not defined
  9621. !   endif
  9622.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  9623. !   if !defined(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE)
  9624.                     /:DEST WinPE_SMI_Manifests \
  9625. !   else
  9626.                     /P $(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE) \
  9627. !   endif
  9628.                     @$@.temp
  9629. !  endif
  9630.  
  9631. !  if defined(SKU_SETTINGS_OVERRIDE_FILES)
  9632.     $(BINPLACE_CMD) /:DEST SKU-Settings-Overrides $(SKU_SETTINGS_OVERRIDE_FILES)
  9633. !  endif
  9634.  
  9635. # Create LCG files for CMI_MULTI_MANIFESTS files if needed
  9636. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9637.        set BUILDMSG=making CMI_MULTI_MANIFESTS with CreateLCGFile.pl
  9638.        set createfile=<<$(@D)\cmi_multi_manifests.lcg.lst
  9639. $(**: =
  9640. )
  9641. <<keep
  9642. !   ifndef NO_BINPLACE
  9643.         set createfile=<<$(@D)\cmi_multi_manifests.lcg.binplace.txt
  9644. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw
  9645. <<keep
  9646. !   endif # NO_BINPLACE
  9647.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9648.             /c \
  9649.             /m:$(@D)\cmi_multi_manifests.lcg.lst \
  9650.             /t:$(@D) \
  9651.             $(LSBUILD_PARSER_ID_OPTION) \
  9652.             $(ALT_LCI_DIR_OPTION) \
  9653.             /s:$(LSBUILD_PARSER_SETTINGS) \
  9654. !   ifndef NO_BINPLACE
  9655.             /b:$(@D)\cmi_multi_manifests.lcg.binplace.txt \
  9656.             /r:$(LCG_BINPLACE_TARGET) \
  9657. !   endif # ifndef NO_BINPLACE
  9658.             /l:$(LANGUAGE)
  9659. !  endif # if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9660.  
  9661.     move $@.temp $@
  9662.  
  9663. ! endif # ifdef MULTI_SOURCE_MANIFEST
  9664.  
  9665.  
  9666.  
  9667.  
  9668. ! ifdef MULTI_WOW64_SOURCE_MANIFEST
  9669. $(MULTI_WOW64_SOURCE_MANIFEST): $(CMI_MULTI_WOW64_MANIFESTS)
  9670.     set build.arch=wow64
  9671.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\wow64_$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) wow64
  9672.     !$(MANIFEST_RCPARSER_CMD) $(@D)\wow64_$(?F).temp0 $(@D)\wow64_$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9673.     set build.arch=$(_BUILDARCH)
  9674.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix wow64_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS) $(CMI_WOW64_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9675. $?
  9676. <<$(BUILD_NOKEEP)
  9677. !  ifndef NO_BINPLACE
  9678.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9679. !   ifdef MANIFEST_DIRECTORY2
  9680.         $(MANIFEST_DIRECTORY2)\wow6432:$(MANIFEST_DIRECTORY)\wow6432 \
  9681. !   else
  9682.         $(MANIFEST_DIRECTORY)\wow6432 \
  9683. !   endif
  9684.         @$@.temp /:DEST $(CMI_MULTI_BINPLACE)\wow6432 @$@.temp.resources
  9685. !  endif
  9686.  
  9687. # Create LCG files for CMI_WOW64_MULTI_MANIFESTS files if needed
  9688. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9689.        set BUILDMSG=making CMI_WOW64_MULTI_MANIFESTS with CreateLCGFile.pl
  9690.        set BUILDMSG=$(@D)\cmi_wow64_multi_manifests.lcg.lst
  9691.        set createfile=<<$(@D)\cmi_wow64_multi_manifests.lcg.lst
  9692. wow64_$(**F: =
  9693. wow64_)
  9694. <<keep
  9695. !   ifndef NO_BINPLACE
  9696.         set createfile=<<$(@D)\cmi_wow64_multi_manifests.lcg.binplace.txt
  9697. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw\wow6432
  9698. <<keep
  9699. !   endif # NO_BINPLACE
  9700.         cd $(@D)
  9701.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9702.             /c \
  9703.             /m:$(@D)\cmi_wow64_multi_manifests.lcg.lst \
  9704.             /t:$(@D) \
  9705.             $(LSBUILD_PARSER_ID_OPTION) \
  9706.             $(ALT_LCI_DIR_OPTION) \
  9707.             /s:$(LSBUILD_PARSER_SETTINGS) \
  9708. !   ifndef NO_BINPLACE
  9709.             /b:$(@D)\cmi_wow64_multi_manifests.lcg.binplace.txt \
  9710.             /r:$(LCG_BINPLACE_TARGET) \
  9711. !   endif # NO_BINPLACE
  9712.             /l:$(LANGUAGE)
  9713.         cd $(MAKEDIR)
  9714. !  endif # DO_LSBUILD && BUILD_CMI_LCG
  9715.  
  9716. ! endif
  9717.  
  9718.  
  9719.  
  9720.  
  9721. ! ifdef PROD_SOURCE_MANIFEST
  9722. $(PROD_SOURCE_MANIFEST): $(CMI_PROD_MANIFESTS)
  9723.     set build.production=1
  9724.     set BUILDMSG=DiagValid is validating manifest instrumentation.
  9725.     "diagvalid.exe" "$(RAZZLETOOLPATH)\diagvalid\exceptions.xml" $?
  9726. !ifndef DISABLE_CV
  9727.     set BUILDMSG=Component Validation is validating manifests.
  9728.     $(_URTRUN_20) ValidateManifest $(CV_BCZOPTIONS) $(CV_OPTIONS) /useprofile=$(CV_BCZPROFILE) <<$(@D)\ProdManifestsToBevalidated
  9729. $?
  9730. <<$(BUILD_NOKEEP)
  9731. !endif
  9732. !   ifdef CACHE_SOURCE_MANIFESTS
  9733.     set BUILDMSG=Source manifests are being cached.
  9734.     $(_URTRUN_20) CacheManifest $(MAKEDIR) $(CACHE_SOURCE_MANIFESTS) <<$(@D)\ManifestsToBeCached
  9735. $?
  9736. <<$(BUILD_NOKEEP)
  9737. !   endif
  9738. ! if !defined(DISABLE_SOURCE_MANIFEST_VALIDATION)
  9739.     set BUILDMSG=Manifest schema and formatting is being checked.
  9740.     checksourcemanifests -obj:$(OBJ_PATH)\$O <<$(@D)\ManifestsToBeChecked
  9741. $(**: =
  9742. )
  9743. <<$(BUILD_NOKEEP)
  9744. ! endif
  9745.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\prod_$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE) $$(build.production) 1
  9746.     !$(MANIFEST_RCPARSER_CMD) $(@D)\prod_$(?F).temp0 $(@D)\prod_$(?F).temp1 -l $(@D)\prod_rcmanparse.log -a
  9747.     set build.production=
  9748.     !$(_DELFILE) $(@D)\prod_$(?F).temp0
  9749.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix prod_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9750. $?
  9751. <<$(BUILD_NOKEEP)
  9752. !  ifndef NO_BINPLACE
  9753.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9754. !   ifdef MANIFEST_DIRECTORY2
  9755.         $(MANIFEST_DIRECTORY2)\production:$(MANIFEST_DIRECTORY)\production \
  9756. !   else
  9757.     $(MANIFEST_DIRECTORY)\production \
  9758. !   endif
  9759.     @$@.temp /:DEST $(CMI_RES_BINPLACE)\production @$@.temp.resources
  9760. !  endif
  9761.  
  9762. !if defined(WINPE_COMPILE_SMI_MANIFEST) && !defined(NO_BINPLACE)
  9763. ! if "$(WINPE_COMPILE_SMI_MANIFEST)" != "1"
  9764. !  error WINPE_COMPILE_SMI_MANIFEST must be set to 1 or not defined
  9765. ! endif
  9766.   $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  9767. ! if !defined(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE)
  9768.                     /:DEST WinPE_SMI_Manifests \
  9769. ! else
  9770.                     /P $(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE) \
  9771. ! endif
  9772.                     @$@.temp
  9773. !endif
  9774.  
  9775. #!if defined(SKU_SETTINGS_OVERRIDE_FILES)
  9776. #    $(BINPLACE_CMD) /:DEST SKU-Settings-Overrides $(SKU_SETTINGS_OVERRIDE_FILES)
  9777. #!endif
  9778.  
  9779. # Create LCG files for CMI_PROD_MANIFESTS files if needed
  9780. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9781.        set BUILDMSG=making CMI_PROD_MANIFESTS (production) with CreateLCGFile.pl
  9782.        set BUILDMSG= DIR: $(@D)
  9783.        set createfile=<<$(@D)\cmi_prod_manifests.lcg.lst
  9784. prod_$(**F: =
  9785. prod_)
  9786. <<keep
  9787. !   ifndef NO_BINPLACE
  9788.         set createfile=<<$(@D)\cmi_prod_manifests.lcg.binplace.txt
  9789. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw
  9790. <<keep
  9791. !   endif # NO_BINPLACE
  9792.         cd $(@D)
  9793.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9794.             /c \
  9795.             /m:$(@D)\cmi_prod_manifests.lcg.lst \
  9796.             /t:$(@D) \
  9797.             $(LSBUILD_PARSER_ID_OPTION) \
  9798.             $(ALT_LCI_DIR_OPTION) \
  9799.             /s:$(LSBUILD_PARSER_SETTINGS) \
  9800. !   ifndef NO_BINPLACE
  9801.             /b:$(@D)\cmi_prod_manifests.lcg.binplace.txt \
  9802.             /r:$(LCG_BINPLACE_TARGET) \
  9803. !   endif # NO_BINPLACE
  9804.             /l:$(LANGUAGE)
  9805.         cd $(MAKEDIR)
  9806. !  endif # DO_LSBUILD && BUILD_CMI_LCG
  9807.  
  9808.     move $@.temp $@
  9809.  
  9810. ! endif # ifdef PROD_SOURCE_MANIFEST
  9811.  
  9812. ! ifdef PROD_WOW64_SOURCE_MANIFEST
  9813. $(PROD_WOW64_SOURCE_MANIFEST): $(CMI_WOW64_PROD_MANIFESTS)
  9814.     set build.arch=wow64
  9815.     set build.production=1
  9816.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\prod_wow64_$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) wow64 $$(build.production) 1
  9817.     !$(MANIFEST_RCPARSER_CMD) $(@D)\prod_wow64_$(?F).temp0 $(@D)\prod_wow64_$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9818.     set build.production=
  9819.     set build.arch=$(_BUILDARCH)
  9820.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix prod_wow64_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS) $(CMI_WOW64_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9821. $?
  9822. <<$(BUILD_NOKEEP)
  9823. !  ifndef NO_BINPLACE
  9824.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9825. !   ifdef MANIFEST_DIRECTORY2
  9826.         $(MANIFEST_DIRECTORY2)\wow6432\production:$(MANIFEST_DIRECTORY)\wow6432\production \
  9827. !   else
  9828.         $(MANIFEST_DIRECTORY)\wow6432\production \
  9829. !   endif
  9830.         @$@.temp /:DEST $(CMI_RES_BINPLACE)\wow6432\production @$@.temp.resources
  9831. !  endif
  9832.  
  9833. # Create LCG files for CMI_WOW64_PROD_MANIFESTS files if needed
  9834. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9835.        set BUILDMSG=making CMI_WOW64_PROD_MANIFESTS (production) with CreateLCGFile.pl
  9836.        set createfile=<<$(@D)\prod_cmi_wow64_manifests.lcg.lst
  9837. prod_wow64_$(**F: =
  9838. prod_wow64_)
  9839. <<keep
  9840. !   ifndef NO_BINPLACE
  9841.         set createfile=<<$(@D)\prod_cmi_wow64_manifests.lcg.binplace.txt
  9842. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw\wow6432
  9843. <<keep
  9844. !   endif # NO_BINPLACE
  9845.         cd $(@D)
  9846.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9847.             /c \
  9848.             /m:$(@D)\prod_cmi_wow64_manifests.lcg.lst \
  9849.             /t:$(@D) \
  9850.             $(LSBUILD_PARSER_ID_OPTION) \
  9851.             $(ALT_LCI_DIR_OPTION) \
  9852.             /s:$(LSBUILD_PARSER_SETTINGS) \
  9853. !   ifndef NO_BINPLACE
  9854.             /b:$(@D)\prod_cmi_wow64_manifests.lcg.binplace.txt \
  9855.             /r:$(LCG_BINPLACE_TARGET) \
  9856. !   endif # NO_BINPLACE
  9857.             /l:$(LANGUAGE)
  9858.         cd $(MAKEDIR)
  9859. !  endif # DO_LSBUILD && BUILD_CMI_LCG
  9860.  
  9861.     move $@.temp $@
  9862.  
  9863. ! endif # ifdef PROD_WOW64_SOURCE_MANIFEST
  9864.  
  9865. # Note that the internal CMI_PROD_MANIFESTS targets DO NOT
  9866. # create LCG files. That is done by the production targets.
  9867. # there should never be  reason to have different resources for
  9868. # production vs. internal distributions - that is just asking to waste
  9869. # localizer's time.
  9870. ! ifdef INTERNAL_SOURCE_MANIFEST
  9871. $(INTERNAL_SOURCE_MANIFEST): $(CMI_PROD_MANIFESTS)
  9872.     set build.internal=1
  9873.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\internal_$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE)  $$(build.internal) 1
  9874.     !$(MANIFEST_RCPARSER_CMD) $(@D)\internal_$(?F).temp0 $(@D)\internal_$(?F).temp1 -l $(@D)\internal_rcmanparse.log -a
  9875.     set build.internal=
  9876.     !$(_DELFILE) $(@D)\internal_$(?F).temp0
  9877.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix internal_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9878. $?
  9879. <<$(BUILD_NOKEEP)
  9880. !  ifndef NO_BINPLACE
  9881.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9882. !   ifdef MANIFEST_DIRECTORY2
  9883.         $(MANIFEST_DIRECTORY2)\internal:$(MANIFEST_DIRECTORY)\internal \
  9884. !   else
  9885.     $(MANIFEST_DIRECTORY)\internal \
  9886. !   endif
  9887.     @$@.temp /:DEST $(CMI_RES_BINPLACE)\internal @$@.temp.resources
  9888. !  endif
  9889.  
  9890. !if defined(WINPE_COMPILE_SMI_MANIFEST) && !defined(NO_BINPLACE)
  9891. ! if "$(WINPE_COMPILE_SMI_MANIFEST)" != "1"
  9892. !  error WINPE_COMPILE_SMI_MANIFEST must be set to 1 or not defined
  9893. ! endif
  9894.   $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) \
  9895. ! if !defined(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE)
  9896.                     /:DEST WinPE_SMI_Manifests \
  9897. ! else
  9898.                     /P $(WINPE_COMPILE_SMI_MANIFEST_PLACEFILE) \
  9899. ! endif
  9900.                     @$@.temp
  9901. !endif
  9902.  
  9903. ! endif # ifdef INTERNAL_SOURCE_MANIFEST
  9904.  
  9905. ! ifdef INTERNAL_WOW64_SOURCE_MANIFEST
  9906. $(INTERNAL_WOW64_SOURCE_MANIFEST): $(CMI_WOW64_PROD_MANIFESTS)
  9907.     set build.arch=wow64
  9908.     set build.internal=1
  9909.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\internal_wow64_$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) wow64 $$(build.internal) 1
  9910.     !$(MANIFEST_RCPARSER_CMD) $(@D)\internal_wow64_$(?F).temp0 $(@D)\internal_wow64_$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9911.     set build.arch=$(_BUILDARCH)
  9912.     set build.internal=
  9913.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix internal_wow64_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS) $(CMI_WOW64_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9914. $?
  9915. <<$(BUILD_NOKEEP)
  9916. !  ifndef NO_BINPLACE
  9917.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9918. !   ifdef MANIFEST_DIRECTORY2
  9919.         $(MANIFEST_DIRECTORY2)\wow6432\internal:$(MANIFEST_DIRECTORY)\wow6432\internal \
  9920. !   else
  9921.         $(MANIFEST_DIRECTORY)\wow6432\internal \
  9922. !   endif
  9923.         @$@.temp /:DEST $(CMI_RES_BINPLACE)\wow6432\internal @$@.temp.resources
  9924. !  endif
  9925.  
  9926.     move $@.temp $@
  9927.  
  9928. ! endif # ifdef INTERNAL_WOW64_SOURCE_MANIFEST
  9929.  
  9930. ! ifdef EDITION_SOURCE_MANIFEST
  9931. $(EDITION_SOURCE_MANIFEST): $(CMI_EDITION_MANIFESTS)
  9932.     set BUILDMSG=DiagValid is validating manifest instrumentation.
  9933.     "diagvalid.exe" "$(RAZZLETOOLPATH)\diagvalid\exceptions.xml" $?
  9934. !  ifndef DISABLE_CV
  9935.     set BUILDMSG=Component Validation is validating manifests.
  9936.     $(_URTRUN_20) ValidateManifest $(CV_BCZOPTIONS) $(CV_OPTIONS) /useprofile=$(CV_BCZPROFILE) <<$(@D)\ManifestsToBevalidated
  9937. $?
  9938. <<$(BUILD_NOKEEP)
  9939. !  endif
  9940. !   ifdef CACHE_SOURCE_MANIFESTS
  9941.     set BUILDMSG=Source manifests are being cached.
  9942.     $(_URTRUN_20) CacheManifest $(MAKEDIR) $(CACHE_SOURCE_MANIFESTS) <<$(@D)\ManifestsToBeCached
  9943. $?
  9944. <<$(BUILD_NOKEEP)
  9945. !   endif
  9946. ! if !defined(DISABLE_SOURCE_MANIFEST_VALIDATION)
  9947.     set BUILDMSG=Manifest schema and formatting is being checked.
  9948.     checksourcemanifests -obj:$(OBJ_PATH)\$O <<$(@D)\ManifestsToBeChecked
  9949. $(**: =
  9950. )
  9951. <<$(BUILD_NOKEEP)
  9952. ! endif
  9953. #
  9954. # ! means loop
  9955. # $? is the manifests with a later timestamp than $(SOURCE_MANIFEST)
  9956. # $(SOURCE_MANIFEST) is the list of manifests to be binplaced
  9957. # The .vbs manifest compiler takes ....foo.man and outputs $O\foo.man.temp0
  9958. # The RC manifest compiler takes $O\foo.man.temp0 and outputs $O\foo.man.temp1
  9959. # The temp file $O\foo.man.temp0 is deleted
  9960. # ManifestCompilerPass2.cmd takes $O\foo.man.temp1 and outputs $O\foo.man.
  9961. #
  9962.     !$(MANIFEST_COMPILER_CMD) $? $(@D)\$(?F).temp0 $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE)
  9963.     !$(MANIFEST_RCPARSER_CMD) $(@D)\$(?F).temp0 $(@D)\$(?F).temp1 -l $(@D)\rcmanparse.log -a
  9964.     !$(_DELFILE) $(@D)\$(?F).temp0
  9965.     $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  9966. $?
  9967. <<$(BUILD_NOKEEP)
  9968. !  ifndef NO_BINPLACE
  9969.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST Editions \
  9970.     @$@.temp /:DEST Editions @$@.temp.resources
  9971.  
  9972.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  9973. !   ifdef MANIFEST_DIRECTORY2
  9974.         $(MANIFEST_DIRECTORY2):$(MANIFEST_DIRECTORY) \
  9975. !   else
  9976.     $(MANIFEST_DIRECTORY) \
  9977. !   endif
  9978.     @$@.temp /:DEST $(CMI_RES_BINPLACE) @$@.temp.resources
  9979. !  endif
  9980.  
  9981.  
  9982. # Create LCG files for CMI_EDITION_MANIFESTS files if needed
  9983. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  9984.        set BUILDMSG=making CMI_EDITION_MANIFESTS with CreateLCGFile.pl
  9985.        set createfile=<<$(@D)\cmi_edition_manifests.lcg.lst
  9986. $(**F: =
  9987. )
  9988. <<keep
  9989. !   ifndef NO_BINPLACE
  9990.         set createfile=<<$(@D)\cmi_edition_manifests.lcg.binplace.txt
  9991. $(BINPLACE_FLAGS) /:DEST Editions.raw
  9992. <<keep
  9993. !   endif # NO_BINPLACE
  9994.         cd $(@D)
  9995.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  9996.             /c \
  9997.             /m:$(@D)\cmi_edition_manifests.lcg.lst \
  9998.             /t:$(@D) \
  9999.             $(LSBUILD_PARSER_ID_OPTION) \
  10000.             $(ALT_LCI_DIR_OPTION) \
  10001.             /s:$(LSBUILD_PARSER_SETTINGS) \
  10002. !   ifndef NO_BINPLACE
  10003.             /b:$(@D)\cmi_manifests.lcg.binplace.txt \
  10004.             /r:$(LCG_BINPLACE_TARGET) \
  10005. !   endif # NO_BINPLACE
  10006.             /l:$(LANGUAGE)
  10007.         cd $(MAKEDIR)
  10008. !  endif # DO_LSBUILD && BUILD_CMI_LCG
  10009.  
  10010.     move $@.temp $@
  10011.  
  10012. ! endif # ifdef EDITION_SOURCE_MANIFEST
  10013.  
  10014.  
  10015. ! ifdef WINPE_SOURCE_MANIFEST
  10016. $(WINPE_SOURCE_MANIFEST): $(CMI_WINPE_MANIFESTS)
  10017.    set build.arch=
  10018.    !$(MANIFEST_COMPILER_CMD) $? $(@D)\winpe_$(?F).temp1 $(MANIFEST_COMPILER_BASE_ARGUMENTS) $(CMI_WINPE_MANIFEST_COMPILER_EXTRA_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE)
  10019.    set build.arch=$(_BUILDARCH)
  10020.    $(_PERL) $(RAZZLETOOLPATH)\ManifestCompilerPass2.cmd -OutputFilePrefix winpe_ -InputManifestList << -OutputManifestList $@.temp -PerfTrackManifests "$(PERFTRACK_MANIFESTS)" -PerfTrackOptions " $(PERFTRACK_OPTIONS)" -ObjectPath $(@D) -MtOptions "$(MT_OPTIONS)" -ManifestsWithSpuriousCompositions "$(CMI_MANIFESTS_WITH_SPURIOUS_COMPOSITIONS)"
  10021. $?
  10022. <<$(BUILD_NOKEEP)
  10023. !  ifndef NO_BINPLACE
  10024.     $(BINPLACE_TOOL) $(BINPLACE_FLAGS) $(BINPLACE_LC_MISCFLAGS) /:DEST \
  10025. !   ifdef MANIFEST_DIRECTORY2
  10026.         $(MANIFEST_DIRECTORY2):$(MANIFEST_DIRECTORY) \
  10027. !   else
  10028.     $(MANIFEST_DIRECTORY) \
  10029. !   endif
  10030.     @$@.temp /:DEST $(CMI_RES_BINPLACE) @$@.temp.resources
  10031. !  endif
  10032.  
  10033. # Create LCG files for CMI_WINPE_MANIFESTS files if needed
  10034. !  if "$(DO_LSBUILD)" == "1" && "$(BUILD_CMI_LCG)" == "1"
  10035.        set BUILDMSG=making CMI_WINPE_MANIFESTS with CreateLCGFile.pl
  10036.        set createfile=<<$(@D)\cmi_winpe_manifests.lcg.lst
  10037. winpe_$(**F: =
  10038. winpe_)
  10039. <<keep
  10040. !   ifndef NO_BINPLACE
  10041.         set createfile=<<$(@D)\cmi_winpe_manifests.lcg.binplace.txt
  10042. $(BINPLACE_FLAGS) /:DEST cmicomponents.raw
  10043. <<keep
  10044. !   endif # NO_BINPLACE
  10045.         cd $(@D)
  10046.         $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  10047.             /c \
  10048.             /m:$(@D)\cmi_winpe_manifests.lcg.lst \
  10049.             /t:$(@D) \
  10050.             $(LSBUILD_PARSER_ID_OPTION) \
  10051.             $(ALT_LCI_DIR_OPTION) \
  10052.             /s:$(LSBUILD_PARSER_SETTINGS) \
  10053. !   ifndef NO_BINPLACE
  10054.             /b:$(@D)\cmi_manifests.lcg.binplace.txt \
  10055.             /r:$(LCG_BINPLACE_TARGET) \
  10056. !   endif # NO_BINPLACE
  10057.             /l:$(LANGUAGE)
  10058.         cd $(MAKEDIR)
  10059. !  endif # DO_LSBUILD && BUILD_CMI_LCG
  10060.  
  10061.     move $@.temp $@
  10062.  
  10063. ! endif
  10064.  
  10065.  
  10066. !endif # defined(SOURCE_MANIFEST) || defined(WOW64_SOURCE_MANIFEST) || defined(EVENTS_MANIFEST) || defined(SLS_LICENSING_MANIFEST) || defined(EDITION_SOURCE_MANIFEST) || defined(WINPE_SOURCE_MANIFEST)
  10067.  
  10068.  
  10069. !ifndef PASS_INDEPENDENT_TARGETS # { {
  10070.  
  10071. #
  10072. # Currently, service tables are sorted according to profile data on WIN64,
  10073. # but not X86.
  10074. #
  10075. # 32-bit binaries built for Wow64 (ntdll, etc.) must also use the sorted
  10076. # tables.
  10077. #
  10078. # Use GENSRV_PREPROCESS for "normal" service table preprocessing, and
  10079. # GENSRV_PREPROCESS_WOW64 for wow64 binary generation.
  10080. #
  10081.  
  10082. GENSRV_PREPROCESS_WOW64 = $(C_PREPROCESSOR) $** | gensrv -prof $(BASE_INC_PATH)\services.prof > $@
  10083. !if $(IA64) || $(AMD64)
  10084. GENSRV_PREPROCESS = $(GENSRV_PREPROCESS_WOW64)
  10085. !else
  10086. GENSRV_PREPROCESS = $(C_PREPROCESSOR) $** > $@
  10087. !endif
  10088.  
  10089. !if defined(NTTARGETFILES) \
  10090.     || defined(NTTARGETFILE0) \
  10091.     || defined(NTTARGETFILE1) \
  10092.     || defined(NTTARGETFILE2) \
  10093.     || defined(USE_MAKEFILE_INC) \
  10094.  
  10095. ! INCLUDE .\makefile.inc
  10096. !ENDIF
  10097.  
  10098. !if "$(XAML_COMPILATION)" == "1"
  10099. ! INCLUDE $(NTMAKEENV)\wcpcompiler.inc
  10100. !endif
  10101.  
  10102. !if defined(_PROJECT_BUILDS_MANAGED_CODE) && ("$(BUILD_PRODUCT)" == "NT") && "$(MANAGED_TARGET_TYPE)" != "module" # { {
  10103.  
  10104. !ifdef INTERNALS_VISIBLE_TO
  10105.  
  10106. # Add asmmeta flags
  10107. #
  10108. ASMMETA_PRESERVE_INTERNALS_VISIBLE_TO_ATTRIBUTE = 1
  10109.  
  10110. # Get rid of spaces.
  10111. #
  10112. INTERNALS_VISIBLE_TO=$(INTERNALS_VISIBLE_TO: =)
  10113.  
  10114. # get rid of the leading ; if there is one
  10115. #
  10116. INTERNALS_VISIBLE_TO=; $(INTERNALS_VISIBLE_TO)
  10117. INTERNALS_VISIBLE_TO=$(INTERNALS_VISIBLE_TO:; ;=)
  10118. INTERNALS_VISIBLE_TO=$(INTERNALS_VISIBLE_TO:; =)
  10119.  
  10120. # get rid of the trailing ; if there is one
  10121. #
  10122. INTERNALS_VISIBLE_TO=$(INTERNALS_VISIBLE_TO) ;
  10123. INTERNALS_VISIBLE_TO=$(INTERNALS_VISIBLE_TO:; ;=)
  10124. INTERNALS_VISIBLE_TO=$(INTERNALS_VISIBLE_TO: ;=)
  10125.  
  10126. !endif
  10127.  
  10128. !ifdef COM_VISIBLE # { {
  10129. !  if "$(COM_VISIBLE)" == "0" # { {
  10130. COM_VISIBLE=false
  10131. !  endif # } }
  10132. !  if "$(COM_VISIBLE)" == "1" # { {
  10133. COM_VISIBLE=true
  10134. !  endif # } }
  10135. !else # } {
  10136. COM_VISIBLE=false
  10137. !endif # } }
  10138.  
  10139. !if defined(_C_SHARP) # { {
  10140. #
  10141. # Disable warning CS1699 to use _keyfile.cs
  10142. #
  10143. !  ifdef COMPLUS_VERSION # {
  10144. !    if "$(COMPLUS_VERSION)" >= "v2.0" # {
  10145. USER_CS_FLAGS=$(USER_CS_FLAGS) /nowarn:1699
  10146. !    endif # }
  10147. !  endif # }
  10148.  
  10149.  
  10150. !if $(USE_OBJECT_ROOT)
  10151. _MANAGED_SOURCES=$(_MANAGED_SOURCES) $(OBJ_PATH)\$O\_generated.cs
  10152. $(OBJ_PATH)\$O\_generated.cs: \
  10153. !else
  10154. _MANAGED_SOURCES=$(_MANAGED_SOURCES) $O\_generated.cs
  10155. $O\_generated.cs: \
  10156. !endif
  10157. $(SOURCES_USED)
  10158.     -$(_DEL)
  10159.     set createfile=<<$@.temp
  10160. //
  10161. // <copyright file="_generated.cs" company="Microsoft">
  10162. //     Copyright (c) Microsoft Corporation.  All rights reserved.
  10163. // </copyright>
  10164. // <summary>Generated file with version information.</summary>
  10165. //
  10166.  
  10167. !if defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES) && "$(MUI)" == "1" && "$(URT_VER)" == "2.0"
  10168. [assembly:System.Resources.NeutralResourcesLanguage("en")]
  10169. !endif
  10170. [assembly:System.Runtime.InteropServices.ComVisible($(COM_VISIBLE))]
  10171. [assembly:System.Reflection.AssemblyVersion("$(ASSEMBLY_IDENTITY_VERSION)")]
  10172. !ifdef VER_PRODUCTNAME_STR
  10173. [assembly:System.Reflection.AssemblyProduct("$(VER_PRODUCTNAME_STR)")]
  10174. !endif
  10175. !ifdef VER_LEGALCOPYRIGHT_STR
  10176. [assembly:System.Reflection.AssemblyCopyright("$(VER_LEGALCOPYRIGHT_STR)")]
  10177. !endif
  10178. !ifdef VER_COMPANYNAME_STR
  10179. [assembly:System.Reflection.AssemblyCompany("$(VER_COMPANYNAME_STR)")]
  10180. !endif
  10181. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION) && defined(VER_FILEVERSION_STR)
  10182. [assembly:System.Reflection.AssemblyFileVersion("$(VER_FILEVERSION_STR)")]
  10183. !elseif defined(VER_PRODUCTVERSION_STR)
  10184. [assembly:System.Reflection.AssemblyFileVersion("$(VER_PRODUCTVERSION_STR)")]
  10185. !endif
  10186. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION)
  10187. !  ifdef VER_PRODUCTVERSION_STR
  10188. [assembly:System.Reflection.AssemblyInformationalVersion("$(VER_PRODUCTVERSION_STR)")]
  10189. !  elseif defined(VER_FILEVERSION_STR)
  10190. [assembly:System.Reflection.AssemblyInformationalVersion("$(VER_FILEVERSION_STR)")]
  10191. !  endif
  10192. !endif
  10193. !ifdef INTERNALS_VISIBLE_TO
  10194. [assembly:System.Runtime.CompilerServices.InternalsVisibleTo("$(INTERNALS_VISIBLE_TO:;="^)]
  10195. [assembly:System.Runtime.CompilerServices.InternalsVisibleTo(")")]
  10196. !endif
  10197. <<KEEP
  10198. !if defined(_ASSEMBLY_IDENTITY) \
  10199.         && "$(_ASSEMBLY_IDENTITY_PUBLIC_KEY_NAME_LOWERCASE)" != "none" \
  10200.         && "$(_ASSEMBLY_IDENTITY:\=)" == "$(_ASSEMBLY_IDENTITY)" \
  10201.         && !defined(_MANAGED_CXX_LIBRARY) \
  10202.         && "$(MANAGED_TARGET_TYPE)" != "module"
  10203.     asmIdToAttribs "$(_ASSEMBLY_IDENTITY)" $@.temp csharp
  10204. !endif
  10205.     $(_MOVE)
  10206.  
  10207. !elseif defined(MANAGED_CXX) # } {
  10208.  
  10209. !  ifndef _MANAGED_CXX_LIBRARY # { {
  10210.  
  10211. !    if "$(BUILD_PASS)" != "PASS0" # { {
  10212.  
  10213. !if $(USE_OBJECT_ROOT)
  10214. OBJECTS=$(OBJECTS)               $(OBJ_PATH)\$O\_generated.obj
  10215. TARGETOBJFILES=$(TARGETOBJFILES) $(OBJ_PATH)\$O\_generated.obj
  10216. IMPLIB_DEPEND=$(IMPLIB_DEPEND)   $(OBJ_PATH)\$O\_generated.obj
  10217. $(OBJ_PATH)\$O\_generated.cpp: \
  10218. !else
  10219. OBJECTS=$(OBJECTS)               $O\_generated.obj
  10220. TARGETOBJFILES=$(TARGETOBJFILES) $O\_generated.obj
  10221. IMPLIB_DEPEND=$(IMPLIB_DEPEND)   $O\_generated.obj
  10222. $O\_generated.cpp: \
  10223. !endif
  10224. $(SOURCES_USED)
  10225.     -$(_DEL)
  10226.     set createfile=<<$@.temp
  10227. !if "$(PRECOMPILED_INCLUDE)" != "" && "$(PRECOMPILED_CXX)" != "" && "$(NTNOPCH)" != "1"
  10228. #include "$(PRECOMPILED_INCLUDE_BASENAME)"
  10229. !endif
  10230. !if defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES) && "$(MUI)" == "1" && "$(URT_VER)" == "2.0"
  10231. [assembly:System::Resources::NeutralResourcesLanguage("en")];
  10232. !endif
  10233. [assembly:System::Runtime::InteropServices::ComVisible($(COM_VISIBLE))];
  10234. !ifdef ASSEMBLY_IDENTITY_VERSION
  10235. [assembly:System::Reflection::AssemblyVersion("$(ASSEMBLY_IDENTITY_VERSION)")];
  10236. !endif
  10237. !ifdef VER_PRODUCTNAME_STR
  10238. [assembly:System::Reflection::AssemblyProduct("$(VER_PRODUCTNAME_STR)")];
  10239. !endif
  10240. !ifdef VER_LEGALCOPYRIGHT_STR
  10241. [assembly:System::Reflection::AssemblyCopyright("$(VER_LEGALCOPYRIGHT_STR)")];
  10242. !endif
  10243. !ifdef VER_COMPANYNAME_STR
  10244. [assembly:System::Reflection::AssemblyCompany("$(VER_COMPANYNAME_STR)")];
  10245. !endif
  10246. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION) && defined(VER_FILEVERSION_STR)
  10247. [assembly:System::Reflection::AssemblyFileVersion("$(VER_FILEVERSION_STR)")];
  10248. !endif
  10249. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION)
  10250. !  ifdef VER_PRODUCTVERSION_STR
  10251. [assembly:System::Reflection::AssemblyInformationalVersion("$(VER_PRODUCTVERSION_STR)")];
  10252. !  elseif defined(VER_FILEVERSION_STR)
  10253. [assembly:System::Reflection::AssemblyInformationalVersion("$(VER_FILEVERSION_STR)")];
  10254. !  endif
  10255. !endif
  10256. !if defined(INTERNALS_VISIBLE_TO)
  10257. [assembly:System::Runtime::CompilerServices::InternalsVisibleTo("$(INTERNALS_VISIBLE_TO:;="^)];
  10258. [assembly:System::Runtime::CompilerServices::InternalsVisibleTo(")")];
  10259. !endif
  10260. <<KEEP
  10261. !if defined(_ASSEMBLY_IDENTITY) \
  10262.         && "$(_ASSEMBLY_IDENTITY_PUBLIC_KEY_NAME_LOWERCASE)" != "none" \
  10263.         && "$(_ASSEMBLY_IDENTITY:\=)" == "$(_ASSEMBLY_IDENTITY)" \
  10264.         && !defined(_MANAGED_CXX_LIBRARY) \
  10265.         && "$(MANAGED_TARGET_TYPE)" != "module"
  10266.     asmIdToAttribs "$(_ASSEMBLY_IDENTITY)" $@.temp c
  10267. !endif
  10268.     $(_MOVE)
  10269.  
  10270. !    endif # } }
  10271. !  endif # } }
  10272.  
  10273. !elseif defined(_VB) # } {
  10274.  
  10275. #
  10276. # Disable warning keyfile warning - change to same test as above for CS when compiler is updated.
  10277. #
  10278. USER_VB_NET_FLAGS=$(USER_VB_NET_FLAGS) /nowarn:41008
  10279.  
  10280. !if $(USE_OBJECT_ROOT)
  10281. _MANAGED_SOURCES=$(_MANAGED_SOURCES) $(OBJ_PATH)\$O\_generated.vb
  10282. $(OBJ_PATH)\$O\_generated.vb: \
  10283. !else
  10284. _MANAGED_SOURCES=$(_MANAGED_SOURCES) $O\_generated.vb
  10285. $O\_generated.vb: \
  10286. !endif
  10287. $(SOURCES_USED)
  10288.     -$(_DEL)
  10289.     set createfile=<<$@.temp
  10290. !if defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES) && "$(MUI)" == "1" && "$(URT_VER)" == "2.0"
  10291. <assembly:System.Resources.NeutralResourcesLanguage("en")>
  10292. !endif
  10293. <assembly:System.Runtime.InteropServices.ComVisible($(COM_VISIBLE))>
  10294. <assembly:System.Reflection.AssemblyVersion("$(ASSEMBLY_IDENTITY_VERSION)")>
  10295. !ifdef VER_PRODUCTNAME_STR
  10296. <assembly:System.Reflection.AssemblyProduct("$(VER_PRODUCTNAME_STR)")>
  10297. !endif
  10298. !ifdef VER_LEGALCOPYRIGHT_STR
  10299. <assembly:System.Reflection.AssemblyCopyright("$(VER_LEGALCOPYRIGHT_STR)")>
  10300. !endif
  10301. !ifdef VER_COMPANYNAME_STR
  10302. <assembly:System.Reflection.AssemblyCompany("$(VER_COMPANYNAME_STR)")>
  10303. !endif
  10304. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION) && defined(VER_FILEVERSION_STR)
  10305. <assembly:System.Reflection.AssemblyFileVersion("$(VER_FILEVERSION_STR)")>
  10306. !elseif defined(VER_PRODUCTVERSION_STR)
  10307. <assembly:System.Reflection.AssemblyFileVersion("$(VER_PRODUCTVERSION_STR)")>
  10308. !endif
  10309. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION)
  10310. !  ifdef VER_PRODUCTVERSION_STR
  10311. <assembly:System.Reflection.AssemblyInformationalVersion("$(VER_PRODUCTVERSION_STR)")>
  10312. !  elseif defined(VER_FILEVERSION_STR)
  10313. <assembly:System.Reflection.AssemblyInformationalVersion("$(VER_FILEVERSION_STR)")>
  10314. !  endif
  10315. !endif
  10316. !if defined(INTERNALS_VISIBLE_TO)
  10317. <assembly:System.Runtime.CompilerServices.InternalsVisibleTo("$(INTERNALS_VISIBLE_TO:;="^)>
  10318. <assembly:System.Runtime.CompilerServices.InternalsVisibleTo(")")>
  10319. !endif
  10320. <<KEEP
  10321. !if defined(_ASSEMBLY_IDENTITY) \
  10322.         && "$(_ASSEMBLY_IDENTITY_PUBLIC_KEY_NAME_LOWERCASE)" != "none" \
  10323.         && "$(_ASSEMBLY_IDENTITY:\=)" == "$(_ASSEMBLY_IDENTITY)" \
  10324.         && !defined(_MANAGED_CXX_LIBRARY) \
  10325.         && "$(MANAGED_TARGET_TYPE)" != "module"
  10326.     asmIdToAttribs "$(_ASSEMBLY_IDENTITY)" $@.temp managed_vb
  10327. !endif
  10328.     $(_MOVE)
  10329.  
  10330. !elseif defined(_TLBIMP) # } {
  10331.  
  10332. !else # } {
  10333.  
  10334. !  error unknown language
  10335.  
  10336. !endif # _C_SHARP, MANAGED_CXX, _VB, _TLBIMP # } }
  10337.  
  10338.  
  10339. !endif # _PROJECT_BUILDS_MANAGED_CODE } }
  10340.  
  10341.  
  10342. !IF "$(PRECOMPILED_INCLUDE)" != ""
  10343. ! ifdef PRECOMPILED_SOURCEFILE
  10344. !  ifdef PRECOMPILED_INCLUDE_BASENAME
  10345. $(PRECOMPILED_TARGET) $(HEADEROBJNAME): $(PRECOMPILED_INCLUDE) $(PRECOMPILED_SOURCEFILE)
  10346. !  else
  10347. PRECOMPILED_INCLUDE_BASENAME=$(?F)
  10348. $(PRECOMPILED_TARGET) $(HEADEROBJNAME): $(PRECOMPILED_INCLUDE)
  10349. !  endif
  10350.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  10351. $(ECHO_PRECOMPILED_MSG1)
  10352. <<$(BUILD_NOKEEP)
  10353.     @$(C_COMPILER_NAME) @<< $(PRECOMPILED_FLAG) $(PRECOMPILED_SOURCEFILE)
  10354. !if "$(PRECOMPILED_CXX)" == ""
  10355. $(EX_C_COMPILER_FLAGS_NOPCH)
  10356. !else
  10357. $(EX_CXX_COMPILER_FLAGS_NOPCH)
  10358. !endif
  10359. /Yl$(TARGETNAME) /Yc$(PRECOMPILED_INCLUDE_BASENAME) $(HEADERFILE) $(HEADEROBJ)
  10360. <<$(BUILD_NOKEEP)
  10361. ! else
  10362. !  ifndef PRECOMPILED_INCLUDE_BASENAME
  10363. PRECOMPILED_INCLUDE_BASENAME=$(?F)
  10364. !  endif
  10365. $(PRECOMPILED_TARGET) $(HEADEROBJNAME): $(PRECOMPILED_INCLUDE)
  10366.     @$(_TYPE) <<$(TYPE_RESPONSE_FILE)
  10367. $(ECHO_PRECOMPILED_MSG2)
  10368.  
  10369. #include "$(PRECOMPILED_INCLUDE_BASENAME)"
  10370.  
  10371. <<$(BUILD_NOKEEP)
  10372.     @$(C_COMPILER_NAME) @<< $(PRECOMPILED_FLAG)<<$(OBJ_PATH)\$O\pch_hdr.src
  10373. !if "$(PRECOMPILED_CXX)" == ""
  10374. $(EX_C_COMPILER_FLAGS_NOPCH)
  10375. !else
  10376. $(EX_CXX_COMPILER_FLAGS_NOPCH)
  10377. !endif
  10378. /Yl$(TARGETNAME) /Yc$(PRECOMPILED_INCLUDE_BASENAME) $(HEADERFILE) $(HEADEROBJ)
  10379. <<$(BUILD_NOKEEP)
  10380. #include "$(PRECOMPILED_INCLUDE_BASENAME)"
  10381. <<KEEP
  10382. ! endif
  10383.  
  10384. pch_hdr.pp:
  10385.     set _CL_=/P
  10386.     -$(_DELFILE) pch_hdr.i pch_hdr.pp
  10387.     nmake /nologo /f $(NTMAKEENV)\makefile.def $(PRECOMPILED_TARGET) $(HEADEROBJNAME)
  10388.     rename pch_hdr.i pch_hdr.pp
  10389.  
  10390. !ENDIF
  10391.  
  10392. !if !defined(NOLINK) && "$(UMAPPL)" != ""
  10393.  
  10394. #
  10395. # Standard inference rule for User Mode object files that produce User Mode
  10396. # image files
  10397. #
  10398. UMEXEFILE_LIBS = $(BO_LIB) $(UMLIBS) $(LIBC_LIB) $(CRTLIBS) $(MACHINE_TARGETLIBS) $(LINKLIBS)
  10399.  
  10400. $(UMEXEFILES): $(UMOBJFILES) $(UMEXEFILE_LIBS) $(UMRES)
  10401.     $(LINKER) @<<$(LINK_RSP)
  10402. $(LINKER_FLAGS: =
  10403. )
  10404. $(LINKER_STACKSIZE)
  10405. $(TSLINKER_FLAG)
  10406. $(DYNAMICBASE_FLAG)
  10407. $(ORDER: =
  10408. )
  10409. $(LINKGPSIZE: =
  10410. )
  10411. $(HEADEROBJNAME: =
  10412. )
  10413. $(LINKER_OPTIDATA)
  10414. /subsystem:$(SUBSYSTEM)
  10415. /base:$(UMBASE)
  10416. $(UMENTRY)
  10417. $(UMRES: =
  10418. )
  10419. $(*R).obj
  10420. $(UMEXEFILE_LIBS: =
  10421. )
  10422. <<$(BUILD_NOKEEP)
  10423. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10424.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10425.     set createfile=<<$@.binplace.txt \
  10426. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10427. <<Keep
  10428. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10429.     $(POST_BUILD_CMD)
  10430.     $(MAXDEP_CMD)
  10431.     $(OBFUSCATOR_CMD)
  10432.     $(MANAGED_SIGNCODE_CMD)
  10433.     $(SIGNCODE_CMD)
  10434.     $(MAKE_PLACEFILE_CMD)
  10435.     $(_BINPLACE_TARGET_COMMAND)
  10436.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10437.     $(LOCALIZE_BASE_FILE_CMD)
  10438.     $(_CHECK_IMPORTS_COMMAND)
  10439.     $(_CHECK_DELAYLOAD_COMMAND)
  10440. !endif
  10441.  
  10442. !if "$(BROWSERFILE)" != ""
  10443.  
  10444. ! ifndef BSCMAKE_FLAGS
  10445. BSCMAKE_FLAGS = -nologo
  10446. ! endif
  10447.  
  10448. $(BROWSERFILE) : \
  10449. ! if "$(OBJECTS)" != "" || "$(OTHER_SBR_FILES)" != ""
  10450.                 $(OBJ_PATH)\$O\*.sbr $(OTHER_SBR_FILES)
  10451.     bscmake $(BSCMAKE_FLAGS) -o "$(BROWSERFILE)" @<<$(OBJ_PATH)\$O\bscmake.rsp
  10452. $(**: =
  10453. )
  10454. <<$(BUILD_NOKEEP)
  10455. ! endif
  10456. !endif
  10457.  
  10458. #
  10459. # These dependencies produce the target binaries from the object files.
  10460. # These will trigger the sources to object inference rules to generate the
  10461. # object files.
  10462. #
  10463.  
  10464. !IF "$(TARGET)" != ""
  10465. ! IF "$(TARGETTYPE)" == "PROGLIB"
  10466. $(TARGET:.exe=.lib) $(DYNLINK_EXP): \
  10467. !  if "$(BUILD_PASS)" != "PASS2"
  10468.                                          $(IMPLIB_DEPEND) \
  10469. !  endif
  10470.                                          $(DLLDEF)
  10471.     $(LIB_NAME) /out:$(@R).lib @<<$(LIB_RESPONSE_FILE)
  10472. $(LIBRARIAN_FLAGS: =
  10473. )
  10474. !if !defined(MCPP_TYPE)
  10475. /def:$(DLLDEF)
  10476. !endif
  10477. $(LIBRARY_OBJS: =
  10478. )
  10479. <<$(BUILD_NOKEEP)
  10480.     $(LINT_CMD2)
  10481.  
  10482. $(TARGET): $(_RES_FILE) $(OBJECTS) $(DYNLINK_EXP) $(UMRES) $(BO_LIB) $(UMLIBS) $(CRTLIBS) $(MACHINE_TARGETLIBS) $(LINKLIBS)
  10483.     $(LINKER) @<<$(LINK_RSP)
  10484. $(LINKER_FLAGS: =
  10485. )
  10486. $(LINKER_STACKSIZE)
  10487. $(TSLINKER_FLAG)
  10488. $(DYNAMICBASE_FLAG)
  10489. $(ORDER: =
  10490. )
  10491. $(LINKGPSIZE: =
  10492. )
  10493. $(HEADEROBJNAME: =
  10494. )
  10495. $(LINKER_OPTIDATA)
  10496. /subsystem:$(SUBSYSTEM)
  10497. /base:$(UMBASE)
  10498. $(UMENTRY: =
  10499. )
  10500. $(**: =
  10501. )
  10502. <<$(BUILD_NOKEEP)
  10503. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10504.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10505.     set createfile=<<$@.binplace.txt \
  10506. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10507. <<Keep
  10508. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10509.     $(POST_BUILD_CMD)
  10510.     $(MAXDEP_CMD)
  10511.     $(PGULOG_CMD)
  10512.     $(OBFUSCATOR_CMD)
  10513.     $(MANAGED_SIGNCODE_CMD)
  10514.     $(SIGNCODE_CMD)
  10515.     $(MAKE_PLACEFILE_CMD)
  10516.     $(_BINPLACE_TARGET_COMMAND)
  10517.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10518.     $(LOCALIZE_BASE_FILE_CMD)
  10519.     $(_CHECK_IMPORTS_COMMAND)
  10520.     $(_CHECK_DELAYLOAD_COMMAND)
  10521.  
  10522.  
  10523. ! ELSEIF "$(TARGETTYPE)" == "PROGRAM"
  10524.  
  10525. !    if (!defined(_C_SHARP) && !defined(_VB))
  10526. $(TARGET): $(UMRES) $(_RES_FILE) $(OBJECTS) $(BO_LIB) $(CRTLIBS) $(UMLIBS) $(MACHINE_TARGETLIBS) $(LINKLIBS)
  10527.     $(LINKER) @<<$(LINK_RSP)
  10528. $(LINKER_FLAGS: =
  10529. )
  10530. $(LINKER_STACKSIZE)
  10531. $(TSLINKER_FLAG)
  10532. $(DYNAMICBASE_FLAG)
  10533. /subsystem:$(SUBSYSTEM)
  10534. /base:$(UMBASE)
  10535. $(ORDER: =
  10536. )
  10537. $(LINKGPSIZE: =
  10538. )
  10539. $(UMENTRY: =
  10540. )
  10541. $(LINKER_OPTIDATA)
  10542. $(HEADEROBJNAME: =
  10543. )
  10544. $(**: =
  10545. )
  10546. <<$(BUILD_NOKEEP)
  10547. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10548.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10549.     set createfile=<<$@.binplace.txt \
  10550. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10551. <<Keep
  10552. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10553.     $(POST_BUILD_CMD)
  10554.     $(MAXDEP_CMD)
  10555.     $(PGULOG_CMD)
  10556.     $(OBFUSCATOR_CMD)
  10557.     $(MANAGED_SIGNCODE_CMD)
  10558.     $(SIGNCODE_CMD)
  10559.     $(MAKE_PLACEFILE_CMD)
  10560.     $(_BINPLACE_TARGET_COMMAND)
  10561.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10562.     $(LINT_CMD2)
  10563.     $(LOCALIZE_BASE_FILE_CMD)
  10564.     $(_CHECK_IMPORTS_COMMAND)
  10565.     $(_CHECK_DELAYLOAD_COMMAND)
  10566.  
  10567.  
  10568. !  ELSE  # _C_SHARP or _VB is set
  10569. #
  10570. # Tlbimp does not support response files and tends to have short command lines.
  10571. # _MANAGED_SOURCES is $(SOURCES) but with .rc, .idl removed.
  10572. #
  10573. $(TARGET) : $(_MANAGED_SOURCES) $(_RES_FILE)
  10574. !if !defined(_TLBIMP)
  10575.     $(NOECHO) $(_TYPE) <<$(TYPE_RESPONSE_FILE)
  10576. $(MANAGED_CODE_BUILD_CMD)
  10577. <<$(BUILD_NOKEEP)
  10578.     $(NOECHO) $(MANAGED_CODE_BUILD_TOOL) @<<$(MANAGED_CODE_BUILD_TOOL_RESPONSE_FILE)
  10579. $(MANAGED_CODE_BUILD_SWITCHES)
  10580. $(_MANAGED_SOURCES)
  10581. <<$(BUILD_NOKEEP)
  10582. !else
  10583.     $(MANAGED_CODE_BUILD_TOOL) $(MANAGED_CODE_BUILD_SWITCHES) $(_MANAGED_SOURCES)
  10584. !endif
  10585. !if defined(_RES_FILE) && defined(_TLBIMP)
  10586.     ildasm /nobar /text $@ /out:$@.ilasm
  10587.     move $@ $@_no_res
  10588.     ilasm /quiet /dll /res:$(_RES_FILE) /output=$@ $@.ilasm $(ILASM_MACHINE_SWITCH)
  10589. !endif
  10590.     $(IBC_CMD)
  10591.     $(MANAGED_NXCOMPAT_CMD)
  10592.     $(POST_MANAGED_BUILD_CMD)
  10593.     $(MANAGED_SIGNCODE_CMD)
  10594.     $(SIGNCODE_CMD)
  10595.     $(_BINPLACE_TARGET_COMMAND)
  10596.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10597.  
  10598.  
  10599. !  ENDIF # _C_SHARP || _VB
  10600.  
  10601. ! ELSEIF "$(TARGETTYPE)" == "DYNLINK"
  10602.  
  10603. !  ifdef NO_DLL_EXPORTS
  10604. DYNLINK_EXP=
  10605. !  elseif (!defined(_C_SHARP) && !defined(_VB) && !defined(_TLBIMP))
  10606. $(DYNLINK_LIB) $(DYNLINK_EXP) : \
  10607. !   if "$(BUILD_PASS)" != "PASS2"
  10608.                                 $(IMPLIB_DEPEND) $(DLLLIBOBJECTS) \
  10609. !   endif
  10610.                                 $(DLLDEF)
  10611.     $(LIB_NAME) /out:$(DYNLINK_LIB) @<<$(LIB_RESPONSE_FILE)
  10612. $(LIBRARIAN_FLAGS: =
  10613. )
  10614. !if !defined(MCPP_TYPE)
  10615. /def:$(DLLDEF)
  10616. !endif
  10617. $(LIBRARY_OBJS: =
  10618. )
  10619. <<$(BUILD_NOKEEP)
  10620. !   IF "$(DLLLIBOBJECTS)" != " "
  10621.     $(LIB_NAME) /out:$(DYNLINK_LIB) @<<$(LIB_RESPONSE_FILE)
  10622. $(LIBRARIAN_FLAGS: =
  10623. )
  10624. $(@R).lib
  10625. $(DLLLIBOBJECTS)
  10626. <<$(BUILD_NOKEEP)
  10627. !   ENDIF
  10628.     $(LINT_CMD2)
  10629. !  endif # NO_DLL_EXPORTS
  10630.  
  10631. !  IF "$(MAKEDLL)" != ""
  10632.  
  10633. !    if (!defined(_C_SHARP) && !defined(_VB) && !defined(_TLBIMP))
  10634.  
  10635. $(TARGET): $(DYNLINK_EXP) $(_RES_FILE) $(OBJECTS) $(BO_LIB) $(LINKLIBS) $(CRTLIBS) $(MACHINE_TARGETLIBS)
  10636.     $(LINKER) @<<$(LINK_RSP)
  10637. $(LINKER_FLAGS: =
  10638. )
  10639. $(DYNAMICBASE_FLAG)
  10640. $(LINKER_STACKSIZE_DLL)
  10641. /dll
  10642. $(ORDER: =
  10643. )
  10644. $(LINKER_OPTIDATA)
  10645. /base:$(DLLBASE)
  10646. /subsystem:$(SUBSYSTEM)
  10647. $(DLLENTRY: =
  10648. )
  10649. $(HEADEROBJNAME: =
  10650. )
  10651. $(**: =
  10652. )
  10653. <<$(BUILD_NOKEEP)
  10654. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10655.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10656.     set createfile=<<$@.binplace.txt \
  10657. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10658. <<Keep
  10659. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10660.     $(POST_BUILD_CMD)
  10661.     $(MAXDEP_CMD)
  10662.     $(PGULOG_CMD)
  10663.     $(OBFUSCATOR_CMD)
  10664.     $(MANAGED_SIGNCODE_CMD)
  10665.     $(SIGN_THEME_FILE_CMD)
  10666.     $(SIGNCODE_CMD)
  10667.     $(MAKE_PLACEFILE_CMD)
  10668.     $(_BINPLACE_TARGET_COMMAND)
  10669.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10670.     $(MAPDUMP_CMD)
  10671.     $(LOCALIZE_BASE_FILE_CMD)
  10672.     $(_CHECK_IMPORTS_COMMAND)
  10673.     $(_CHECK_DELAYLOAD_COMMAND)
  10674. !if defined(NO_PUBLIC_EXPORTS)
  10675.     $(_DELFILE) $(@R).lib
  10676. !endif
  10677.     $(VALIDATE_DLLDEF_CMD)
  10678.     $(DETECT_UNUSED_LIBS_CMD)
  10679.  
  10680. !  ELSE  # _C_SHARP || _VB || _TLBIMP is set
  10681. #
  10682. # Tlbimp does not support response files and tends to have short command lines.
  10683. # _MANAGED_SOURCES is $(SOURCES) but with .rc, .idl removed.
  10684. #
  10685. $(TARGET) : $(_MANAGED_SOURCES) $(_RES_FILE)
  10686. !if !defined(_TLBIMP)
  10687.     $(NOECHO) $(_TYPE) <<$(TYPE_RESPONSE_FILE)
  10688. $(MANAGED_CODE_BUILD_CMD)
  10689. <<$(BUILD_NOKEEP)
  10690.     $(NOECHO) $(MANAGED_CODE_BUILD_TOOL) @<<$(MANAGED_CODE_BUILD_TOOL_RESPONSE_FILE)
  10691. $(MANAGED_CODE_BUILD_SWITCHES)
  10692. $(_MANAGED_SOURCES)
  10693. <<$(BUILD_NOKEEP)
  10694. !else
  10695.     $(MANAGED_CODE_BUILD_TOOL) $(MANAGED_CODE_BUILD_SWITCHES) $(_MANAGED_SOURCES)
  10696. !endif
  10697. !if defined(_RES_FILE) && defined(_TLBIMP)
  10698.     ildasm /nobar /text $@ /out:$@.ilasm
  10699.     move $@ $@_no_res
  10700.     ilasm /quiet /dll /res:$(_RES_FILE) /output=$@ $@.ilasm $(ILASM_MACHINE_SWITCH)
  10701. !endif
  10702.     $(IBC_CMD)
  10703.     $(MANAGED_NXCOMPAT_CMD)
  10704.     $(POST_MANAGED_BUILD_CMD)
  10705.     $(MANAGED_SIGNCODE_CMD)
  10706.     $(SIGNCODE_CMD)
  10707.     $(_BINPLACE_TARGET_COMMAND)
  10708.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10709.  
  10710.  
  10711. !  ENDIF # _C_SHARP || _VB || _TLBIMP
  10712.  
  10713. !  ENDIF # "$(MAKEDLL)" != ""
  10714.  
  10715. ! ELSEIF "$(TARGETTYPE)" == "LIBRARY"
  10716.  
  10717. $(TARGET): $(OBJECTS) $(OBJLIBFILES)
  10718.     -@erase $@ 2>nul
  10719.     $(LIBRARIAN) @<<$(LIB_RESPONSE_FILE)
  10720. $(HEADEROBJNAME: =
  10721. )
  10722. $(OBJECTS: =
  10723. )
  10724. $(OBJLIBFILES: =
  10725. )
  10726. <<$(BUILD_NOKEEP)
  10727.  
  10728.     $(LINT_CMD2)
  10729. ! ELSEIF "$(TARGETTYPE)" == "DRIVER" || \
  10730.     "$(TARGETTYPE)" == "MINIPORT"
  10731.  
  10732. $(TARGET): $(_RES_FILE) $(OBJECTS) $(BO_LIB) $(MACHINE_TARGETLIBS) $(CRTLIBS)
  10733.     $(LINKER) @<<$(LINK_RSP)
  10734. $(LINKER_FLAGS: =
  10735. )
  10736. $(LINKER_STACKSIZE_DLL)
  10737. $(ORDER: =
  10738. )
  10739. $(SECTION_INFO1)
  10740. $(SECTION_INFO2)
  10741. $(LINKER_OPTIDATA)
  10742. $(DRIVER_SWITCH)
  10743. /base:$(DRIVERBASE)
  10744. !  IF "$(DRIVERTYPE)" == "VXD"
  10745. /def:$(DLLDEF)
  10746. !  ELSE
  10747. $(DRIVER_ALIGN_SWITCH)
  10748. /subsystem:native,$(SUBSYSTEM_NATVER)
  10749. /entry:$(DRIVER_ENTRY)$(ENTRY_SUFFIX)
  10750. !endif
  10751. /out:$(TARGET)
  10752. $(HEADEROBJNAME: =
  10753. )
  10754. $(**: =
  10755. )
  10756. <<$(BUILD_NOKEEP)
  10757. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10758.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10759.     set createfile=<<$@.binplace.txt \
  10760. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10761. <<Keep
  10762. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10763.     $(POST_BUILD_CMD)
  10764.     $(MAXDEP_CMD)
  10765.     $(PGULOG_CMD)
  10766.     $(OBFUSCATOR_CMD)
  10767.     $(MANAGED_SIGNCODE_CMD)
  10768.     $(SIGNCODE_CMD)
  10769.     $(MAKE_PLACEFILE_CMD)
  10770.     $(_BINPLACE_TARGET_COMMAND)
  10771.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10772.     $(MAPDUMP_CMD)
  10773.     $(LINT_CMD2)
  10774.     $(LOCALIZE_BASE_FILE_CMD)
  10775.     $(_CHECK_IMPORTS_COMMAND)
  10776.     $(_CHECK_DELAYLOAD_COMMAND)
  10777.  
  10778.  
  10779. ! ELSEIF "$(TARGETTYPE)" == "GDI_DRIVER"
  10780.  
  10781. $(TARGET): $(_RES_FILE) $(OBJECTS) $(BO_LIB) $(MACHINE_TARGETLIBS) $(CRTLIBS) $(GDI_DRIVER_LIBS)
  10782.     $(LINKER) @<<$(LINK_RSP)
  10783. $(LINKER_FLAGS: =
  10784. )
  10785. $(LINKER_STACKSIZE_DLL)
  10786. /dll
  10787. $(ORDER: =
  10788. )
  10789. $(SECTION_INFO1)
  10790. $(SECTION_INFO2)
  10791. $(LINKER_OPTIDATA)
  10792. $(DRIVER_SWITCH)
  10793. $(DRIVER_ALIGN_SWITCH)
  10794. /subsystem:native,$(SUBSYSTEM_NATVER)
  10795. /base:$(DRIVERBASE)
  10796. /entry:$(GDI_DRIVER_ENTRY)$(GDI_ENTRY_SUFFIX)
  10797. /out:$(TARGET)
  10798. $(HEADEROBJNAME: =
  10799. )
  10800. $(**: =
  10801. )
  10802. <<$(BUILD_NOKEEP)
  10803. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10804.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10805.     set createfile=<<$@.binplace.txt \
  10806. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10807. <<Keep
  10808. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10809.     $(POST_BUILD_CMD)
  10810.     $(MAXDEP_CMD)
  10811.     $(PGULOG_CMD)
  10812.     $(OBFUSCATOR_CMD)
  10813.     $(MANAGED_SIGNCODE_CMD)
  10814.     $(SIGNCODE_CMD)
  10815.     $(MAKE_PLACEFILE_CMD)
  10816.     $(_BINPLACE_TARGET_COMMAND)
  10817.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10818.     $(MAPDUMP_CMD)
  10819.     $(LINT_CMD2)
  10820.     $(LOCALIZE_BASE_FILE_CMD)
  10821.     $(_CHECK_IMPORTS_COMMAND)
  10822.     $(_CHECK_DELAYLOAD_COMMAND)
  10823.  
  10824.  
  10825. ! ELSEIF "$(TARGETTYPE)" == "EXPORT_DRIVER"
  10826.  
  10827. $(DYNLINK_EXP) $(DYNLINK_LIB) : \
  10828. !  if "$(BUILD_PASS)" != "PASS2"
  10829. !if $(USE_DLLDEF_OBJECTS)
  10830.         $(DLLDEF_OBJECTS) \
  10831. !else
  10832.         $(BO_LIB) \
  10833.         $(LINKLIBS) \
  10834. !endif
  10835.         $(DLLLIBOBJECTS) \
  10836. !  endif
  10837.         $(DLLDEF) \
  10838.         $(OBJECTS)
  10839.     $(LIB_NAME) /out:$(DYNLINK_LIB) @<<$(LIB_RESPONSE_FILE)
  10840. $(LIBRARIAN_FLAGS: =
  10841. )
  10842. !if !defined(MCPP_TYPE)
  10843. /def:$(DLLDEF)
  10844. !endif
  10845. $(OBJECTS)
  10846. !if $(USE_DLLDEF_OBJECTS)
  10847. $(DLLDEF_OBJECTS)
  10848. !else
  10849. $(LINKLIBS)
  10850. !endif
  10851. <<$(BUILD_NOKEEP)
  10852. !  if "$(DLLLIBOBJECTS)" != " "
  10853.     $(LIB_NAME) /out:$(DYNLINK_LIB) @<<$(LIB_RESPONSE_FILE)
  10854. $(LIBRARIAN_FLAGS: =
  10855. )
  10856. $(DYNLINK_LIB)
  10857. $(DLLLIBOBJECTS)
  10858. <<$(BUILD_NOKEEP)
  10859. !  endif
  10860.     $(LINT_CMD2)
  10861.  
  10862. !  IF "$(MAKEDLL)" != ""
  10863. $(TARGET): $(DYNLINK_EXP) $(_RES_FILE) $(OBJECTS) $(BO_LIB) $(CRTLIBS) $(MACHINE_TARGETLIBS) $(LINKLIBS)
  10864.     $(LINKER) @<<$(LINK_RSP)
  10865. $(LINKER_FLAGS: =
  10866. )
  10867. $(ORDER: =
  10868. )
  10869. $(LINKER_STACKSIZE_DLL)
  10870. $(LINKER_OPTIDATA)
  10871. $(DRIVER_SWITCH)
  10872. $(DRIVER_ALIGN_SWITCH)
  10873. /subsystem:native,$(SUBSYSTEM_NATVER)
  10874. /base:$(DRIVERBASE)
  10875. /entry:$(DRIVER_ENTRY)$(ENTRY_SUFFIX)
  10876. /out:$(TARGET)
  10877. $(HEADEROBJNAME: =
  10878. )
  10879. $(**: =
  10880. )
  10881. <<$(BUILD_NOKEEP)
  10882. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10883.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10884.     set createfile=<<$@.binplace.txt \
  10885. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10886. <<Keep
  10887. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10888.     $(POST_BUILD_CMD)
  10889.     $(MAXDEP_CMD)
  10890.     $(PGULOG_CMD)
  10891.     $(OBFUSCATOR_CMD)
  10892.     $(MANAGED_SIGNCODE_CMD)
  10893.     $(SIGNCODE_CMD)
  10894.     $(MAKE_PLACEFILE_CMD)
  10895.     $(_BINPLACE_TARGET_COMMAND)
  10896.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10897.     $(LOCALIZE_BASE_FILE_CMD)
  10898.     $(_CHECK_IMPORTS_COMMAND)
  10899.     $(_CHECK_DELAYLOAD_COMMAND)
  10900. !  ENDIF
  10901.  
  10902. ! ELSEIF "$(TARGETTYPE)" == "HAL"
  10903.  
  10904. !  IF "$(MAKEDLL)" == ""
  10905. $(TARGET) $(DYNLINK_EXP): \
  10906.         $(DLLDEF) \
  10907.         $(OBJ_PATH)\$O\*.obj \
  10908. !if $(USE_DLLDEF_OBJECTS)
  10909.         $(DLLDEF_OBJECTS)
  10910. !else
  10911.         $(LINKLIBS)
  10912. !endif
  10913.     $(LIB_NAME) /out:$(@R).lib @<<$(LIB_RESPONSE_FILE)
  10914. $(LIBRARIAN_FLAGS: =
  10915. )
  10916. !if !defined(MCPP_TYPE)
  10917. /def:$(DLLDEF)
  10918. !endif
  10919. $(OBJ_PATH)\$O\*.obj
  10920. !if $(USE_DLLDEF_OBJECTS)
  10921. $(DLLDEF_OBJECTS)
  10922. !else
  10923. $(LINKLIBS)
  10924. !endif
  10925. <<$(BUILD_NOKEEP)
  10926.  
  10927. !  ELSE
  10928.  
  10929. $(TARGET:.dll=.lib) $(DYNLINK_EXP): $(DLLDEF) $(OBJ_PATH)\$O\*.obj \
  10930. !if $(USE_DLLDEF_OBJECTS)
  10931.         $(DLLDEF_OBJECTS)
  10932. !else
  10933.         $(LINKLIBS)
  10934. !endif
  10935.     $(LIB_NAME) /out:$(@R).lib @<<$(LIB_RESPONSE_FILE)
  10936. $(LIBRARIAN_FLAGS: =
  10937. )
  10938. !if !defined(MCPP_TYPE)
  10939. /def:$(DLLDEF)
  10940. !endif
  10941. $(OBJ_PATH)\$O\*.obj
  10942. !if $(USE_DLLDEF_OBJECTS)
  10943. $(DLLDEF_OBJECTS)
  10944. !else
  10945. $(LINKLIBS)
  10946. !endif
  10947. <<$(BUILD_NOKEEP)
  10948.  
  10949. $(TARGET): $(DYNLINK_EXP) $(_RES_FILE) $(OBJECTS) $(CRTLIBS) $(MACHINE_TARGETLIBS) $(LINKLIBS)
  10950.     $(LINKER) @<<$(LINK_RSP)
  10951. $(LINKER_FLAGS: =
  10952. )
  10953. $(LINKER_STACKSIZE_DLL)
  10954. $(LINKER_OPTIDATA)
  10955. $(DRIVER_SWITCH)
  10956. $(HAL_ALIGN_SWITCH)
  10957. /subsystem:$(SUBSYSTEM)
  10958. /base:$(HALBASE)
  10959. /dll
  10960. /noentry
  10961. /out:$(TARGET)
  10962. $(**: =
  10963. )
  10964. <<$(BUILD_NOKEEP)
  10965. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  10966.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  10967.     set createfile=<<$@.binplace.txt \
  10968. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  10969. <<Keep
  10970. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  10971.     $(POST_BUILD_CMD)
  10972.     $(MAXDEP_CMD)
  10973.     $(PGULOG_CMD)
  10974.     $(OBFUSCATOR_CMD)
  10975.     $(MANAGED_SIGNCODE_CMD)
  10976.     $(SIGNCODE_CMD)
  10977.     $(MAKE_PLACEFILE_CMD)
  10978.     $(_BINPLACE_TARGET_COMMAND)
  10979.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  10980.     $(MAPDUMP_CMD)
  10981.     $(LINT_CMD2)
  10982.     $(LOCALIZE_BASE_FILE_CMD)
  10983.     $(_CHECK_IMPORTS_COMMAND)
  10984.     $(_CHECK_DELAYLOAD_COMMAND)
  10985. !  ENDIF
  10986.  
  10987. ! ELSEIF "$(TARGETTYPE)" == "CATALOG"
  10988.  
  10989. MAKECAT=makecat
  10990.  
  10991. # Make sure we have all of the parameters we need.
  10992. !  if !defined(CATALOG_CERT)
  10993. CATALOG_CERT=0
  10994. !  endif
  10995. !  if !defined(CATALOG_DISPLAY)
  10996. CATALOG_DISPLAY=Microsoft Security Catalog
  10997. !  endif
  10998. !  if !defined(CATALOG_URL)
  10999. CATALOG_URL=http://www.microsoft.com
  11000. !  endif
  11001. !  if !defined(CATALOG_OS_VERSION_LIST)
  11002. CATALOG_OS_VERSION_LIST=$(CATALOG_OS_VERSION)
  11003. !  endif
  11004.  
  11005. CATALOG_CDF=$(TARGET).cdf
  11006. CATALOG_CMD=$(MAKECAT) -v -o $(TARGET).hash $(CATALOG_CDF)
  11007. !  if defined(CATALOG_MINSIZE) && "$(CATALOG_MINSIZE)" != "0"
  11008. CATALOG_CMD=$(CATALOG_CMD) -s $(CATALOG_MINSIZE)
  11009. !  endif
  11010.  
  11011. CATALOG_SIGN_CMD=ntsign  -cert $(CATALOG_CERT) -url "$(CATALOG_URL)" -displayname "$(CATALOG_DISPLAY)" $(TARGET)
  11012.  
  11013.  
  11014. # The actual catalog config file target.
  11015. $(TARGET): $(SOURCES)
  11016.     set BUILDMSG=making $(@F)
  11017.     set createfile=<<$(@R)_pre.txt
  11018. $**
  11019. <<Keep
  11020.     echo $(CATALOG_OS_VERSION_LIST) > "$(@R)_version.txt"
  11021. !  ifdef CATALOG_DRM_FILE_LIST
  11022.     echo $(CATALOG_DRM_FILE_LIST) > "$(@R)_drm.txt"
  11023. !  endif
  11024.     @$(_PERL) $(RAZZLETOOLPATH)\cdf_create.pl \
  11025. !  ifdef CATALOG_DRM_FILE_LIST
  11026.       -drm_list  "$(@R)_drm.txt"           \
  11027. !  endif
  11028. !  if defined(CATALOG_PE_TRUSTED) && "$(CATALOG_PE_TRUSTED)" != "0"
  11029.       -petrusted                           \
  11030. !  endif
  11031.     -catalog "$@"                          \
  11032.     -version_list "$(@R)_version.txt"      \
  11033.     -cdf "$(CATALOG_CDF)"                  \
  11034.     -file_list "$(@R)_pre.txt"
  11035.     $(CATALOG_CMD)
  11036.     $(CATALOG_SIGN_CMD) -mdok
  11037.     $(BINPLACE_CMD)
  11038.  
  11039. ! ELSEIF "$(TARGETTYPE)" == "MSI"
  11040.  
  11041. $(TARGET): $(SOURCES)
  11042.     set BUILDMSG=making $(@F)
  11043.     $(_PERL) $(RAZZLETOOLPATH)\make_msi.pl @<<$(@R).msi_response
  11044. sources=$**
  11045. candle_flags=$(USER_CANDLE_FLAGS)
  11046. light_flags=$(USER_LIGHT_FLAGS)
  11047. objpath=$(OBJ_PATH)\$O
  11048. target=$(TARGET)
  11049. <<$(BUILD_NOKEEP)
  11050.     $(BINPLACE_CMD)
  11051.  
  11052. ! ENDIF
  11053. !ENDIF
  11054.  
  11055. ! if defined(DO_LANGUAGE_NEUTRAL) && !defined(NOLINK) && "$(MYMUILINK)" != "" && "$(TARGET)" != ""
  11056. $(TARGET).mui: $(MYMUILINK)
  11057.  <<$@.cmd
  11058.    set BUILDMSG=making $(@F)
  11059.    @type $@.cmd
  11060.    @del $(TARGET).muilnk 2>nul
  11061.    @del $(TARGET).notloc 2>nul
  11062.    @for %%k in ($**) do if exist %%~dpnk.muires @echo %%~dpnk.muires>>$(TARGET).muilnk
  11063.    @if not exist $(TARGET).muilnk @echo notloc>$(TARGET).mui.notloc
  11064.    @if not exist $(TARGET).muilnk echo Build_Status  LN_MUI_STS: LGNSTS_NOLOCRESOURCE $(@B)
  11065.    @if exist $(TARGET).muilnk (
  11066. !if defined(_TLBIMP) || defined(_C_SHARP) || defined(_VB)
  11067.         echo error : error Win32 resources in tlbimp/C#/VB are not localizable.
  11068. !else
  11069.         echo Build_Status Generating : Creating MUI file: LN_MUI_STS: LGNSTS_MUIED $(@F)
  11070.         $(LINKER) $(LANGUAGE_NEUTRAL_LINK_FLAG) /out:$@ @$(TARGET).muilnk
  11071. !endif
  11072.     )
  11073.    @del $(TARGET).muilnk 2>nul
  11074. !  ifdef SIGNCODE_CMD
  11075.    @if exist $@ $(SIGNCODE_CMD)
  11076. !  endif
  11077. !  ifndef NO_BINPLACE
  11078.         @if exist $@ ( $(BINPLACE_TOOL) -G5 $(LANGUAGE_NEUTRAL_RESDIR) $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS) $(TARGET).mui )
  11079. !  endif
  11080. <<$(BUILD_NOKEEP)
  11081. !ENDIF
  11082.  
  11083. !IFNDEF NOLINK
  11084.  
  11085. ! if defined(NTKERNEL)
  11086.  
  11087. $(OBJ_PATH)\$O\$(NTKERNEL).exe: $(NTRES) $(@D)\$(NTKERNEL).obj  \
  11088.                         $(BO_LIB) $(KERNEL_LIBS) \
  11089.                         $(LINKLIBS)
  11090.     $(LINKER) @<<$(LINK_RSP)
  11091. $(LINKER_FLAGS: =
  11092. )
  11093. $(LINKER_STACKSIZE)
  11094. $(ORDER: =
  11095. )
  11096. $(LINKGPSIZE: =
  11097. )
  11098. $(NTKERNEL_LINK_OPTIONS: =
  11099. )
  11100. $(LINKER_OPTIDATA)
  11101. $(DRIVER_SWITCH)
  11102. $(KERNEL_ALIGN_SWITCH)
  11103. /subsystem:$(SUBSYSTEM)
  11104. $(**: =
  11105. )
  11106. <<$(BUILD_NOKEEP)
  11107. !  if !defined(NO_BINPLACE) && defined(DO_LSBUILD) && defined(LOCALIZE_BASE_FILE)
  11108.     set BUILDMSG=making base file $O\$(@F) with CreateLCGFile.pl
  11109.     set createfile=<<$@.binplace.txt \
  11110. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  11111. <<Keep
  11112. !  endif # !NO_BINPLACE && DO_LSBUILD && LOCALIZE_BASE_FILE
  11113.     $(POST_BUILD_CMD)
  11114.     $(MAXDEP_CMD)
  11115.     $(PGULOG_CMD)
  11116.     $(OBFUSCATOR_CMD)
  11117.     $(MANAGED_SIGNCODE_CMD)
  11118.     $(SIGNCODE_CMD)
  11119.     $(MAKE_PLACEFILE_CMD)
  11120.     $(_BINPLACE_TARGET_COMMAND)
  11121.     $(LANGUAGE_NEUTRAL_STATUS_CMD)
  11122.     $(MAPDUMP_CMD)
  11123.     $(LINT_CMD2)
  11124.     $(LOCALIZE_BASE_FILE_CMD)
  11125.     $(_CHECK_IMPORTS_COMMAND)
  11126.     $(_CHECK_DELAYLOAD_COMMAND)
  11127. ! ENDIF
  11128. !ENDIF
  11129.  
  11130. !IF DEFINED(USE_LINT) && ("$(LINT_TYPE)" == "all")
  11131.  
  11132. $(OBJ_PATH)\$O\$(LINT_OUTPUT).$(LINT_EXT): $(TARGETOBJFILES)
  11133.     $(LINT_ALL_CMD) $(SOURCES)
  11134. !ENDIF
  11135.  
  11136. $(OBJ_PATH)\$O\*.res : $(MASTER_VERSION_FILE)
  11137. $O\*.res : $(MASTER_VERSION_FILE)
  11138.  
  11139. !ifdef SXS_MANIFEST_OBJ2
  11140. $(SXS_MANIFEST_OBJ2) : $(SXS_MANIFEST_OBJ1)
  11141.     $(_COPYFILE) $(SXS_MANIFEST_OBJ1) $(SXS_MANIFEST_OBJ2)
  11142. !endif
  11143.  
  11144. !ifdef SXS_PDB_NAMER
  11145. $(SXS_PDB_NAMER) : $(SXS_MANIFEST_OBJ1)
  11146.     $(MANIFEST_PREPROCESSOR_NAME) $(MANIFEST_PREPROCESSOR_FLAGS) -DSXS_WANT_ASSEMBLY_VERSION \
  11147.     $(SXS_MANIFEST_DEFINES) -DSXS_PRE=/pdb:$(OBJ_PATH)\$O\$(SXS_PDB_WOW6432_W_PREFIX)$(SXS_ASSEMBLY_NAME:.=) \
  11148.     -DSXS_POST=$(TARGETNAME:.=).pdb $(MANIFEST_VERSION_HEADER) | $(MANIFEST_TRIMMER) > $@
  11149. !endif
  11150.  
  11151. #
  11152. # RC Config
  11153. #
  11154. .SUFFIXES: .muimanifest .rcconfig .rcc .drcc
  11155. #
  11156. # .muimanifest -> .rcc
  11157.  
  11158. !ifdef DO_LANGUAGE_NEUTRAL
  11159. {..\..}.muimanifest{$O}.rcc:
  11160.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11161.  
  11162. {..\..}.muimanifest{$(OBJ_PATH)\$O}.rcc:
  11163.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11164.  
  11165. {..}.muimanifest{$O}.rcc:
  11166.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11167.  
  11168. {..}.muimanifest{$(OBJ_PATH)\$O}.rcc:
  11169.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11170.  
  11171. {}.muimanifest{$O}.rcc:
  11172.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11173.  
  11174. {}.muimanifest{$(OBJ_PATH)\$O}.rcc:
  11175.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11176.  
  11177. !endif  #DO_LANGUAGE_NEUTRAL
  11178.  
  11179. # .rcconfig -> .rcc
  11180. !ifdef DO_LANGUAGE_NEUTRAL
  11181. {$(RC_CONFIG_ROOT)}.rcconfig{$O}.rcc:
  11182.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11183.  
  11184. {$(RC_CONFIG_ROOT)}.rcconfig{$(OBJ_PATH)\$O}.rcc:
  11185.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11186.  
  11187. {..\..}.rcconfig{$O}.rcc:
  11188.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11189.  
  11190. {..\..}.rcconfig{$(OBJ_PATH)\$O}.rcc:
  11191.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11192.  
  11193. {..}.rcconfig{$O}.rcc:
  11194.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11195.  
  11196. {..}.rcconfig{$(OBJ_PATH)\$O}.rcc:
  11197.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11198.  
  11199. {}.rcconfig{$O}.rcc:
  11200.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11201.  
  11202. {}.rcconfig{$(OBJ_PATH)\$O}.rcc:
  11203.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11204.  
  11205. !endif  #DO_LANGUAGE_NEUTRAL
  11206.  
  11207.  
  11208. #
  11209. # delta RC config related
  11210. #
  11211. !    ifdef DELTA_RC_CONFIG
  11212.  
  11213. #{$(RC_CONFIG_ROOT)}.muimanifest{$O}.drcc:
  11214. #    $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11215. #
  11216. #{$(RC_CONFIG_ROOT)}.muimanifest{$(OBJ_PATH)\$O}.drcc:
  11217. #    $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11218.  
  11219. !ifdef DO_LANGUAGE_NEUTRAL
  11220. {..\..}.muimanifest{$O}.drcc:
  11221.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11222.  
  11223. {..\..}.muimanifest{$(OBJ_PATH)\$O}.drcc:
  11224.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11225.  
  11226. {..}.muimanifest{$O}.drcc:
  11227.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11228.  
  11229. {..}.muimanifest{$(OBJ_PATH)\$O}.drcc:
  11230.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11231.  
  11232. {}.muimanifest{$O}.drcc:
  11233.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11234.  
  11235. {}.muimanifest{$(OBJ_PATH)\$O}.drcc:
  11236.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11237.  
  11238. !endif #DO_LANGUAGE_NEUTRAL
  11239.  
  11240.  
  11241. #{$(RC_CONFIG_ROOT)}.rcconfig{$O}.drcc:
  11242. #    $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11243. #
  11244. #{$(RC_CONFIG_ROOT)}.rcconfig{$(OBJ_PATH)\$O}.drcc:
  11245. #    $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11246.  
  11247. !ifdef DO_LANGUAGE_NEUTRAL
  11248. {..\..}.rcconfig{$O}.drcc:
  11249.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11250.  
  11251. {..\..}.rcconfig{$(OBJ_PATH)\$O}.drcc:
  11252.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11253.  
  11254. {..}.rcconfig{$O}.drcc:
  11255.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11256.  
  11257. {..}.rcconfig{$(OBJ_PATH)\$O}.drcc:
  11258.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11259.  
  11260. {}.rcconfig{$O}.drcc:
  11261.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11262.  
  11263. {}.rcconfig{$(OBJ_PATH)\$O}.drcc:
  11264.     $(RC_CONFIG_PREPROCESSOR_NAME) -o $@ -i $< $(RC_CONFIG_DEFINES)
  11265.  
  11266. !endif #DO_LANGUAGE_NEUTRAL
  11267.  
  11268. !endif
  11269. #
  11270. # [GorN] 3/30/2000
  11271. #
  11272. #    WPP. extra rules. Can't have them before the rule to build "all"
  11273. #
  11274.  
  11275. !if defined(RUN_WPP) && exist(obj\_tracewpp.mac)
  11276. WPP_DEFINE_RULES=1
  11277. !  include obj\_tracewpp.mac
  11278. !endif
  11279.  
  11280.  
  11281. !if defined(DO_LSBUILD) && !defined(NOLINK) && "$(LCG_DEPEND)" != ""
  11282. $(LCG_TARGET): $(LCG_DEPEND)
  11283.     set BUILDMSG=making $O\$(@F) with CreateLCGFile.pl
  11284. ! ifndef NO_BINPLACE
  11285.     set createfile=<<$@.binplace.txt
  11286. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  11287. <<Keep
  11288. ! endif # NO_BINPLACE
  11289.     $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  11290.         /g:$(LCG_TARGET) \
  11291.         /f:$(LCG_SOURCE) \
  11292.         /t:$(OBJ_PATH)\$O \
  11293.         $(LSBUILD_PARSER_ID_OPTION) \
  11294.         $(ALT_LCI_DIR_OPTION) \
  11295.         /l:$(LANGUAGE) \
  11296.         /s:$(LSBUILD_PARSER_SETTINGS) \
  11297. ! ifndef NO_BINPLACE
  11298.         /b:$@.binplace.txt \
  11299.         /r:$(LCG_BINPLACE_TARGET) \
  11300. ! endif # NO_BINPLACE
  11301.         $(LSBUILD_LCE_OPTION)
  11302. !endif # DO_LSBUILD
  11303.  
  11304.  
  11305. #
  11306. # Make the individual pieces and the keyform of the assembly identity available.
  11307. #
  11308. $(OBJ_PATH)\$O\_asmid.inc: $(SOURCES_USED)
  11309.     set BUILDMSG=making $(@F)
  11310. !if "$(_ASSEMBLY_IDENTITY:\=)" == "$(_ASSEMBLY_IDENTITY)"
  11311.     -$(_DEL)
  11312.     idtool -id $(_ASSEMBLY_IDENTITY) -GenerateMakefileInc > $@.temp || @echo error : error idtool error
  11313. !if !defined(_MANAGED_CXX_LIBRARY) && "$(MANAGED_TARGET_TYPE)" != "module"
  11314. #
  11315. # temporarily do tlbimp stuff here
  11316. #
  11317.     asmIdToAttribs "$(_ASSEMBLY_IDENTITY)" $@.temp tlbimp
  11318. !endif
  11319.     echo _ASSEMBLY_IDENTITY=$(_ASSEMBLY_IDENTITY) >> $@.temp
  11320.     $(_MOVE)
  11321. !else
  11322.     echo. > $@
  11323. !endif
  11324.  
  11325. $(OBJ_PATH)\$O\_asmid.xml: $(SOURCES_USED)
  11326.     set BUILDMSG=making $(@F)
  11327. !if "$(_ASSEMBLY_IDENTITY:\=)" == "$(_ASSEMBLY_IDENTITY)"
  11328.     -$(_DEL)
  11329.     idtool -id $(_ASSEMBLY_IDENTITY) -EmptyComponentManifest -out $@.temp || @echo error : error idtool error
  11330.     $(_MOVE)
  11331. !endif
  11332.  
  11333. #
  11334. # disassemble code .dll to metadata source with versions with asmmeta.exe
  11335. # remove versions with asmmeta.cmd /removeversions
  11336. # compare/copy to source directory with asmmeta.cmd /feedback
  11337. #
  11338.  
  11339. !if defined(_O_ASMMETA) && defined(_O_ASMMETA_OUTPUT) && defined(SOURCE_ASMMETA) && defined(ASMMETA_INPUT)
  11340.  
  11341. $(_O_ASMMETA): $(_O_ASMMETA_OUTPUT)
  11342.     set BUILDMSG=making $(@F)
  11343.     -$(_DEL)
  11344.     if exist $** asmmeta.cmd /remove_versions:$** /out:$@.temp /OBJ_PATH:$(OBJ_PATH) /O:$O
  11345.     if exist $** asmmeta.cmd /FeedbackAsmmetaBuiltFromDll:$@.temp /out:$(SOURCE_ASMMETA) /OBJ_PATH:$(OBJ_PATH) /O:$O
  11346.     @if not exist $** @echo error : error skipping asmmeta.cmd /remove... and /feedback... due to earlier errors
  11347.     $(_MOVE)
  11348.  
  11349. $(_O_ASMMETA_OUTPUT): $(ASMMETA_INPUT)
  11350.     set BUILDMSG=making $(@F)
  11351.     -$(_DEL)
  11352.     if exist $** \
  11353.         $(_URTRUN_20) \
  11354.             asmmeta.exe \
  11355.                 $(ASMMETA_EXE_FLAGS) \
  11356.                 /config=$(RAZZLETOOLPATH)\managed\v2.0\asmmeta.config \
  11357. !if "$(ASMMETA_PRESERVE_INTERNALS_VISIBLE_TO_ATTRIBUTE)" == "1"
  11358.                 /config=$(RAZZLETOOLPATH)\managed\v2.0\asmmeta.PreserveInternalsVisibleToAttribute.config \
  11359. !endif
  11360. !if "$(ASMMETA_PRESERVE_EXTENSION_ATTRIBUTE)" == "1"
  11361.                 /config=$(RAZZLETOOLPATH)\managed\v2.0\asmmeta.PreserveExtensionAttribute.config \
  11362. !endif
  11363.                 /spaces=2 \
  11364. !ifndef ASMMETA_NO_1_SWITCH
  11365.                 /1 \
  11366. !endif
  11367.                 /out:$@.temp \
  11368.                 $** \
  11369.         || @echo error : error asmmeta.exe error
  11370.     @if not exist $** @echo error : error skipping asmmeta.exe due to earlier errors
  11371.     $(_MOVE)
  11372.  
  11373. !endif
  11374.  
  11375. #
  11376. # Add versions to public metadata managed il-assembly and then assemble.
  11377. #
  11378.  
  11379. !if defined(_O_BINARY_METADATA) && defined(SOURCE_ASMMETA)
  11380.  
  11381. #
  11382. # Move the code .pdb around because ilasm.exe deletes it when building
  11383. # the metadata .dll.
  11384. #
  11385. $(_O_BINARY_METADATA): $(OBJ_PATH)\$O\$(TARGETNAME).asmmeta_ver_pass0
  11386.     set BUILDMSG=making $(@F)
  11387. # TBD -- see about simplifying this
  11388.     -$(_DEL)
  11389.     @if exist $(OBJ_PATH)\$O\$(TARGETNAME).pdb move $(OBJ_PATH)\$O\$(TARGETNAME).pdb $(OBJ_PATH)\$O\c00057ce4b4d42a68370d9ccc49ce200.pdb
  11390.     if exist $** ilasm /nologo /quiet /dll /out:$@.temp $** || @echo error : error ilasm error
  11391.     @if exist $(OBJ_PATH)\$O\c00057ce4b4d42a68370d9ccc49ce200.pdb move $(OBJ_PATH)\$O\c00057ce4b4d42a68370d9ccc49ce200.pdb $(OBJ_PATH)\$O\$(TARGETNAME).pdb
  11392.     $(_MOVE)
  11393.  
  11394. $(OBJ_PATH)\$O\$(TARGETNAME).asmmeta_ver_pass0: $(SOURCE_ASMMETA)
  11395.     set BUILDMSG=making $(@F)
  11396.     -$(_DEL)
  11397.     if exist $** asmmeta.cmd /insert_versions:$** /out:$@.temp /OBJ_PATH:$(OBJ_PATH) /O:$O
  11398.     $(_MOVE)
  11399. !endif
  11400.  
  11401. #
  11402. # TBD: We should just wrap al in Perl or JScript instead of writing out _keyfile.al.
  11403. # That will also get us better error reporting.
  11404. #
  11405.  
  11406. $(OBJ_PATH)\$O\_keyfile.al: $(SOURCES_USED)
  11407. #
  11408. # This is based on the other _keyfile.* code.
  11409. # It is a little different because it outputs a response file.
  11410. # I don't remember why the slash removal check.
  11411. #
  11412. !if defined(_ASSEMBLY_IDENTITY) \
  11413.     && "$(_ASSEMBLY_IDENTITY_PUBLIC_KEY_NAME_LOWERCASE)" != "none" \
  11414.     && "$(_ASSEMBLY_IDENTITY:\=)" == "$(_ASSEMBLY_IDENTITY)" # { {
  11415.     -$(_DEL)
  11416.     asmIdToAttribs "$(_ASSEMBLY_IDENTITY)" $@.temp al
  11417.     $(_MOVE)
  11418. !else
  11419.     echo. > $@
  11420. !endif # } }
  11421.  
  11422. !if defined(LANGUAGE_SPECIFIC_MANAGED_RESOURCES) # { {
  11423.  
  11424. _AL_COMMAND_LINE1=\
  11425.     /objpath:$(OBJ_PATH) \
  11426.     /o:$O \
  11427.     /out:$@ \
  11428.     /culture:en \
  11429.     @$(@D)\_keyfile.al \
  11430.     /version:"$(ASSEMBLY_IDENTITY_VERSION)" \
  11431. !if defined(SEPARATE_FILE_AND_INFORMATIONAL_VERSION) && defined(VER_FILEVERSION_STR)
  11432.     /fileversion:"$(VER_FILEVERSION_STR)" \
  11433. !elseif defined(VER_PRODUCTVERSION_STR)
  11434.     /fileversion:"$(VER_PRODUCTVERSION_STR)" \
  11435. !endif
  11436.     $(_LANGUAGE_SPECIFIC_MANAGED_RESOURCES_AL_FLAGS)
  11437.  
  11438. #
  11439. # This has spaces that should not be changed to newlines.
  11440. #
  11441. _AL_COMMAND_LINE2=\
  11442. !ifdef VER_PRODUCTNAME_STR
  11443.     /Product:"$(VER_PRODUCTNAME_STR)" \
  11444. !endif
  11445. !ifdef VER_LEGALCOPYRIGHT_STR
  11446.     /Copyright:"$(VER_LEGALCOPYRIGHT_STR)" \
  11447. !endif
  11448. !ifdef VER_COMPANYNAME_STR
  11449.     /Company:"$(VER_COMPANYNAME_STR)" \
  11450. !endif
  11451.  
  11452. _AL_COMMAND_LINE1=$(_AL_COMMAND_LINE1:    = )
  11453. _AL_COMMAND_LINE1=$(_AL_COMMAND_LINE1:   = )
  11454. _AL_COMMAND_LINE1=$(_AL_COMMAND_LINE1:  = )
  11455. _AL_COMMAND_LINE1_NEWLINES=$(_AL_COMMAND_LINE1: = ^
  11456.  )
  11457.  
  11458. _AL_COMMAND_LINE=$(_AL_COMMAND_LINE1) $(_AL_COMMAND_LINE2)
  11459.  
  11460. $(OBJ_PATH)\$O\$(TARGETNAME).resources.dll: \
  11461.         $(OBJ_PATH)\$O\_keyfile.al \
  11462.         $(_MANAGED_RESOURCES_SATELLITE_ASSEMBLY_DEPENDENCIES)
  11463.     $(_PERL) $(RAZZLETOOLPATH)\CreateManagedResourceSatelliteAssembly.pl @<<$(PERL_RESPONSE_FILE)
  11464. $(_AL_COMMAND_LINE)
  11465. <<$(BUILD_NOKEEP)
  11466.  
  11467.     $(MANAGED_SIGNCODE_CMD)
  11468.     $(SIGNCODE_CMD)
  11469.  
  11470.     $(BINPLACE_TOOL) \
  11471.         $(BINPLACE_FLAGS) \
  11472. !if "$(TARGET_DESTINATION)" != "retail"
  11473.         /:DEST loc\src\bin\managed\$(TARGET_DESTINATION) \
  11474. !else
  11475.         /:DEST loc\src\bin\managed \
  11476. !endif
  11477.         $@
  11478.  
  11479. !if "$(DO_LSBUILD)" == "1" && "$(MUI)" == "1" && "$(URT_VER)" == "2.0"
  11480.      set BUILDMSG=making managed code resources with CreateLCGFile.pl
  11481.      set createfile=<<$(OBJ_PATH)\$(O)\managed_resources.lcg.binplace.txt
  11482. $(BINPLACE_FLAGS) $(BINPLACE_TARGET_FLAGS)
  11483. <<Keep
  11484.  
  11485.      $(_PERL) $(RAZZLETOOLPATH)\CreateLCGFile.pl \
  11486.         /f:$@ \
  11487.         /t:$(OBJ_PATH)\$O \
  11488.         $(LSBUILD_PARSER_ID_OPTION_MANAGED) \
  11489.         $(ALT_LCI_DIR_OPTION) \
  11490.         /l:$(LANGUAGE) \
  11491.         /s:$(LSBUILD_PARSER_SETTINGS) \
  11492. ! ifndef NO_BINPLACE
  11493.         /b:$(OBJ_PATH)\$(O)\managed_resources.lcg.binplace.txt \
  11494.         /r:$(LCG_BINPLACE_TARGET_MANAGED) \
  11495.         /TargetName:$(TARGETNAME) \
  11496.         /TargetExt:$(LINK_TARGETEXT) \
  11497. ! endif
  11498.         $(LSBUILD_LCE_OPTION)
  11499. !endif # DO_LSBUILD
  11500.  
  11501. !endif # } }
  11502.  
  11503. !endif # } }
  11504.  
  11505.  
  11506. PassIndependentTargets_Manifests: \
  11507.  $(SOURCE_MANIFEST) \
  11508.  $(WOW64_SOURCE_MANIFEST) \
  11509.  $(MULTI_SOURCE_MANIFEST) \
  11510.  $(MULTI_WOW64_SOURCE_MANIFEST) \
  11511.  $(PROD_SOURCE_MANIFEST) \
  11512.  $(PROD_WOW64_SOURCE_MANIFEST) \
  11513.  $(INTERNAL_SOURCE_MANIFEST) \
  11514.  $(INTERNAL_WOW64_SOURCE_MANIFEST) \
  11515.  $(EDITION_SOURCE_MANIFEST) \
  11516.  $(WINPE_SOURCE_MANIFEST) \
  11517.  
  11518. #
  11519. # TBD: We should just wrap al in Perl or JScript instead of writing out _keyfile.al.
  11520. # That will also get us better error reporting.
  11521. #
  11522.  
  11523.  
  11524. PassIndependentTargets_Infs: \
  11525.  $(PRINTER_INFS_LOG) \
  11526.  $(MANIFESTED_PRINTER_INFS_LOG) \
  11527.  $(DRIVER_INFS_LOG) \
  11528.  $(MANIFESTED_INFS_LOG) \
  11529.  $(NON_PNP_INFS_LOG) \
  11530.  $(NON_PNP_SIGN_INFS_LOG) \
  11531.  $(LOC_PRINTER_INFS_LOG) \
  11532.  $(LOC_MANIFESTED_PRINTER_INFS_LOG) \
  11533.  $(LOC_DRIVER_INFS_LOG) \
  11534.  $(LOC_MANIFESTED_INFS_LOG) \
  11535.  $(LOC_NON_PNP_INFS_LOG) \
  11536.  $(LOC_NON_PNP_SIGN_INFS_LOG) \
  11537.  $(PRELOC_PRINTER_INFS_LOG) \
  11538.  
  11539. PassIndependentTargets: \
  11540.     PassIndependentTargets_Manifests \
  11541. !if !defined(MANIFESTONLY)
  11542.     PassIndependentTargets_Infs \
  11543.     PassIndependentTargets_Binplace \
  11544. !endif
  11545.  
  11546. !if defined(EVENTS_MANIFEST) # { {
  11547.  
  11548. !ifndef EVENTS_GENERATED_EVENT_HEADER_FILE_BASENAME # { {
  11549.  
  11550. EVENTS_GENERATED_EVENT_HEADER_FILE_BASENAME=$(?B)EventMacros
  11551.  
  11552. !endif # } }
  11553.  
  11554.  
  11555. !ifdef EVENTS_GENERATE_EVENTS_FOR_DOWNLEVEL # { {
  11556.  
  11557. MC_GENERATE_EVENTS_FOR_DOWNLEVEL = -mof
  11558.  
  11559. !else # } {
  11560.  
  11561. MC_GENERATE_EVENTS_FOR_DOWNLEVEL=
  11562.  
  11563. !endif # } }
  11564.  
  11565.  
  11566. !ifdef EVENTS_GENERATE_EVENTS_FOR_USERMODE # { {
  11567.  
  11568. MC_GENERATE_EVENTS_FOR_USERMODE = -um
  11569.  
  11570. !else # } {
  11571.  
  11572. MC_GENERATE_EVENTS_FOR_USERMODE=
  11573.  
  11574. !endif # } }
  11575.  
  11576.  
  11577. !ifdef EVENTS_GENERATE_EVENTS_FOR_KERNELMODE # { {
  11578.  
  11579. MC_GENERATE_EVENTS_FOR_KERNELMODE = -km
  11580.  
  11581. !else # } {
  11582.  
  11583. MC_GENERATE_EVENTS_FOR_KERNELMODE=
  11584.  
  11585. !endif # } }
  11586.  
  11587.  
  11588. !ifdef EVENTS_GENERATE_EVENTS_FOR_CS # { {
  11589.  
  11590. MC_GENERATE_EVENTS_FOR_CS = -cs $(EVENTS_GENERATE_EVENTS_FOR_CS)
  11591.  
  11592. !else # } {
  11593.  
  11594. MC_GENERATE_EVENTS_FOR_CS=
  11595.  
  11596. !endif # } }
  11597.  
  11598.  
  11599. !ifdef EVENTS_GENERATED_EVENT_MACRO_PREFIX # { {
  11600.  
  11601. EVENTS_GENERATED_EVENT_MACRO_PREFIX_OPTION = -p $(EVENTS_GENERATED_EVENT_MACRO_PREFIX)
  11602.  
  11603. !else # } {
  11604. EVENTS_GENERATED_EVENT_MACRO_PREFIX_OPTION=
  11605.  
  11606. !endif # } }
  11607.  
  11608. !ifdef EVENTS_GENERATE_EVENTS_REMOVE_PREFIX # { {
  11609.  
  11610. EVENTS_GENERATE_EVENTS_REMOVE_PREFIX_OPTION = -P $(EVENTS_GENERATE_EVENTS_REMOVE_PREFIX)
  11611.  
  11612. !else # } {
  11613.  
  11614. EVENTS_GENERATE_EVENTS_REMOVE_PREFIX_OPTION=
  11615.  
  11616. !endif # } }
  11617.  
  11618. EVENTS_VALIDATE_OPTION = -t $(RAZZLETOOLPATH)\providers\Vista
  11619. MC_GENERATE_EVENT_OPTIONS = $(MC_GENERATE_EVENTS_FOR_USERMODE) \
  11620.                                 $(MC_GENERATE_EVENTS_FOR_KERNELMODE) \
  11621.                                 $(MC_GENERATE_EVENTS_FOR_CS) \
  11622.                                 $(MC_GENERATE_EVENTS_FOR_DOWNLEVEL) \
  11623.                                 $(EVENTS_GENERATED_EVENT_MACRO_PREFIX_OPTION) \
  11624.                                 $(EVENTS_GENERATE_EVENTS_REMOVE_PREFIX_OPTION) \
  11625.                                 $(EVENTS_VALIDATE_OPTION)
  11626.  
  11627.  
  11628.  
  11629. !if !defined(EVENTS_MANIFEST_OUTPUT_FILE_BASENAME) # { {
  11630.  
  11631. EVENTS_MANIFEST_OUTPUT_FILE_BASENAME=$(?B)Events
  11632.  
  11633. #
  11634. # For a single file in the current directory, state a target
  11635. # with a dependency that many directories depend on.
  11636. # This does not work for multiple event manifests or event manifests outside
  11637. # the current directory.
  11638. #
  11639.  
  11640. !if "$(EVENTS_MANIFEST:\=)" == "$(EVENTS_MANIFEST)" # { {
  11641.  
  11642. _OLD_EVENTS_MANIFEST_OUTPUT_FILE_BASENAME=$(EVENTS_MANIFEST:.manifest=)
  11643. !if "$(_OLD_EVENTS_MANIFEST_OUTPUT_FILE_BASENAME)" == "$(EVENTS_MANIFEST)" # { {
  11644. _OLD_EVENTS_MANIFEST_OUTPUT_FILE_BASENAME=$(EVENTS_MANIFEST:.man=)
  11645. !endif # } }
  11646. _OLD_EVENTS_MANIFEST_OUTPUT_FILE_BASENAME=$(_OLD_EVENTS_MANIFEST_OUTPUT_FILE_BASENAME)Events
  11647.  
  11648. $(OBJ_PATH)\$O\$(_OLD_EVENTS_MANIFEST_OUTPUT_FILE_BASENAME).h : $(OBJ_PATH)\$O\_event_manifests
  11649.  
  11650. !endif # } }
  11651.  
  11652. !else # } {
  11653.  
  11654. #
  11655. # See if we can remove this.
  11656. #
  11657. $(OBJ_PATH)\$O\$(EVENTS_MANIFEST_OUTPUT_FILE_BASENAME).h : $(OBJ_PATH)\$O\_event_manifests
  11658.  
  11659. !endif # } }
  11660.  
  11661.  
  11662. $(OBJ_PATH)\$O\_event_manifests : $(EVENTS_MANIFEST)
  11663.     set BUILDMSG=processing EVENTS_MANIFEST=$(EVENTS_MANIFEST:  = )
  11664. ! if defined(SOURCE_MANIFEST) || defined(WOW64_SOURCE_MANIFEST) || defined(EDITION_SOURCE_MANIFEST) || defined(WINPE_SOURCE_MANIFEST)
  11665.     nmake /f $(NTMAKEENV)\makefile.def $(SOURCE_MANIFEST) $(WOW64_SOURCE_MANIFEST) $(EDITION_SOURCE_MANIFEST) $(WINPE_SOURCE_MANIFEST)
  11666. ! endif
  11667. ! if !defined(DISABLE_SOURCE_MANIFEST_VALIDATION)
  11668.     set BUILDMSG=Manifest formatting for event manifests is being checked.
  11669.     set DO_NOT_CHECK_MANIFEST_SCHEMA=1
  11670.     set DO_NOT_CHECK_MANIFEST_SCHEMATRON=1
  11671.     checksourcemanifests -obj:$(OBJ_PATH)\$O <<$(OBJ_PATH)\$O\ManifestsToBeChecked
  11672. $(**: =
  11673. )
  11674. <<$(BUILD_NOKEEP)
  11675. ! endif
  11676.  
  11677.     !$(MANIFEST_COMPILER_CMD) $? $(OBJ_PATH)\$(O)\$(?F) $(MANIFEST_COMPILER_ARGUMENTS) $$(build.arch) $(SXS_PROCESSOR_ARCHITECTURE)
  11678.     !$(MC) /h $(PASS0_HEADERDIR) /W $(MC_WINMETAPATH) /w $(MC_EVENTMANPATH) /r $(MC_SOURCEDIR) /z $(EVENTS_MANIFEST_OUTPUT_FILE_BASENAME) $(MC_GENERATE_EVENT_OPTIONS) $(MC_FLAGS) $(OBJ_PATH)\$(O)\$(?F) $(EVENTS_MANIFEST_MC_INPUT_FILE)
  11679.     set _createfile=<<$@
  11680. <<Keep
  11681.  
  11682. !endif # } }
  11683.  
  11684.  
  11685. # must be left in nmake for case sensitivity
  11686. !if defined(USE_sTATIC_MFC)
  11687. !error $(MAKEDIR) : USE_sTATIC_MFC does nothing. Remove it.
  11688. !endif
  11689.  
  11690. !if defined(LINKER_FLAFS)
  11691. #!error $(MAKEDIR): LINKER_FLAFS does not do anything. Remove it.
  11692. !message $(MAKEDIR): LINKER_FLAFS does not do anything. Remove it.
  11693. !endif
  11694.  
  11695. #
  11696. # Convert .dui into .duip files
  11697. #
  11698.  
  11699. !if "$(BUILD_PASS)" == "PASS2" || "$(BUILD_PASS)" == "PASS1"
  11700. ! if defined(DUI_PATH)
  11701. !include $(NTMAKEENV)\makefile.dui
  11702. ! endif
  11703. !endif
  11704.  
  11705. !if "$(BUILD_PASS)" == "PASS0" && defined(COUNTERS_MANIFEST)
  11706. ! include $(NTMAKEENV)\makefile.ctrpp
  11707. !endif