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.

196 lines
5.1 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. -entry:main
  115. -ignore:4049,4001
  116. -nodefaultlib
  117. -opt:icf
  118. -opt:ref
  119. $(LINK_TIME_CODE_GENERATION_LINKER_FLAGS)
  120. $(LINK_LIB_IGNORE_FLAG)
  121. $(OSLOADER_LIBS)
  122. <<NOKEEP
  123. $(O)\osloader.res: $(O)\msg.mc
  124. OSLOADER_LIB_COMPONENTS = \
  125. $(PROJECT_ROOT)\boot\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib \
  126. $(PROJECT_ROOT)\boot\efi\daytona$(DBG_LDR)\$(O)\efi.lib \
  127. $(O)\bldr.lib
  128. $(O)\osloader.lib $(O)\osloader.exp: ..\ia64\osloader.def
  129. $(LIB_NAME) -machine:ia64 -out:$(O)\osloader.lib -def:..\ia64\osloader.def $(OSLOADER_LIB_COMPONENTS) -ignore:4001
  130. $(O)\ia64ldr$(DBG_LDR).efi: $(OSLOADER_LIBS) makefile.inc $(O)\link.rsp
  131. -$(LINK_NAME) -out:$@ @$(O)\link.rsp
  132. !ELSE
  133. OSLOADER_LIBS=\
  134. $(O)\bldr.lib \
  135. $(O)\osloader.res \
  136. $(PROJECT_ROOT)\boot\lib\$(BOOT_LIB_DIR)\$(O)\boot.lib \
  137. $(PROJECT_ROOT)\boot\bd\daytona$(DBG_LDR)\$(O)\bd.lib \
  138. $(PROJECT_ROOT)\boot\tftplib\$(O)\tftplib.lib \
  139. $(PROJECT_ROOT)\boot\bootssp\boot\$(O)\bootssp.lib \
  140. $(PROJECT_ROOT)\ntos\ke\up\$(O)\ke.lib \
  141. $(PROJECT_ROOT)\ntos\rtl\boot$(DBG_LDR)\$(O)\bldrrtl$(DBG_LDR).lib \
  142. $(PROJECT_ROOT)\ntos\config\boot\$(O)\bconfig.lib \
  143. $(SDK_LIB_PATH)\libcntpr.lib \
  144. $(DS_LIB_PATH)\rsa32.lib
  145. $(O)\link.rsp : ..\makefile.inc
  146. type << > $@
  147. -rom
  148. -debug:full
  149. -fixed
  150. -map
  151. -align:0x200
  152. !if $(AXP64)
  153. -base:0xFFFFFFFF80600000
  154. !else
  155. -base:0x80600000
  156. !endif
  157. -entry:BlOsLoader
  158. -ignore:4049,4001
  159. -nodefaultlib
  160. -opt:noicf
  161. $(LINK_TIME_CODE_GENERATION_LINKER_FLAGS)
  162. $(LINK_LIB_IGNORE_FLAG)
  163. $(OSLOADER_LIBS)
  164. <<NOKEEP
  165. $(O)\osloader.res: $(O)\msg.mc
  166. $(O)\osloader$(DBG_LDR).exe: $(OSLOADER_LIBS) makefile.inc $(O)\link.rsp
  167. -$(LINK_NAME) -out:$@ @$(O)\link.rsp
  168. !ENDIF