#************************** makefile for bios ***************************

dest	=msbio
msg	=..\messages
dos	=..\dos
inc	=..\inc
hinc	=..\h
make	=nmake -i

#
#######################	dependencies begin here. #########################
#

all: $(dest).bin

# msbio.cl1: msbio.skl \
#	$(msg)\$(COUNTRY).msg

msbio1.obj: msbio1.nas \
	makefile \
	msbdata.nas \
	entry.asm \
	code.asm \
	msbio.cl2 \
	msgroup.mac \
	jumpmac.mac \
	pushpop.mac \
	$(inc)\devsym.mac \
	msdskpr.mac \
	msmacro.mac \
	$(inc)\dosseg.nas \
	$(inc)\codesw.mac \
	$(inc)\entrysw.mac \
	$(inc)\msbds.mac \
	$(inc)\dcodeseg.nas \
	$(inc)\ddataseg.nas \
	$(inc)\entryseg.nas \
	$(inc)\lstruct.mac \
	$(inc)\amis.mac \
	$(inc)\sysinisw.mac

mscon.obj: mscon.nas \
	makefile \
	msgroup.mac \
	jumpmac.mac \
	msmacro.mac \
	$(inc)\entrysw.mac

msaux.obj: msaux.nas \
	makefile \
	msgroup.mac \
	jumpmac.mac \
	msmacro.mac

mslpt.obj: mslpt.nas \
	makefile \
	msgroup.mac \
	msequ.mac \
	$(inc)\msbds.mac \
	msmacro.mac \
	$(inc)\devsym.mac \
	$(inc)\ioctl.mac $(inc)\bpb.mac

msclock.obj: msclock.nas \
	makefile \
	msgroup.mac \
	msmacro.mac \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas \
	$(inc)\ddataseg.nas

msdisk.obj: msdisk.nas \
	makefile \
	msgroup.mac \
	msequ.mac \
	$(inc)\msbds.mac \
	pushpop.mac \
	msmacro.mac \
	$(inc)\devsym.mac \
	msdskpr.mac \
	msioctl.nas $(inc)\ioctl.mac $(inc)\bpb.mac \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas

msinit.obj: msinit.nas \
	makefile \
	msgroup.mac \
	msdskpr.mac  \
	msequ.mac $(inc)\msbds.mac \
	$(inc)\cputype.mac \
	msmacro.mac   \
	readcloc.nas  \
	clocksub.nas   \
	msextrn.mac \
	$(inc)\codesw.mac \
	scanptab.asm \
	$(inc)\scanptab.mac \
	$(inc)\lstruct.mac \
	$(inc)\lmacros3.mac \
	$(inc)\lmacros2.mac \
	$(inc)\lmacros1.mac \
	$(inc)\sysinisw.mac \
	$(inc)\haltflag.mac \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas


sysinit1.obj: sysinit1.nas \
	makefile \
	msstack.nas \
	msbio.cl4 \
	msbio.cl5 \
	stkinit.nas \
	devmark.mac \
	$(inc)\smifssym.mac \
	$(inc)\devsym.mac \
	$(inc)\ioctl.mac \
	$(inc)\cputype.mac \
	$(inc)\smdossym.mac $(inc)\dosmac.mac $(inc)\bpb.mac $(inc)\buffer.mac \
	$(inc)\sysvar.mac $(inc)\vector.mac $(inc)\dirent.mac \
	$(inc)\dpb.mac $(inc)\curdir.mac \
	$(inc)\pdb.mac $(inc)\exe.mac $(inc)\sf.mac $(inc)\arena.mac \
	$(inc)\intnat.mac $(inc)\mi.mac \
	$(inc)\syscall.mac $(inc)\buf2sw.mac \
	init.asm $(inc)\codesw.mac $(inc)\entrysw.mac \
	$(inc)\msbds.mac $(inc)\dpb.mac \
	$(inc)\scanptab.mac \
	$(inc)\sysinisw.mac \
	$(inc)\verbose.mac \
	$(inc)\entryseg.nas


sysconf.obj: sysconf.nas \
	makefile \
	psoption.mac \
	devmark.mac \
	$(inc)\psdata.mac \
	$(inc)\parse.nas \
	$(inc)\smifssym.mac \
	$(inc)\devsym.mac \
	$(inc)\ioctl.mac \
	$(inc)\smdossym.mac $(inc)\dosmac.mac $(inc)\bpb.mac $(inc)\buffer.mac \
	$(inc)\sysvar.mac $(inc)\vector.mac $(inc)\dirent.mac \
	$(inc)\dpb.mac $(inc)\curdir.mac \
	$(inc)\pdb.mac $(inc)\exe.mac $(inc)\sf.mac $(inc)\arena.mac \
	$(inc)\intnat.mac $(inc)\mi.mac \
	$(inc)\syscall.mac $(inc)\buf2sw.mac \
	$(inc)\lstruct.mac $(inc)\lmacros2.mac $(inc)\lmacros1.mac \
	$(inc)\mzheader.mac \
	$(inc)\memsw.mac \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas

sysinit2.obj: sysinit2.nas \
	makefile \
	devmark.mac \
	$(inc)\copyrigh.mac \
	$(inc)\smifssym.mac \
	$(inc)\devsym.mac \
	$(inc)\ioctl.mac \
	$(inc)\smdossym.mac $(inc)\dosmac.mac $(inc)\bpb.mac $(inc)\buffer.mac \
	$(inc)\sysvar.mac $(inc)\vector.mac $(inc)\dirent.mac \
	$(inc)\dpb.mac $(inc)\curdir.mac \
	$(inc)\pdb.mac $(inc)\exe.mac $(inc)\sf.mac $(inc)\arena.mac \
	$(inc)\intnat.mac $(inc)\mi.mac \
	$(inc)\syscall.mac $(inc)\buf2sw.mac \
	$(inc)\lstruct.mac $(inc)\lmacros2.mac $(inc)\lmacros1.mac \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas

sysimes.obj: sysimes.nas \
	makefile \
	msmacro.mac \
	msbio.cl3 \
	msequ.mac $(inc)\msbds.mac

msbio2.obj: msbio2.nas \
	makefile \
	msgroup.mac \
	msequ.mac \
	$(inc)\msbds.mac \
	$(inc)\devsym.mac \
	pushpop.mac \
	msmacro.mac \
	ms96tpi.nas msvolid.nas \
	$(inc)\codesw.mac \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas

mshard.obj:  mshard.nas \
	$(inc)\entrysw.mac \
	$(inc)\entryseg.nas

$(inc)\nibdos.obj:
	cd ..\inc
	$(make)
	cd ..\bios

$(inc)\const2.obj:
	cd ..\inc
	$(make)
	cd ..\bios

$(inc)\msdata.obj:
	cd ..\inc
	$(make)
	cd ..\bios

$(inc)\mstable.obj:
	cd ..\inc
	$(make)
	cd ..\bios

$(inc)\msdosme.obj:
	cd ..\inc
	$(make)
	cd ..\bios

#..\dos\msdos.cl1:
#	cd ..\dos
#	$(make)
#	cd ..\bios

..\dos\msdisp.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\mscode.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\time.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\getset.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dosparse.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\misc.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\misc2.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\crit.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\cpmio.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\cpmio2.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\fcbio.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\fcbio2.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\search.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\path.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\ioctl.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\delete.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\rename.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\finfo.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dup.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\create.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\open.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dinfo.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\isearch.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\abort.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\close.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dircall.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\disk.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\disk2.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\disk3.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dir.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dir2.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\dev.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\mknode.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\rom.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\fcb.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\msctrlc.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\fat.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\buf.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\proc.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\alloc.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\srvcall.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\util.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\macro.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\macro2.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\handle.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\file.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\lock.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\share.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\extattr.obj:
	cd ..\dos
	$(make)
	cd ..\bios

..\dos\ifs.obj:
	cd ..\dos
	$(make)
	cd ..\bios

mzstack.obj: mzstack.nas

$(dest).bin: msbio.cl1 msbio1.obj mscon.obj  msaux.obj \
	mslpt.obj msclock.obj msdisk.obj msbio2.obj \
	msinit.obj mshard.obj sysinit1.obj sysconf.obj \
	sysinit2.obj sysimes.obj \
    ..\dos\msdos.cl1 $(inc)\nibdos.obj $(inc)\const2.obj  \
    $(inc)\msdata.obj ..\dos\mscode.obj $(inc)\msdosme.obj \
    ..\dos\time.obj ..\dos\getset.obj \
    ..\dos\dosparse.obj ..\dos\misc.obj ..\dos\misc2.obj \
    ..\dos\crit.obj ..\dos\cpmio.obj ..\dos\cpmio2.obj \
    $(inc)\mstable.obj ..\dos\msdisp.obj ..\dos\fcbio.obj \
    ..\dos\fcbio2.obj \
    ..\dos\search.obj ..\dos\path.obj ..\dos\ioctl.obj \
    ..\dos\delete.obj ..\dos\rename.obj ..\dos\finfo.obj \
    ..\dos\dup.obj ..\dos\create.obj ..\dos\open.obj \
    ..\dos\dinfo.obj ..\dos\isearch.obj ..\dos\buf.obj \
    ..\dos\abort.obj ..\dos\close.obj ..\dos\dircall.obj \
    ..\dos\disk.obj ..\dos\disk2.obj ..\dos\disk3.obj ..\dos\dir.obj \
    ..\dos\dir2.obj ..\dos\dev.obj ..\dos\mknode.obj \
    ..\dos\rom.obj ..\dos\fcb.obj ..\dos\msctrlc.obj ..\dos\fat.obj \
    ..\dos\proc.obj ..\dos\alloc.obj ..\dos\srvcall.obj \
    ..\dos\util.obj ..\dos\macro.obj ..\dos\macro2.obj ..\dos\ifs.obj \
    ..\dos\handle.obj ..\dos\file.obj ..\dos\lock.obj \
    ..\dos\share.obj ..\dos\extattr.obj \
	mzstack.obj makefile msbiow.lnk
	warplink @msbiow.lnk
	x2b2 /b /s /l=60h msbiow.exe $(dest).bin
