#************************** makefile for cmd\command *********************

msg	=..\..\messages
inc	=..\..\inc

sysmsg	=$(inc)\sysmsg.inc $(inc)\versiona.inc command.ctl

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

all: command.com

$(inc)\dossym.inc: $(inc)\dbcs.sw $(inc)\dosmac.inc $(inc)\versiona.inc \
    $(inc)\buffer.inc $(inc)\dirent.inc $(inc)\error.inc
	echo "touch $(inc)\dossym.inc"

comequ.asm: $(inc)\curdir.inc
	echo "touch comequ.asm"

command.ctl: command.skl $(msg)\$(COUNTRY).msg makefile

command1.obj:  command1.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    comsw.asm comequ.asm resmsg.equ envdata.asm    

command2.obj:  command2.asm $(inc)\dossym.inc $(inc)\pdb.inc \
    $(inc)\syscall.inc comsw.asm comequ.asm resmsg.equ

copy.obj:  copy.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\sf.inc comseg.asm comequ.asm

copypr1.obj:  copypr1.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\sf.inc comseg.asm comequ.asm

copypr2.obj:  copypr2.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\sf.inc comseg.asm comequ.asm

cparse.obj:  cparse.asm comsw.asm $(inc)\dossym.inc \
    $(inc)\devsym.inc comseg.asm comequ.asm

init.obj:  init.asm $(inc)\dossym.inc $(inc)\pdb.inc $(inc)\mult.inc \
    $(inc)\syscall.inc $(inc)\doscntry.inc \
    comsw.asm comseg.asm comequ.asm resmsg.equ \
    $(sysmsg) $(inc)\msgdcl.inc $(inc)\msgserv.asm

iparse.obj:  iparse.asm comseg.asm $(inc)\parse.asm $(inc)\psdata.inc

parse2.obj:  parse2.asm $(inc)\dossym.inc $(inc)\devsym.inc comsw.asm \
    comseg.asm comequ.asm

path1.obj:  path1.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    comsw.asm comseg.asm comequ.asm

path2.obj:  path2.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\find.inc comsw.asm comseg.asm comequ.asm

rdata.obj:  rdata.asm comsw.asm comseg.asm \
    $(sysmsg) $(inc)\msgdcl.inc $(inc)\msgserv.asm 

rucode.obj:  rucode.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\pdb.inc $(inc)\mult.inc $(inc)\doscntry.inc $(inc)\devsym.inc \
    $(sysmsg) $(inc)\msgdcl.inc $(inc)\msgserv.asm \
    comsw.asm comseg.asm comequ.asm resmsg.equ 

tbatch.obj:  tbatch.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\doscntry.inc comseg.asm comequ.asm

tbatch2.obj:  tbatch2.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    comseg.asm comequ.asm

dir.obj:  dir.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\bpb.inc $(inc)\filemode.inc $(inc)\find.inc $(inc)\ioctl.inc \
    $(inc)\devsym.inc comseg.asm comequ.asm ifequ.asm

tcmd1b.obj:  tcmd1b.asm comsw.asm $(inc)\dossym.inc $(inc)\bpb.inc \
    $(inc)\syscall.inc $(inc)\filemode.inc $(inc)\sf.inc $(inc)\ioctl.inc \
    comseg.asm comequ.asm $(inc)\ea.inc

tcmd2a.obj:  tcmd2a.asm comsw.asm $(inc)\dossym.inc $(inc)\bpb.inc \
    $(inc)\syscall.inc $(inc)\filemode.inc $(inc)\sf.inc $(inc)\ioctl.inc \
    comseg.asm comequ.asm

tcmd2b.obj:  tcmd2b.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\pdb.inc $(inc)\mult.inc comseg.asm comequ.asm 

tcode.obj:  tcode.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    comseg.asm comequ.asm \
    $(inc)\vector.inc $(inc)\pdb.inc $(inc)\arena.inc $(inc)\mshalo.asm

tdata.obj:  tdata.asm comsw.asm comseg.asm $(inc)\dirent.inc \
    $(inc)\error.inc ifequ.asm comequ.asm \
    $(sysmsg) $(inc)\msgdcl.inc $(inc)\msgserv.asm \
    tranmsg.asm $(inc)\ea.inc

tenv.obj:  tenv.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\arena.inc comseg.asm comequ.asm $(inc)\doscntry.inc

tenv2.obj:  tenv2.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\find.inc comseg.asm comequ.asm

tfor.obj:  tfor.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\find.inc $(inc)\devsym.inc comseg.asm comequ.asm fordata.asm

tmisc1.obj:  tmisc1.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    comseg.asm comequ.asm

tmisc2.obj:  tmisc2.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\pdb.inc $(inc)\bpb.inc $(inc)\sf.inc $(inc)\ioctl.inc \
    comseg.asm comequ.asm

tparse.obj:  tparse.asm comsw.asm comseg.asm \
    $(inc)\parse.asm $(inc)\psdata.inc

tpipe.obj:  tpipe.asm comsw.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    $(inc)\pdb.inc comseg.asm comequ.asm

tprintf.obj:  tprintf.asm comsw.asm $(inc)\dosmac.inc comseg.asm comequ.asm \
    $(sysmsg) $(inc)\msgdcl.inc $(inc)\msgserv.asm

tspc.obj:  tspc.asm comsw.asm $(inc)\dossym.inc $(inc)\find.inc \
    $(inc)\intnat.inc comequ.asm comseg.asm  $(inc)\ea.inc

tucode.obj:  tucode.asm $(inc)\dossym.inc $(inc)\syscall.inc \
    comsw.asm comseg.asm comequ.asm

uinit.obj:  uinit.asm comsw.asm comseg.asm ifequ.asm \
    $(sysmsg) $(inc)\msgdcl.inc $(inc)\msgserv.asm 

command.com:  command1.obj command2.obj rucode.obj rdata.obj init.obj iparse.obj \
    uinit.obj tcode.obj tbatch.obj tbatch2.obj tfor.obj dir.obj tcmd1b.obj \
    tcmd2a.obj tcmd2b.obj tenv.obj tenv2.obj tmisc1.obj tmisc2.obj tpipe.obj \
    parse2.obj path1.obj path2.obj tucode.obj copy.obj copypr1.obj copypr2.obj \
    cparse.obj tparse.obj tprintf.obj tdata.obj tspc.obj
	link @command.lnk
	exe2bin command.exe command.com
	del command.exe
