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.

199 lines
5.3 KiB

  1. !IFNDEF LANGUAGE
  2. LANGUAGE=usa
  3. !ENDIF
  4. !IF "$(BUILD_DEBUG_LOADER)" != ""
  5. DBG_LDR=_dbg
  6. !ELSE
  7. DBG_LDR=
  8. !ENDIF
  9. #
  10. # BOOT_LIB_DIR is the relative path to boot.lib.
  11. #
  12. !IFNDEF BOOT_LIB_DIR
  13. BOOT_LIB_DIR=daytona$(DBG_LDR)
  14. !ENDIF
  15. #
  16. # RSP_DIR is the relative path to the linker response files.
  17. #
  18. !IFNDEF RSP_DIR
  19. RSP_DIR=daytona
  20. !ENDIF
  21. $(O)\msg.mc : ..\msg.$(LANGUAGE)
  22. copy $** $@
  23. !IF $(386)
  24. OSLOADER_LIBS=\
  25. $(O)\bldr.lib \
  26. $(O)\osloader.res \
  27. $(O)\osloader.exp \
  28. $(PROJECT_ROOT)\boot\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib \
  29. $(PROJECT_ROOT)\boot\bd\daytona$(DBG_LDR)\$(O)\bd.lib \
  30. $(PROJECT_ROOT)\boot\tftplib\$(O)\tftplib.lib \
  31. $(PROJECT_ROOT)\boot\bootssp\boot\$(O)\bootssp.lib \
  32. $(PROJECT_ROOT)\ntos\ke\up\$(O)\ke.lib \
  33. $(PROJECT_ROOT)\ntos\rtl\boot$(DBG_LDR)\$(O)\bldrrtl$(DBG_LDR).lib \
  34. $(PROJECT_ROOT)\ntos\config\boot\$(O)\bconfig.lib \
  35. $(SDK_LIB_PATH)\libcntpr.lib \
  36. $(DS_LIB_PATH)\rsa32.lib
  37. $(O)\osloader.res: $(O)\msg.mc
  38. $(O)\osloader.lib $(O)\osloader.exp: ..\daytona\i386\osloader.def
  39. $(LIB_NAME) -machine:i386 -out:$(O)\osloader.lib -def:..\daytona\i386\osloader.def ..\..\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib $(O)\bldr.lib -ignore:4001
  40. $(O)\link.rsp : ..\makefile.inc
  41. type << > $@
  42. -machine:i386
  43. -debug
  44. -entry:NtProcessStartup@4
  45. -fixed
  46. -force:multiple
  47. -ignore:4049,4001
  48. -incremental:no
  49. -map
  50. -opt:ref
  51. -opt:icf
  52. -subsystem:native
  53. $(LINK_TIME_CODE_GENERATION_LINKER_FLAGS)
  54. $(LINK_LIB_IGNORE_FLAG)
  55. $(OSLOADER_LIBS)
  56. <<NOKEEP
  57. LDR_ROOT=osloader$(DBG_LDR)
  58. LDR_NAME=$(LDR_ROOT).exe
  59. $(O)\$(LDR_NAME): $(OSLOADER_LIBS) makefile.inc $(O)\link.rsp
  60. -$(LINK_NAME) -out:$@ @$(O)\link.rsp
  61. #
  62. # Inject ntdetect.com as a PE data section into osloader.ntd. This
  63. # is used on a remote boot to avoid downloading ntdetect.com
  64. # over the network.
  65. #
  66. $(O)\$(LDR_ROOT).ntd: $(O)\$(LDR_NAME) $(PROJECT_ROOT)\boot\detect\fre\$(O)\ntdetect.com
  67. addsect /o:$(O)\$(LDR_ROOT).ntd /i:$(O)\$(LDR_NAME) /d:$(PROJECT_ROOT)\boot\detect\fre\$(O)\ntdetect.com /s:.detect
  68. !if "$(LDR_NAME)" == "osloader$(DBG_LDR).exe"
  69. #
  70. # STARTUP_DIR is the relative path to startup.com.
  71. # All languages and NEC_98 use their own startup.com,
  72. # except FE langauges which use the US version when
  73. # creating NTLDR.
  74. #
  75. !IFNDEF STARTUP_DIR
  76. STARTUP_DIR=$(ALT_PROJECT)
  77. !ENDIF
  78. $(O)\NTLDR$(DBG_LDR): $(OSLOADER_LIBS) $(O)\$(LDR_NAME) ..\..\startup\$(STARTUP_DIR)\$(_OBJ_DIR)\i386\startup.com makefile.inc
  79. -copy $(O)\osloader$(DBG_LDR).exe $(O)\osloader.spl
  80. splitsym -a $(O)\osloader.spl
  81. -copy /b ..\..\startup\$(STARTUP_DIR)\$(_OBJ_DIR)\i386\startup.com+$(O)\osloader.spl $@
  82. -del /q $(O)\osloader.dbg
  83. -del /q $(O)\osloader.spl
  84. !endif
  85. !ELSE IF $(IA64)
  86. OSLOADER_LIBS=\
  87. $(O)\bldr.lib \
  88. $(O)\osloader.res \
  89. $(PROJECT_ROOT)\boot\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib \
  90. $(PROJECT_ROOT)\boot\bd\daytona$(DBG_LDR)\$(O)\bd.lib \
  91. $(PROJECT_ROOT)\boot\tftplib\$(O)\tftplib.lib \
  92. $(PROJECT_ROOT)\boot\bootssp\boot\$(O)\bootssp.lib \
  93. $(PROJECT_ROOT)\boot\efi\daytona$(DBG_LDR)\$(O)\efi.lib \
  94. $(PROJECT_ROOT)\ntos\ke\up\$(O)\ke.lib \
  95. $(PROJECT_ROOT)\ntos\rtl\boot$(DBG_LDR)\$(O)\bldrrtl$(DBG_LDR).lib \
  96. $(PROJECT_ROOT)\ntos\config\boot\$(O)\bconfig.lib \
  97. $(DS_LIB_PATH)\rsa32.lib \
  98. $(SDK_LIB_PATH)\libcntpr.lib \
  99. # $(SDK_LIB_PATH)\libssc.lib
  100. !IFNDEF STARTUP_DIR
  101. STARTROM_DIR=$(ALT_PROJECT)
  102. !ENDIF
  103. $(O)\link.rsp : ..\makefile.inc
  104. type << > $@
  105. -subsystem:EFI_APPLICATION
  106. -driver
  107. -map
  108. -machine:IA64
  109. -debug:full
  110. -last:.rdata
  111. -last:.pdata
  112. -last:.comment
  113. -base:0x1040000
  114. !IF "$(BUILD_DEBUG_LOADER)" != ""
  115. -fixed
  116. !ENDIF
  117. -entry:main
  118. -ignore:4049,4001
  119. -nodefaultlib
  120. -opt:icf
  121. -opt:ref
  122. $(LINK_TIME_CODE_GENERATION_LINKER_FLAGS)
  123. $(LINK_LIB_IGNORE_FLAG)
  124. $(OSLOADER_LIBS)
  125. <<NOKEEP
  126. $(O)\osloader.res: $(O)\msg.mc
  127. OSLOADER_LIB_COMPONENTS = \
  128. $(PROJECT_ROOT)\boot\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib \
  129. $(PROJECT_ROOT)\boot\efi\daytona$(DBG_LDR)\$(O)\efi.lib \
  130. $(O)\bldr.lib
  131. $(O)\osloader.lib $(O)\osloader.exp: ..\ia64\osloader.def
  132. $(LIB_NAME) -machine:ia64 -out:$(O)\osloader.lib -def:..\ia64\osloader.def $(OSLOADER_LIB_COMPONENTS) -ignore:4001
  133. $(O)\ia64ldr$(DBG_LDR).efi: $(OSLOADER_LIBS) makefile.inc $(O)\link.rsp
  134. -$(LINK_NAME) -out:$@ @$(O)\link.rsp
  135. !ELSE
  136. OSLOADER_LIBS=\
  137. $(O)\bldr.lib \
  138. $(O)\osloader.res \
  139. $(PROJECT_ROOT)\boot\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib \
  140. $(PROJECT_ROOT)\boot\bd\daytona$(DBG_LDR)\$(O)\bd.lib \
  141. $(PROJECT_ROOT)\boot\tftplib\$(O)\tftplib.lib \
  142. $(PROJECT_ROOT)\boot\bootssp\boot\$(O)\bootssp.lib \
  143. $(PROJECT_ROOT)\ntos\ke\up\$(O)\ke.lib \
  144. $(PROJECT_ROOT)\ntos\rtl\boot$(DBG_LDR)\$(O)\bldrrtl$(DBG_LDR).lib \
  145. $(PROJECT_ROOT)\ntos\config\boot\$(O)\bconfig.lib \
  146. $(SDK_LIB_PATH)\libcntpr.lib \
  147. $(DS_LIB_PATH)\rsa32.lib
  148. $(O)\link.rsp : ..\makefile.inc
  149. type << > $@
  150. -rom
  151. -debug:full
  152. -fixed
  153. -map
  154. -align:0x200
  155. !if $(AXP64)
  156. -base:0xFFFFFFFF80600000
  157. !else
  158. -base:0x80600000
  159. !endif
  160. -entry:BlOsLoader
  161. -ignore:4049,4001
  162. -nodefaultlib
  163. -opt:noicf
  164. $(LINK_TIME_CODE_GENERATION_LINKER_FLAGS)
  165. $(LINK_LIB_IGNORE_FLAG)
  166. $(OSLOADER_LIBS)
  167. <<NOKEEP
  168. $(O)\osloader.res: $(O)\msg.mc
  169. $(O)\osloader$(DBG_LDR).exe: $(OSLOADER_LIBS) makefile.inc $(O)\link.rsp
  170. -$(LINK_NAME) -out:$@ @$(O)\link.rsp
  171. !ENDIF