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.

296 lines
7.2 KiB

  1. !IF 0
  2. Copyright (c) 1994-1996 Microsoft Corporation
  3. Module Name:
  4. armmk.inc
  5. Abstract:
  6. This module contains the ARM specific build controls. It is included
  7. by makefile.def.
  8. Revision History:
  9. !ENDIF
  10. DELAYLOAD_SUPPORTED=1
  11. !ifndef DELAYLOAD_VERSION
  12. DELAYLOAD_VERSION=0x0200
  13. !endif
  14. #
  15. # ARM option control
  16. #
  17. UMBASE=$(UMBASE:*=arm)
  18. UMLIBS=$(UMLIBS:*=arm)
  19. NTRES=$(NTRES:*=arm)
  20. UMRES=$(UMRES:*=arm)
  21. UMOBJS=$(UMOBJS:*=arm)
  22. LINKLIBS=$(LINKLIBS:*=arm)
  23. GDI_DRIVER_LIBS=$(GDI_DRIVER_LIBS:*=arm)
  24. DLLBASE=$(DLLBASE:*=arm)
  25. DLLDEF=$(DLLDEF:*=arm)
  26. MACHINE_TARGETLIBS=$(MACHINE_TARGETLIBS:*=arm)
  27. !ifdef USE_MSHTML_PDB_RULES
  28. MACHINE_TARGETLIBS=$(MACHINE_TARGETLIBS:????????=*)
  29. !endif
  30. TARGET=$(TARGET:*=arm)
  31. DYNLINK_LIB=$(DYNLINK_LIB:*=arm)
  32. TARGETEXEFILES=$(TARGETEXEFILES:*=arm)
  33. TARGETLIBFILES=$(TARGETLIBFILES:*=arm)
  34. TARGETOBJFILES=$(TARGETOBJFILES:*=arm)
  35. UMOBJFILES=$(UMOBJFILES:*=arm)
  36. UMEXEFILES=$(UMEXEFILES:*=arm)
  37. HEADERFILE=$(HEADERFILE:*=arm)
  38. HEADEROBJNAME=$(HEADEROBJNAME:*=arm)
  39. HEADEROBJ=$(HEADEROBJ:*=arm)
  40. PRECOMPILED=$(PRECOMPILED:*=arm)
  41. PRECOMPILED_CXX=$(PRECOMPILED_CXX:*=arm)
  42. PRECOMPILED_TARGET=$(PRECOMPILED_TARGET:*=arm)
  43. MFC_STATIC_LIB=$(MFC_STATIC_LIB:*=arm)
  44. CRT_LIB_PATH=$(CRT_LIB_PATH:*=arm)
  45. SDK_LIB_PATH=$(SDK_LIB_PATH:*=arm)
  46. DDK_LIB_PATH=$(DDK_LIB_PATH:*=arm)
  47. IFSKIT_LIB_PATH=$(IFSKIT_LIB_PATH:*=arm)
  48. HALKIT_LIB_PATH=$(HALKIT_LIB_PATH:*=arm)
  49. PROCESSOR_LIB_PATH=$(PROCESSOR_LIB_PATH:*=arm)
  50. ORDER=$(ORDER:*=arm)
  51. OBJLIBFILES=$(OBJLIBFILES:*=arm)
  52. MISCFILES=$(MISCFILES) $(ARM_MISCFILES)
  53. SOURCES=$(SOURCES) $(ARM_SOURCES)
  54. ADDITIONAL_ATL_LIBS = $(ADDITIONAL_ATL_LIBS) $(SDK_LIB_PATH)\atlarm.lib
  55. !ifdef NTTARGETFILES
  56. NTTARGETFILES=$(NTTARGETFILES:*=arm)
  57. !endif
  58. !ifdef NTTARGETFILE0
  59. NTTARGETFILE0=$(NTTARGETFILE0:*=arm)
  60. !endif
  61. !ifdef NTTARGETFILE1
  62. NTTARGETFILE1=$(NTTARGETFILE1:*=arm)
  63. !endif
  64. !ifdef PROJECT_LIB_PATH
  65. PROJECT_LIB_PATH=$(PROJECT_LIB_PATH:*=arm)
  66. !endif
  67. ENTRY_SUFFIX=
  68. GDI_ENTRY_SUFFIX=
  69. DEFAULT_STACKRESERVE=0x40000
  70. DEFAULT_STACKCOMMIT=0x1000
  71. ADDITIONAL_ATL_LIBS = $(ADDITIONAL_ATL_LIBS)
  72. !IFDEF ARM_WARNING_LEVEL
  73. MSC_WARNING_LEVEL=$(ARM_WARNING_LEVEL)
  74. !ENDIF
  75. MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
  76. !ifdef ARM_PERFFLAGS
  77. PERFFLAGS = $(ARM_PERFFLAGS)
  78. !endif
  79. # Set MSC_OPTIMIZATION.
  80. # Order of precedence:
  81. # Platform specific override
  82. # Environment variable
  83. # System Default
  84. !if defined(ARM_OPTIMIZATION)
  85. MSC_OPTIMIZATION=$(ARM_OPTIMIZATION)
  86. !elseif !defined(MSC_OPTIMIZATION)
  87. MSC_OPTIMIZATION=$(DEFAULT_MSC_OPT)
  88. !endif
  89. DBGFLAGS=$(DBGFLAGS) $(MSC_OPTIMIZATION)
  90. WIN32_LIBS=$(WIN32_LIBS) $(LIBRARY_PATH)\ntdll.lib
  91. !IFDEF ARM_CPPFLAGS
  92. MSC_CPPFLAGS=$(ARM_CPPFLAGS)
  93. !ENDIF
  94. !ifdef NO_STRING_POOLING
  95. STRING_POOLING =
  96. !else
  97. !ifdef NO_READONLY_STRINGS
  98. STRING_POOLING = /Gf
  99. !else
  100. STRING_POOLING = /GF
  101. !endif
  102. !endif
  103. !ifdef USE_NATIVE_EH
  104. EH_FLAGS=/GX
  105. !if "$(USE_NATIVE_EH)" == "ASYNC"
  106. EH_FLAGS=$(EH_FLAGS) /EHa
  107. !endif
  108. !else
  109. EH_FLAGS=/GX-
  110. !endif
  111. ! ifdef USE_RTTI
  112. RTTI_FLAGS=/GR
  113. ! else
  114. RTTI_FLAGS=/GR-
  115. ! endif
  116. !ifdef USE_INCREMENTAL_COMPILING
  117. C_INCREMENTAL_FLAG = /Gi
  118. USE_PDB_TO_COMPILE = 1
  119. !else
  120. C_INCREMENTAL_FLAG = /Gi-
  121. !undef USE_PDB_TO_COMPILE
  122. !endif
  123. !ifndef ARM_CPU_OPTIMIZATION
  124. ARM_CPU_OPTIMIZATION=
  125. !endif
  126. STDFLAGS= /c /Zel /Zp8 /Gy $(CBSTRING) $(MSC_WARNING_LEVEL) $(MSC_CALL_TYPE) \
  127. $(ERATTA_FLAGS) $(ARM_CPU_OPTIMIZATION) $(C_INCREMENTAL_FLAG) $(EH_FLAGS) \
  128. $(RTTI_FLAGS) $(STRING_POOLING)
  129. !if $(FREEBUILD)
  130. ASM_DBG_DEFINES=-DDBG=0
  131. !else
  132. ARM_ADBGFLAGS=$(ARM_ADBGFLAGS) /Zi
  133. !endif
  134. # @@BEGIN_DDKSPLIT
  135. !IFDEF NTBBT
  136. DBGFLAGS=$(DBGFLAGS) /Zi
  137. ARM_ADBGFLAGS=$(ARM_ADBGFLAGS) /Zi
  138. LINKER_FLAGS=$(LINKER_FLAGS) -debug:full -debugtype:cv,fixup,pdata
  139. !ENDIF
  140. # @@END_DDKSPLIT
  141. !ifndef USE_PDB_TO_COMPILE
  142. DBGFLAGS=$(DBGFLAGS:/Zi=-Z7)
  143. DBGFLAGS=$(DBGFLAGS:-Zi=-Z7)
  144. !else
  145. ! ifndef USE_MSHTML_PDB_RULES
  146. ! if "$(TARGETTYPE)" == "LIBRARY"
  147. DBGFLAGS=$(DBGFLAGS) /Fd$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).pdb
  148. ! else
  149. DBGFLAGS=$(DBGFLAGS) /Fd$(MAKEDIR)\$(_OBJ_DIR)\ARM^\
  150. ! endif
  151. ! else
  152. ! ifndef TARGETPDB
  153. TARGETPDB=$(TARGETNAME)
  154. ! endif
  155. ! ifndef ROOT
  156. ROOT=$(MAKEDIR)
  157. ! endif
  158. DBGFLAGS=$(DBGFLAGS) /Fd$(ROOT)\$(_OBJ_DIR)\arm\$(TARGETPDB).pdb
  159. ! endif
  160. !endif
  161. !ifndef NO_BROWSER_INFO
  162. ! ifdef BROWSER_INFO
  163. DBGFLAGS=$(DBGFLAGS) /FR$(MAKEDIR)\$(_OBJ_DIR)\arm^\
  164. ! endif
  165. !endif
  166. #
  167. # arm option control
  168. #
  169. !IF "$(HALTYPE)" == ""
  170. HALDEF=
  171. !ELSE
  172. HALDEF=-D$(HALTYPE)=1
  173. !ENDIF
  174. STD_DEFINES=-D_ARM_ -DARM $(HALDEF) $(MSC_CALL_DEFINE) $(STD_DEFINES)
  175. CDEFINES=$(STD_DEFINES) $(TARGET_DBG_DEFINES) \
  176. $(LIBC_DEFINES) $(C_DEFINES) $(NET_C_DEFINES) $(MFC_DEFINES)
  177. CFLAGS=$(ARM_FLAGS) $(NTARMFLAGS) $(STDFLAGS) $(DBGFLAGS) $(PERFFLAGS) $(USER_C_FLAGS)
  178. ARM_ASMFLAGS=$(ARM_ADBGFLAGS) $(STD_DEFINES) $(ASM_DBG_DEFINES)\
  179. $(TARGET_DBG_DEFINES) $(ASM_DEFINES)
  180. ARM_CDEFINES=$(CDEFINES)
  181. ARM_CFLAGS=$(CFLAGS)
  182. CC_NAME = clarm -nologo
  183. C_COMPILER_NAME = $(CC_NAME)
  184. CXX_COMPILER_NAME = $(CC_NAME)
  185. C_PREPROCESSOR_NAME = $(CC_NAME)
  186. !ifndef ARM_ASSEMBLER_NAME
  187. ARM_ASSEMBLER_NAME = armasm
  188. !endif
  189. GLOBAL_C_FLAGS = -Iarm\ -I. $(INCPATH1) $(CDEFINES) $(CFLAGS)
  190. NP_COMPILER_FLAGS = $(GLOBAL_C_FLAGS) $(COMPILER_WARNINGS)
  191. C_COMPILER_FLAGS = $(NP_COMPILER_FLAGS) $(PRECOMPILED)
  192. CXX_COMPILER_FLAGS = $(NP_COMPILER_FLAGS) $(PRECOMPILED_CXX) $(MSC_CPPFLAGS) $(NTCPPFLAGS)
  193. C_PREPROCESSOR_FLAGS = $(GLOBAL_C_FLAGS) -EP -Tc
  194. C_PREPROCESSOR = $(C_PREPROCESSOR_NAME) $(C_PREPROCESSOR_FLAGS)
  195. C_ASM_PREPROCESSOR = $(C_PREPROCESSOR_NAME) $(ASM_DEFINES) $(C_PREPROCESSOR_FLAGS)
  196. C_COMPILER = $(C_COMPILER_NAME) $(C_COMPILER_FLAGS)
  197. NP_C_COMPILER = $(C_COMPILER_NAME) $(NP_COMPILER_FLAGS)
  198. CXX_COMPILER = $(CXX_COMPILER_NAME) $(CXX_COMPILER_FLAGS)
  199. ARM_ASSEMBLER=$(ARM_ASSEMBLER_NAME) -c -coff -Cx -nologo -Iarm\ -I. $(INCPATH1) $(ARM_ASMFLAGS)
  200. ECHO_MSG=$(C_COMPILER) $<
  201. ECHO_MSG_P=$(NP_C_COMPILER) $**
  202. ECHO_CXX_MSG=$(CXX_COMPILER) $<
  203. ECHO_PRECOMPILED_MSG1=$(C_COMPILER_NAME) $(C_COMPILER_FLAGS) /Yl$(TARGETNAME) /Yc$(?F) $(HEADERFILE) \
  204. $(HEADEROBJ) $(PRECOMPILED_FLAG) $(PRECOMPILED_SOURCEFILE)
  205. ECHO_PRECOMPILED_MSG2=$(C_COMPILER_NAME) $(C_COMPILER_FLAGS) /Yl$(TARGETNAME) /Yc$(?F) $(HEADERFILE) \
  206. $(HEADEROBJ) $(PRECOMPILED_FLAG)
  207. {}.c{}.asm:
  208. $(C_COMPILER_NAME) @<< /Fa $(MAKEDIR)\$(<F)
  209. $(C_COMPILER_FLAGS: =
  210. )
  211. $(C_COMPILER_FLAGS:##= )
  212. <<NOKEEP
  213. {..\arm\}.asm{}.lst:
  214. $(ARM_ASSEMBLER) /Fl$@ /Fo$(_OBJ_DIR)\arm\$(@B).obj $(MAKEDIR)\$<
  215. {arm\}.asm{}.lst:
  216. $(ARM_ASSEMBLER) /Fl$@ /Fo$(MAKEDIR)\$(_OBJ_DIR)\arm\$(@B).obj $(MAKEDIR)\$<
  217. {..\arm\}.asm{$(_OBJ_DIR)\arm\}.obj:
  218. $(ARM_ASSEMBLER) -Fo$(MAKEDIR)\$@ $(MAKEDIR)\$<
  219. {arm\}.asm{$(_OBJ_DIR)\arm\}.obj:
  220. $(ARM_ASSEMBLER) -Fo$(MAKEDIR)\$@ $(MAKEDIR)\$<
  221. {$(O)\}.asm{$(O)\}.obj:
  222. $(ARM_ASSEMBLER) -Fo$(MAKEDIR)\$@ $(MAKEDIR)\$<
  223. !IFDEF _NTARMLIBS
  224. _NTLIBS=$(_NTARMLIBS)
  225. !ENDIF
  226. COPYDST=$(ARMCOPYDST)
  227. LIB_COPY=ntarmcp.cmd
  228. !IF "$(NTDEBUGTYPE)" == "windbg" || "$(NTDEBUGTYPE)" == "both"
  229. NTTEST_LINK_OPTIONS=-entry:KiSystemStartup
  230. !ELSE
  231. NTTEST_LINK_OPTIONS=-base:0x80100000 -entry:KiSystemStartup
  232. !ENDIF
  233. LINKER_FLAGS=$(LINKER_FLAGS) /opt:nowin98
  234. DRIVER_ALIGNMENT=0x0080
  235. KERNEL_ALIGNMENT=0x1000