Source code of Windows XP (NT5)
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.

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