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.

130 lines
3.8 KiB

  1. !INCLUDE $(NTMAKEENV)\makefile.plt
  2. #
  3. # No reason to build the bootcode in the general case.
  4. # Any code that uses these files is supposed to patch
  5. # the messages in the boot code at run-time, via patchbc.lib.
  6. #
  7. !IFNDEF BUILD_BOOTCODE
  8. BUILD_BOOTCODE=0
  9. !ENDIF
  10. !IFNDEF LANGUAGE
  11. LANGUAGE=usa
  12. !ENDIF
  13. ALT_PROJECT_TARGET=$(LANGUAGE)
  14. !IF "$(LANGUAGE)" == "USA" || "$(LANGUAGE)" == "usa"
  15. ALT_PROJECT_TARGET=.
  16. !ENDIF
  17. FATCODE=bootcode\fat\i386
  18. FAT32CODE=bootcode\fat\i386
  19. NTFSCODE=bootcode\ntfs\i386
  20. ETFSCODE=bootcode\etfs\i386
  21. MBRCODE=bootcode\mbr\i386
  22. #
  23. # Boot code header file generation.
  24. # Boot code for each filesystem is placed in a header file
  25. # in sdk\inc.
  26. #
  27. FATFILE=$(SDK_INC_PATH)\bootfat.h
  28. FAT32FILE=$(SDK_INC_PATH)\bootf32.h
  29. NTFSFILE=$(SDK_INC_PATH)\bootntfs.h
  30. MBRFILE=$(SDK_INC_PATH)\bootmbr.h
  31. FATFILENEC98=$(SDK_INC_PATH)\boot98f.h
  32. FAT32FILENEC98=$(SDK_INC_PATH)\boot98f2.h
  33. NTFSFILENEC98=$(SDK_INC_PATH)\boot98n.h
  34. !if $(386)
  35. TARGETS= $(FATFILE) $(FAT32FILE) $(NTFSFILE) $(MBRFILE) \
  36. $(FATFILENEC98) $(FAT32FILENEC98) $(NTFSFILENEC98)
  37. !else
  38. TARGETS=
  39. !endif
  40. #
  41. # Targets
  42. #
  43. all: $(TARGETS)
  44. !IF "$(BUILDMSG)" != ""
  45. echo $(BUILDMSG)
  46. !ENDIF
  47. clean: all
  48. !IF $(BUILD_BOOTCODE)
  49. $(FATFILE): $(FATCODE)\fatboot.asm $(FATCODE)\msgstub.inc \
  50. $(FATCODE)\bootsec.inc $(FATCODE)\bpb.inc $(FATCODE)\dirent.inc
  51. masm386 -I$(FATCODE) $(FATCODE)\fatboot.asm;
  52. link16 fatboot.obj,fatboot.exe;
  53. bin2c fatboot.exe 32768 32256 512 $(FATFILE) FatBootCode
  54. del fatboot.obj fatboot.exe
  55. $(FAT32FILE): $(FAT32CODE)\fat32bt.asm $(FATCODE)\msgstub.inc \
  56. $(FAT32CODE)\bootsec.inc $(FAT32CODE)\bpb.inc $(FAT32CODE)\dirent.inc
  57. masm386 -I$(FAT32CODE) $(FAT32CODE)\fat32bt.asm;
  58. link16 fat32bt.obj,fat32bt.exe;
  59. bin2c fat32bt.exe 33792 32256 1536 $(FAT32FILE) Fat32BootCode
  60. del fat32bt.obj fat32bt.exe
  61. $(NTFSFILE): $(NTFSCODE)\ntfsboot.asm $(NTFSCODE)\ntfs.inc
  62. masm386 -I$(NTFSCODE) $(NTFSCODE)\ntfsboot.asm;
  63. link16 /tiny ntfsboot.obj,ntfsboot.com;
  64. bin2c ntfsboot.com 8192 0 8192 $(NTFSFILE) NtfsBootCode
  65. del ntfsboot.obj ntfsboot.com
  66. $(MBRFILE): $(MBRCODE)\x86mboot.asm
  67. masm386 $(MBRCODE)\x86mboot.asm;
  68. link16 /tiny x86mboot.obj,x86mboot.com;
  69. bin2c x86mboot.com 1792 1280 512 $(MBRFILE) x86BootCode
  70. del x86mboot.obj x86mboot.com
  71. $(FATFILENEC98): $(FATCODE)\fatnec98.asm $(FATCODE)\msgstub.inc \
  72. $(FATCODE)\bootsec.inc $(FATCODE)\bpb.inc $(FATCODE)\dirent.inc
  73. masm386 -I$(FATCODE) $(FATCODE)\fatnec98.asm;
  74. link16 /tiny fatnec98.obj,fatnec98.com;
  75. bin2c fatnec98.com 512 0 512 $(FATFILENEC98) PC98FatBootCode
  76. del fatnec98.obj fatnec98.com
  77. $(FAT32FILENEC98): $(FAT32CODE)\fat32nec.asm $(FATCODE)\msgstub.inc \
  78. $(FAT32CODE)\bootsec.inc $(FAT32CODE)\bpb.inc $(FAT32CODE)\dirent.inc
  79. masm386 -I$(FAT32CODE) $(FAT32CODE)\fat32nec.asm;
  80. link16 fat32nec.obj,fat32nec.exe;
  81. bin2c fat32nec.exe 33792 32256 1536 $(FAT32FILENEC98) PC98Fat32BootCode
  82. del fat32nec.obj fat32nec.exe
  83. $(NTFSFILENEC98): $(NTFSCODE)\ntfsn98.asm $(NTFSCODE)\ntfs.inc
  84. masm386 -I$(NTFSCODE) $(NTFSCODE)\ntfsn98.asm;
  85. link16 /tiny ntfsn98.obj,ntfsn98.com;
  86. bin2c ntfsn98.com 8192 0 8192 $(NTFSFILENEC98) PC98NtfsBootCode
  87. del ntfsn98.obj ntfsn98.com
  88. !ELSE
  89. $(FATFILE): $(FATCODE)\bootfat.h
  90. $(PUBLISH_CMD) {$?=$@}
  91. $(FAT32FILE): $(FAT32CODE)\bootf32.h
  92. $(PUBLISH_CMD) {$?=$@}
  93. $(NTFSFILE): $(NTFSCODE)\bootntfs.h
  94. $(PUBLISH_CMD) {$?=$@}
  95. $(MBRFILE): $(MBRCODE)\bootmbr.h
  96. $(PUBLISH_CMD) {$?=$@}
  97. $(FATFILENEC98): $(FATCODE)\boot98f.h
  98. $(PUBLISH_CMD) {$?=$@}
  99. $(FAT32FILENEC98): $(FAT32CODE)\boot98f2.h
  100. $(PUBLISH_CMD) {$?=$@}
  101. $(NTFSFILENEC98): $(NTFSCODE)\boot98n.h
  102. $(PUBLISH_CMD) {$?=$@}
  103. !ENDIF