131 lines
3.8 KiB
Plaintext
131 lines
3.8 KiB
Plaintext
!INCLUDE $(NTMAKEENV)\makefile.plt
|
|
|
|
#
|
|
# No reason to build the bootcode in the general case.
|
|
# Any code that uses these files is supposed to patch
|
|
# the messages in the boot code at run-time, via patchbc.lib.
|
|
#
|
|
!IFNDEF BUILD_BOOTCODE
|
|
BUILD_BOOTCODE=0
|
|
!ENDIF
|
|
|
|
!IFNDEF LANGUAGE
|
|
LANGUAGE=usa
|
|
!ENDIF
|
|
|
|
ALT_PROJECT_TARGET=$(LANGUAGE)
|
|
|
|
!IF "$(LANGUAGE)" == "USA" || "$(LANGUAGE)" == "usa"
|
|
ALT_PROJECT_TARGET=.
|
|
!ENDIF
|
|
|
|
FATCODE=bootcode\fat\i386
|
|
FAT32CODE=bootcode\fat\i386
|
|
NTFSCODE=bootcode\ntfs\i386
|
|
ETFSCODE=bootcode\etfs\i386
|
|
MBRCODE=bootcode\mbr\i386
|
|
|
|
#
|
|
# Boot code header file generation.
|
|
# Boot code for each filesystem is placed in a header file
|
|
# in sdk\inc.
|
|
#
|
|
|
|
FATFILE=$(SDK_INC_PATH)\bootfat.h
|
|
FAT32FILE=$(SDK_INC_PATH)\bootf32.h
|
|
NTFSFILE=$(SDK_INC_PATH)\bootntfs.h
|
|
MBRFILE=$(SDK_INC_PATH)\bootmbr.h
|
|
FATFILENEC98=$(SDK_INC_PATH)\boot98f.h
|
|
FAT32FILENEC98=$(SDK_INC_PATH)\boot98f2.h
|
|
NTFSFILENEC98=$(SDK_INC_PATH)\boot98n.h
|
|
|
|
!if $(386)
|
|
TARGETS= $(FATFILE) $(FAT32FILE) $(NTFSFILE) $(MBRFILE) \
|
|
$(FATFILENEC98) $(FAT32FILENEC98) $(NTFSFILENEC98)
|
|
!else
|
|
TARGETS=
|
|
!endif
|
|
|
|
#
|
|
# Targets
|
|
#
|
|
all: $(TARGETS)
|
|
!IF "$(BUILDMSG)" != ""
|
|
echo $(BUILDMSG)
|
|
!ENDIF
|
|
|
|
clean: all
|
|
|
|
!IF $(BUILD_BOOTCODE)
|
|
|
|
$(FATFILE): $(FATCODE)\fatboot.asm $(FATCODE)\msgstub.inc \
|
|
$(FATCODE)\bootsec.inc $(FATCODE)\bpb.inc $(FATCODE)\dirent.inc
|
|
masm386 -I$(FATCODE) $(FATCODE)\fatboot.asm;
|
|
link16 fatboot.obj,fatboot.exe;
|
|
bin2c fatboot.exe 32768 32256 512 $(FATFILE) FatBootCode
|
|
del fatboot.obj fatboot.exe
|
|
|
|
$(FAT32FILE): $(FAT32CODE)\fat32bt.asm $(FATCODE)\msgstub.inc \
|
|
$(FAT32CODE)\bootsec.inc $(FAT32CODE)\bpb.inc $(FAT32CODE)\dirent.inc
|
|
masm386 -I$(FAT32CODE) $(FAT32CODE)\fat32bt.asm;
|
|
link16 fat32bt.obj,fat32bt.exe;
|
|
bin2c fat32bt.exe 33792 32256 1536 $(FAT32FILE) Fat32BootCode
|
|
del fat32bt.obj fat32bt.exe
|
|
|
|
$(NTFSFILE): $(NTFSCODE)\ntfsboot.asm $(NTFSCODE)\ntfs.inc
|
|
masm386 -I$(NTFSCODE) $(NTFSCODE)\ntfsboot.asm;
|
|
link16 /tiny ntfsboot.obj,ntfsboot.com;
|
|
bin2c ntfsboot.com 8192 0 8192 $(NTFSFILE) NtfsBootCode
|
|
del ntfsboot.obj ntfsboot.com
|
|
|
|
$(MBRFILE): $(MBRCODE)\x86mboot.asm
|
|
masm386 $(MBRCODE)\x86mboot.asm;
|
|
link16 /tiny x86mboot.obj,x86mboot.com;
|
|
bin2c x86mboot.com 1792 1280 512 $(MBRFILE) x86BootCode
|
|
del x86mboot.obj x86mboot.com
|
|
|
|
$(FATFILENEC98): $(FATCODE)\fatnec98.asm $(FATCODE)\msgstub.inc \
|
|
$(FATCODE)\bootsec.inc $(FATCODE)\bpb.inc $(FATCODE)\dirent.inc
|
|
masm386 -I$(FATCODE) $(FATCODE)\fatnec98.asm;
|
|
link16 /tiny fatnec98.obj,fatnec98.com;
|
|
bin2c fatnec98.com 512 0 512 $(FATFILENEC98) PC98FatBootCode
|
|
del fatnec98.obj fatnec98.com
|
|
|
|
$(FAT32FILENEC98): $(FAT32CODE)\fat32nec.asm $(FATCODE)\msgstub.inc \
|
|
$(FAT32CODE)\bootsec.inc $(FAT32CODE)\bpb.inc $(FAT32CODE)\dirent.inc
|
|
masm386 -I$(FAT32CODE) $(FAT32CODE)\fat32nec.asm;
|
|
link16 fat32nec.obj,fat32nec.exe;
|
|
bin2c fat32nec.exe 33792 32256 1536 $(FAT32FILENEC98) PC98Fat32BootCode
|
|
del fat32nec.obj fat32nec.exe
|
|
|
|
$(NTFSFILENEC98): $(NTFSCODE)\ntfsn98.asm $(NTFSCODE)\ntfs.inc
|
|
masm386 -I$(NTFSCODE) $(NTFSCODE)\ntfsn98.asm;
|
|
link16 /tiny ntfsn98.obj,ntfsn98.com;
|
|
bin2c ntfsn98.com 8192 0 8192 $(NTFSFILENEC98) PC98NtfsBootCode
|
|
del ntfsn98.obj ntfsn98.com
|
|
|
|
!ELSE
|
|
|
|
$(FATFILE): $(FATCODE)\bootfat.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
$(FAT32FILE): $(FAT32CODE)\bootf32.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
$(NTFSFILE): $(NTFSCODE)\bootntfs.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
$(MBRFILE): $(MBRCODE)\bootmbr.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
$(FATFILENEC98): $(FATCODE)\boot98f.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
$(FAT32FILENEC98): $(FAT32CODE)\boot98f2.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
$(NTFSFILENEC98): $(NTFSCODE)\boot98n.h
|
|
$(PUBLISH_CMD) {$?=$@}
|
|
|
|
!ENDIF
|