Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

586 lines
11 KiB

  1. #
  2. # If not defined, specify where to get incs and libs.
  3. #
  4. !IFNDEF _NTROOT
  5. _NTROOT=\nt
  6. !ENDIF
  7. !IFNDEF BASEDIR
  8. BASEDIR=$(_NTDRIVE)$(_NTROOT)
  9. !ENDIF
  10. # A couple of overrides
  11. !ifndef _NT_TARGET_VERSION # Default to current OS version
  12. _NT_TARGET_VERSION = 0x502
  13. !endif
  14. !ifndef _NT_TOOLS_VERSION # Default to current VC version
  15. _NT_TOOLS_VERSION = 0x700
  16. !endif
  17. !ifndef SDK_PATH
  18. SDK_PATH = $(BASEDIR)\public\sdk
  19. !endif
  20. !ifndef SDK_INC_PATH
  21. SDK_INC_PATH = $(SDK_PATH)\inc
  22. !endif
  23. !ifndef SDK_INC16_PATH
  24. SDK_INC16_PATH = $(SDK_PATH)\inc16
  25. !endif
  26. !ifndef SDK_LIB_DEST
  27. SDK_LIB_DEST = $(SDK_PATH)\lib
  28. !endif
  29. !ifndef SDK_LIB_PATH
  30. SDK_LIB_PATH = $(SDK_LIB_DEST)\*
  31. !endif
  32. !ifndef SDK_LIB16_PATH
  33. SDK_LIB16_PATH=$(SDK_PATH)\lib16
  34. !endif
  35. !ifndef DDK_PATH
  36. DDK_PATH = $(BASEDIR)\public\ddk
  37. !endif
  38. !ifndef DDK_INC_PATH
  39. DDK_INC_PATH = $(DDK_PATH)\inc
  40. !endif
  41. !ifndef DDK_LIB_DEST
  42. DDK_LIB_DEST = $(DDK_PATH)\lib
  43. !endif
  44. !ifndef DDK_LIB_PATH
  45. DDK_LIB_PATH = $(DDK_LIB_DEST)\*
  46. !endif
  47. !ifndef IFSKIT_PATH
  48. IFSKIT_PATH = $(BASEDIR)\public\ifskit
  49. !endif
  50. !ifndef IFSKIT_INC_PATH
  51. IFSKIT_INC_PATH = $(IFSKIT_PATH)\inc
  52. !endif
  53. !ifndef IFSKIT_LIB_DEST
  54. IFSKIT_LIB_DEST = $(IFSKIT_PATH)\lib
  55. !endif
  56. !ifndef IFSKIT_LIB_PATH
  57. IFSKIT_LIB_PATH = $(IFSKIT_LIB_DEST)\*
  58. !endif
  59. !ifndef HALKIT_PATH
  60. HALKIT_PATH = $(BASEDIR)\public\halkit
  61. !endif
  62. !ifndef HALKIT_INC_PATH
  63. HALKIT_INC_PATH = $(HALKIT_PATH)\inc
  64. !endif
  65. !ifndef HALKIT_LIB_DEST
  66. HALKIT_LIB_DEST = $(HALKIT_PATH)\lib
  67. !endif
  68. !ifndef HALKIT_LIB_PATH
  69. HALKIT_LIB_PATH = $(HALKIT_LIB_DEST)\*
  70. !endif
  71. !ifndef PROCESSOR_PATH
  72. PROCESSOR_PATH = $(BASEDIR)\public\processorkit
  73. !endif
  74. !ifndef PROCESSOR_INC_PATH
  75. PROCESSOR_INC_PATH = $(PROCESSOR_PATH)\inc
  76. !endif
  77. !ifndef PROCESSOR_LIB_DEST
  78. PROCESSOR_LIB_DEST = $(PROCESSOR_PATH)\lib
  79. !endif
  80. !ifndef PROCESSOR_LIB_PATH
  81. PROCESSOR_LIB_PATH = $(PROCESSOR_LIB_DEST)\*
  82. !endif
  83. !ifndef WDM_INC_PATH
  84. WDM_INC_PATH = $(DDK_INC_PATH)\wdm
  85. !endif
  86. !ifndef CRT_INC_PATH
  87. CRT_INC_PATH = $(SDK_INC_PATH)\crt
  88. !endif
  89. !ifndef IOSTREAMS_INC_PATH
  90. IOSTREAMS_INC_PATH = $(SDK_INC_PATH)\crt\iostreams
  91. !endif
  92. !ifndef STL6_INC_PATH
  93. STL6_INC_PATH = $(SDK_INC_PATH)\crt\stl60
  94. !endif
  95. !ifndef CRT_LIB_PATH
  96. CRT_LIB_PATH = $(SDK_LIB_PATH)
  97. !endif
  98. !ifndef OAK_INC_PATH
  99. OAK_INC_PATH = $(BASEDIR)\public\oak\inc
  100. !endif
  101. !ifndef OAK_BIN_PATH
  102. OAK_BIN_PATH = $(BASEDIR)\public\oak\binr
  103. !endif
  104. !ifndef WPP_CONFIG_PATH
  105. # If this ever changes you must change the DDK's setenv.bat
  106. WPP_CONFIG_PATH = $(BASEDIR)\tools\WppConfig
  107. !endif
  108. !ifndef PUBLIC_INTERNAL_PATH
  109. PUBLIC_INTERNAL_PATH = $(BASEDIR)\public\internal
  110. !endif
  111. COPYRIGHT_STRING = Copyright (c) Microsoft Corporation. All rights reserved.
  112. !ifndef PUBLISH_CMD
  113. PUBLISH_CMD=@perl $(NTMAKEENV)\publish.pl publish.log
  114. !endif
  115. !ifndef BINDROP_CMD
  116. ! ifdef NOLINK
  117. # Only drop binaries if we are linking in this pass.
  118. BINDROP_CMD=rem No bindrop pass during link
  119. !else
  120. BINDROP_CMD=perl $(NTMAKEENV)\publish.pl $(_PROJECT_)_publish.log
  121. !endif
  122. !endif
  123. !ifndef BUILD_PASS
  124. # Old build.exe. Guess the correct pass.
  125. !ifdef PASS0ONLY
  126. BUILD_PASS=PASS0
  127. !elseif defined(LINKONLY)
  128. BUILD_PASS=PASS2
  129. !elseif defined(NOLINK) && !defined(PASS0ONLY)
  130. BUILD_PASS=PASS1
  131. !else
  132. # catch all - someone used build -z or build -2
  133. BUILD_PASS=PASSALL
  134. !endif
  135. !endif
  136. #
  137. # Set the flag which indicates whether we should be publishing binaries
  138. # to 0 by default. the project.mk file is responsible for parsing
  139. # BINARY_PUBLISH_PROJECTS to determine if its value should be changed.
  140. #
  141. BINPUBLISH=0
  142. #
  143. # Define global project paths.
  144. #
  145. !include projects.inc
  146. !ifdef NTTESTENV
  147. !include projects.tst.inc
  148. !endif
  149. #
  150. # Find and include the project configuration file.
  151. #
  152. !if exists(.\project.mk)
  153. _PROJECT_MK_PATH=.
  154. !elseif exists(..\project.mk)
  155. _PROJECT_MK_PATH=..
  156. !elseif exists(..\..\project.mk)
  157. _PROJECT_MK_PATH=..\..
  158. !elseif exists(..\..\..\project.mk)
  159. _PROJECT_MK_PATH=..\..\..
  160. !elseif exists(..\..\..\..\project.mk)
  161. _PROJECT_MK_PATH=..\..\..\..
  162. !elseif exists(..\..\..\..\..\project.mk)
  163. _PROJECT_MK_PATH=..\..\..\..\..
  164. !elseif exists(..\..\..\..\..\..\project.mk)
  165. _PROJECT_MK_PATH=..\..\..\..\..\..
  166. !elseif exists(..\..\..\..\..\..\..\project.mk)
  167. _PROJECT_MK_PATH=..\..\..\..\..\..\..
  168. !elseif exists(..\..\..\..\..\..\..\..\project.mk)
  169. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..
  170. !elseif exists(..\..\..\..\..\..\..\..\..\project.mk)
  171. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..
  172. !elseif exists(..\..\..\..\..\..\..\..\..\..\project.mk)
  173. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..
  174. !elseif exists(..\..\..\..\..\..\..\..\..\..\..\project.mk)
  175. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..
  176. !elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
  177. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..
  178. !elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
  179. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..\..
  180. !elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
  181. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..\..\..
  182. !elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
  183. _PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..\..\..\..
  184. !endif
  185. !if "$(_PROJECT_MK_PATH)" != ""
  186. #!message "Including $(_PROJECT_MK_PATH)\project.mk"
  187. !include $(_PROJECT_MK_PATH)\project.mk
  188. !if exists($(_PROJECT_MK_PATH)\myproject.mk)
  189. !include $(_PROJECT_MK_PATH)\myproject.mk
  190. !endif
  191. !else
  192. #!message "Unable to find project.mk. Update makefile.plt or create project.mk."
  193. !endif
  194. !IFDEF _PROJECT_
  195. PROJECT_ROOT=$(BASEDIR)\$(_PROJECT_)
  196. PROJECT_PUBLIC_PATH=$(PUBLIC_INTERNAL_PATH)\$(_PROJECT_)
  197. PROJECT_INC_PATH=$(PROJECT_PUBLIC_PATH)\inc
  198. PRIVATE_INC_PATH=$(PROJECT_INC_PATH)
  199. PROJECT_LIB_DEST=$(PROJECT_PUBLIC_PATH)\lib
  200. PROJECT_LIB_PATH=$(PROJECT_LIB_DEST)\$(TARGET_DIRECTORY)
  201. PROJECT_INF_PATH=$(PROJECT_PUBLIC_PATH)\inf
  202. !ELSE
  203. #!message "ERROR: _PROJECT_ is not defined. Should be defined in project.mk."
  204. !ENDIF
  205. #
  206. # If not defined, define the build message banner.
  207. #
  208. !IFNDEF BUILDMSG
  209. BUILDMSG=
  210. !ENDIF
  211. !if ("$(NTDEBUG)" == "") || ("$(NTDEBUG)" == "ntsdnodbg")
  212. FREEBUILD=1
  213. ! ifndef BUILD_TYPE
  214. BUILD_TYPE=fre
  215. ! endif
  216. !else
  217. FREEBUILD=0
  218. ! ifndef BUILD_TYPE
  219. BUILD_TYPE=chk
  220. ! endif
  221. !endif
  222. # Allow alternate object directories.
  223. !if !defined(BUILD_ALT_DIR) && defined(CHECKED_ALT_DIR) && !$(FREEBUILD)
  224. BUILD_ALT_DIR=d
  225. !endif
  226. _OBJ_DIR = obj$(BUILD_ALT_DIR)
  227. #
  228. # Determine which target is being built (i386 or ia64) and define
  229. # the appropriate target variables.
  230. #
  231. !IFNDEF 386
  232. 386=0
  233. !ENDIF
  234. !IFNDEF AMD64
  235. AMD64=0
  236. !ENDIF
  237. !IFNDEF PPC
  238. PPC=0
  239. !ENDIF
  240. !IFNDEF MPPC
  241. MPPC=0
  242. !ENDIF
  243. !IFNDEF IA64
  244. IA64=0
  245. !ENDIF
  246. !IFNDEF ARM
  247. ARM=0
  248. !ENDIF
  249. # Disable for now.
  250. MIPS=0
  251. AXP64=0
  252. ALPHA=0
  253. #
  254. # Default to building for the i386 target, if no target is specified.
  255. #
  256. !IF !$(386)
  257. ! IF !$(AMD64)
  258. ! IF !$(MPPC)
  259. ! IF !$(IA64)
  260. ! IF !$(ARM)
  261. 386=1
  262. ! ENDIF
  263. ! ENDIF
  264. ! ENDIF
  265. ! ENDIF
  266. !ENDIF
  267. #
  268. # Define the target platform specific information.
  269. #
  270. !if $(386)
  271. ASM_SUFFIX=asm
  272. ASM_INCLUDE_SUFFIX=inc
  273. TARGET_BRACES=
  274. !ifdef SUBSTITUTE_386_CC
  275. TARGET_CPP=$(SUBSTITUTE_386_CC)
  276. !else
  277. TARGET_CPP=cl
  278. !endif
  279. TARGET_DEFINES=-Di386 -D_X86_
  280. TARGET_DIRECTORY=i386
  281. TLB_SWITCHES=/tlb
  282. !ifndef _NTTREE
  283. ! ifdef _NTX86TREE
  284. _NTTREE=$(_NTX86TREE)
  285. ! elseif defined(_NT386TREE)
  286. _NTTREE=$(_NT386TREE)
  287. ! endif
  288. !endif
  289. VCCOM_SUPPORTED=1
  290. SCP_SUPPORTED=1
  291. WIN64=0
  292. PLATFORM_MFC_VER=0x0600
  293. MACHINE_TYPE=ix86
  294. ANSI_ANNOTATION=0
  295. LTCG_DRIVER=0
  296. LTCG_DRIVER_LIBRARY=0
  297. LTCG_DYNLINK=0
  298. LTCG_EXPORT_DRIVER=0
  299. LTCG_GDI_DRIVER=0
  300. LTCG_HAL=0
  301. LTCG_LIBRARY=0
  302. LTCG_MINIPORT=0
  303. LTCG_PROGRAM=0
  304. LTCG_PROGLIB=0
  305. LTCG_UMAPPL_NOLIB=0
  306. TARGET_CSC=csc
  307. !elseif $(AMD64)
  308. ASM_SUFFIX=asm
  309. ASM_INCLUDE_SUFFIX=inc
  310. TARGET_BRACES=
  311. TARGET_CPP=cl
  312. TARGET_DEFINES=-D_AMD64_ -D_WIN64 -D_AMD64_WORKAROUND_
  313. TARGET_DIRECTORY=amd64
  314. TLB_SWITCHES=/tlb
  315. !ifndef HOST_TARGETCPU
  316. HOST_TARGETCPU=i386
  317. !endif
  318. !ifndef _NTTREE
  319. ! ifdef _NTAMD64TREE
  320. _NTTREE=$(_NTAMD64TREE)
  321. ! elseif defined(_NTAMD64TREE)
  322. _NTTREE=$(_NTAMD64TREE)
  323. ! endif
  324. !endif
  325. VCCOM_SUPPORTED=1
  326. SCP_SUPPORTED=0
  327. WIN64=1
  328. PLATFORM_MFC_VER=0x0600
  329. MACHINE_TYPE=amd64
  330. ANSI_ANNOTATION=0
  331. LTCG_DRIVER=0
  332. LTCG_DRIVER_LIBRARY=0
  333. LTCG_DYNLINK=0
  334. LTCG_EXPORT_DRIVER=0
  335. LTCG_GDI_DRIVER=0
  336. LTCG_HAL=0
  337. LTCG_LIBRARY=0
  338. LTCG_MINIPORT=0
  339. LTCG_PROGRAM=0
  340. LTCG_PROGLIB=0
  341. LTCG_UMAPPL_NOLIB=0
  342. !elseif $(MPPC)
  343. ASM_SUFFIX=s
  344. ASM_INCLUDE_SUFFIX=h
  345. TARGET_BRACES=-B
  346. TARGET_CPP=cl
  347. TARGET_DEFINES=-DMPPC -D_MPPC_
  348. TARGET_DIRECTORY=mppc
  349. TLB_SWITCHES=/tlb
  350. WIN64=0
  351. PLATFORM_MFC_VER=0x0421
  352. MACHINE_TYPE=mppc
  353. !ifndef _NTTREE
  354. ! ifdef _NTMPPCTREE
  355. _NTTREE=$(_NTMPPCTREE)
  356. ! endif
  357. !endif
  358. ANSI_ANNOTATION=1
  359. LTCG_DRIVER=0
  360. LTCG_DRIVER_LIBRARY=0
  361. LTCG_DYNLINK=0
  362. LTCG_EXPORT_DRIVER=0
  363. LTCG_GDI_DRIVER=0
  364. LTCG_HAL=0
  365. LTCG_LIBRARY=0
  366. LTCG_MINIPORT=0
  367. LTCG_PROGRAM=0
  368. LTCG_PROGLIB=0
  369. LTCG_UMAPPL_NOLIB=0
  370. !elseif $(IA64)
  371. ASM_SUFFIX=s
  372. ASM_INCLUDE_SUFFIX=h
  373. TARGET_BRACES=-B
  374. TARGET_CPP=cl
  375. TARGET_DEFINES=-DIA64 -D_IA64_
  376. TARGET_DIRECTORY=ia64
  377. TLB_SWITCHES=/tlb
  378. # default to X86 for now
  379. !ifndef HOST_TARGETCPU
  380. HOST_TARGETCPU=i386
  381. !endif
  382. !ifndef _NTTREE
  383. ! ifdef _NTIA64TREE
  384. _NTTREE=$(_NTIA64TREE)
  385. ! endif
  386. !endif
  387. WIN64=1
  388. PLATFORM_MFC_VER=0x0600
  389. SCP_SUPPORTED=0
  390. MACHINE_TYPE=ia64
  391. ANSI_ANNOTATION=0
  392. LTCG_DRIVER=0
  393. LTCG_DRIVER_LIBRARY=0
  394. LTCG_DYNLINK=0
  395. LTCG_EXPORT_DRIVER=0
  396. LTCG_GDI_DRIVER=0
  397. LTCG_HAL=0
  398. LTCG_LIBRARY=0
  399. LTCG_MINIPORT=0
  400. LTCG_PROGRAM=0
  401. LTCG_PROGLIB=0
  402. LTCG_UMAPPL_NOLIB=0
  403. !elseif $(ARM)
  404. ASM_SUFFIX=s
  405. ASM_INCLUDE_SUFFIX=inc
  406. TARGET_BRACES=
  407. TARGET_CPP=clarm
  408. TARGET_DEFINES=-D_ARM_
  409. TARGET_DIRECTORY=arm
  410. TLB_SWITCHES=/tlb
  411. !ifndef HOST_TARGETCPU
  412. HOST_TARGETCPU=i386
  413. !endif
  414. !ifndef _NTTREE
  415. ! ifdef _NTARMTREE
  416. _NTTREE=$(_NTARMTREE)
  417. ! elseif defined(_NTARMTREE)
  418. _NTTREE=$(_NTARMTREE)
  419. ! endif
  420. !endif
  421. VCCOM_SUPPORTED=0
  422. SCP_SUPPORTED=0
  423. WIN64=0
  424. PLATFORM_MFC_VER=0x0600
  425. MACHINE_TYPE=arm
  426. ANSI_ANNOTATION=0
  427. LTCG_DRIVER=0
  428. LTCG_DRIVER_LIBRARY=0
  429. LTCG_DYNLINK=0
  430. LTCG_EXPORT_DRIVER=0
  431. LTCG_GDI_DRIVER=0
  432. LTCG_HAL=0
  433. LTCG_LIBRARY=0
  434. LTCG_MINIPORT=0
  435. LTCG_PROGRAM=0
  436. LTCG_PROGLIB=0
  437. LTCG_UMAPPL_NOLIB=0
  438. !else
  439. !error Must define the target as 386, mppc ia64, amd64, or arm.
  440. !endif
  441. #
  442. # These flags don't depend on i386 etc. however have to be in this file.
  443. #
  444. # MIDL_OPTIMIZATION is the optimization flag set for the current NT.
  445. # MIDL_OPTIMIZATION_NO_ROBUST is the current optimization without robust.
  446. #
  447. !ifdef MIDL_PROTOCOL
  448. MIDL_PROTOCOL_DEFAULT=-protocol $(MIDL_PROTOCOL)
  449. !else
  450. # MIDL_PROTOCOL_DEFAULT=-protocol all
  451. !endif
  452. !IFNDEF MIDL_OPTIMIZATION
  453. MIDL_OPTIMIZATION=-Oicf -robust -error all $(MIDL_PROTOCOL_DEFAULT)
  454. !ENDIF
  455. MIDL_OPTIMIZATION_NO_ROBUST=-Oicf -error all -no_robust
  456. MIDL_OPTIMIZATION_NT4=-Oicf -error all -no_robust
  457. MIDL_OPTIMIZATION_NT5=-Oicf -robust -error all $(MIDL_PROTOCOL_DEFAULT)
  458. !ifdef SUBSTITUTE_MIDL_CC
  459. MIDL_CPP=$(SUBSTITUTE_MIDL_CC)
  460. !else
  461. MIDL_CPP=$(TARGET_CPP)
  462. !endif
  463. MIDL_FLAGS=$(TARGET_DEFINES) -D_WCHAR_T_DEFINED
  464. #
  465. # If not defined, simply set to default
  466. #
  467. !IFNDEF HOST_TARGETCPU
  468. HOST_TARGETCPU=$(TARGET_DIRECTORY)
  469. !ENDIF
  470. ! if $(WIN64)
  471. MIDL_ALWAYS_GENERATE_STUBS=1
  472. ! else
  473. MIDL_ALWAYS_GENERATE_STUBS=0
  474. ! endif
  475. CLEANSE_PUBLISHED_HDR=copy
  476. PATH_TOOLS16=$(BASEDIR)\tools\tools16
  477. # If a build path is defined, use it.
  478. !ifdef BUILD_PATH
  479. PATH=$(BUILD_PATH)
  480. !endif
  481. BINPLACE_PLACEFILE_DIR=$(NTMAKEENV)