#************************ makefile for cmd\share *************************

msg	=..\..\messages
dos	=..\..\dos
inc	=..\..\inc
hinc	=..\..\h
here	=..\cmd\share	  # This is the path from INC or MAP dir's to here.
make	=nmake -i

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

all: share.exe

$(inc)\dossym.inc: $(inc)\dosmac.inc $(inc)\bpb.inc $(inc)\curdir.inc \
                   $(inc)\buffer.inc $(inc)\sysvar.inc $(inc)\vector.inc \
                   $(inc)\mult.inc $(inc)\dirent.inc $(inc)\dpb.inc \
                   $(inc)\cpmfcb.inc $(inc)\find.inc $(inc)\pdb.inc \
                   $(inc)\exe.inc $(inc)\sf.inc $(inc)\arena.inc \
                   $(inc)\intnat.inc $(inc)\mi.inc $(inc)\filemode.inc \
                   $(inc)\error.inc $(inc)\syscall.inc
	              	   echo " touch dossym.inc "

$(inc)\dossym.mac: $(inc)\dosmac.mac $(inc)\bpb.mac $(inc)\curdir.mac \
                   $(inc)\buffer.mac $(inc)\sysvar.mac $(inc)\vector.mac \
                   $(inc)\mult.mac $(inc)\dirent.mac $(inc)\dpb.mac \
                   $(inc)\cpmfcb.mac $(inc)\find.mac $(inc)\pdb.mac \
                   $(inc)\exe.mac $(inc)\sf.mac $(inc)\arena.mac \
                   $(inc)\intnat.mac $(inc)\mi.mac $(inc)\filemode.mac \
                   $(inc)\error.mac $(inc)\syscall.mac
	              	   echo " touch dossym.mac "

gshare.obj: gshare.nas $(inc)\dossym.mac $(inc)\mft.mac \
            $(inc)\bugtyp.nas

gshare2.obj: gshare2.nas $(inc)\dossym.mac $(inc)\dosseg.nas $(inc)\mft.mac \
             $(inc)\bugtyp.nas

sharesr.obj: sharesr.nas $(inc)\parse.nas $(inc)\psdata.mac msgserv.nas

sharelnk.obj: sharelnk.nas

$(inc)\nibdosn.obj:
	cd $(inc)
	$(make)
	cd $(here)

$(inc)\const2n.obj:
	cd $(inc)
	$(make)
	cd $(here)

$(inc)\msdatan.obj:
	cd $(inc)
	$(make)
	cd $(here)

$(inc)\msdosmen.obj:
	cd $(inc)
	$(make)
	cd $(here)


share.exe: share.ctl gshare.obj gshare2.obj sharesr.obj $(inc)\nibdosn.obj \
           $(inc)\const2n.obj $(inc)\msdatan.obj $(inc)\msdosmen.obj sharelnk.obj \
           sharew.lnk
           warplink @sharew.lnk
           round sharew2.exe share.exe 1
