# *****************************************************************************
#     MOD_RULES2.msvc      (!INCLUDE ed by "makefile-dllmod.msvc")
#     (C) Copyright Roger Bowler, 2005-2015
#
#     Individual hercules modules build rules...
#
# *****************************************************************************

# ---------------------------------------------------------------------
# DLL export libraries are dependent on themselves existing

$(O)hdt3420.lib:    $(X)hdt3420.dll

$(O)hdasd.lib:      $(X)hdasd.dll

$(O)htape.lib:      $(X)htape.dll

$(O)hutil.lib:      $(X)hutil.dll

$(O)hengine.lib:    $(X)hengine.dll

$(O)hsys.lib:       $(X)hsys.dll

# ---------------------------------------------------------------------
# Individual DLLs are dependent their own code as well as the
# export libraries from other DLLs that they're dependent on..

$(X)hsys.dll:     $(hsys_OBJ) \
                                               $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hutil.dll:    $(hutil_OBJ) \
                                 $(O)hsys.lib  $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdasd.dll:    $(hdasd_OBJ) \
                  $(O)hutil.lib  $(O)hsys.lib  $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)htape.dll:    $(htape_OBJ) \
                  $(O)hutil.lib  $(O)hsys.lib  $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hengine.dll:  $(hengine_OBJ) $(O)hdasd.lib $(O)htape.lib $(O)w32ctca.obj \
                  $(O)hutil.lib  $(O)hsys.lib  $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

# ---------------------------------------------------------------------
# Device modules

$(X)dyngui.dll:   $(O)dyngui.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt1052c.dll: $(O)con1052c.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt1403.dll:  $(O)printer.obj $(O)sockdev.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt2703.dll:  $(O)commadpt.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt2880.dll:  $(O)hchan.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt3088.dll:  $(ctc_OBJ) $(tuntap_OBJ) \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt3270.dll:  $(O)console.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt3420.dll:  $(hdt3420_OBJ) $(O)htape.lib \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt3505.dll:  $(O)cardrdr.obj $(O)sockdev.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt3525.dll:  $(O)cardpch.obj $(O)sockdev.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdt3705.dll:  $(O)comm3705.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdtdummy.dll: $(O)dummydev.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdteq.dll:    $(O)hdteq.obj \
                  $(O)hengine.lib $(O)hutil.lib              $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdtptp.dll:   $(O)ctc_ptp.obj $(tuntap_OBJ) \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdtqeth.dll:  $(O)qeth.obj $(tuntap_OBJ) \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdttcpnje.dll:  $(O)tcpnje.obj $(tuntap_OBJ) \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

$(X)hdtzfcp.dll:  $(O)zfcp.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

# ---------------------------------------------------------------------
# Additional loadable modules

$(X)dyncrypt.dll: $(O)dyncrypt.obj \
                  $(O)hengine.lib $(O)hutil.lib $(O)hsys.lib $(O)hercprod.res
    $(linkdll)
    $(MT_DLL_CMD)

# ---------------------------------------------------------------------
# Main product executables

$(X)hercules.exe: $(O)bootstrap.obj $(O)hengine.lib $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercprod.res
    $(linkexe)
    $(MT_EXE_CMD)


$(X)herclin.exe:  $(O)herclin.obj   $(O)hengine.lib $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercprod.res
    $(linkexe)
    $(MT_EXE_CMD)

# ---------------------------------------------------------------------
# System utilities

$(X)dmap2hrc.exe: $(O)$(@B).obj                 $(O)hsys.lib $(O)hutil.lib $(O)hercmisc.res

$(X)tfprint.exe:  $(O)$(@B).obj $(O)hengine.lib $(O)hsys.lib $(O)hutil.lib $(O)hercmisc.res

$(X)tfswap.exe:   $(O)$(@B).obj                 $(O)hsys.lib $(O)hutil.lib $(O)hercmisc.res

$(X)txt2card.exe: $(O)$(@B).obj                 $(O)hsys.lib $(O)hutil.lib $(O)hercmisc.res

$(X)conspawn.exe: $(O)$(@B).obj                                            $(O)hercmisc.res

# ---------------------------------------------------------------------
# Dasd utilities

$(X)cckdcdsk.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckdcomp.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckddiag.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckdswap.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckdcdsk64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckdcomp64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckddiag64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckdswap64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdcat.exe:  $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdconv.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdcopy.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdconv64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdcopy64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)convto64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)cckdmap.exe:   $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)ckd2cckd.exe: $(X)dasdcopy.exe
    copy /b /v /y $(X)dasdcopy.exe $(X)ckd2cckd.exe > NUL

$(X)cckd2ckd.exe: $(X)dasdcopy.exe
    copy /b /v /y $(X)dasdcopy.exe $(X)cckd2ckd.exe > NUL

$(X)fba2cfba.exe: $(X)dasdcopy.exe
    copy /b /v /y $(X)dasdcopy.exe $(X)fba2cfba.exe > NUL

$(X)cfba2fba.exe: $(X)dasdcopy.exe
    copy /b /v /y $(X)dasdcopy.exe $(X)cfba2fba.exe > NUL

$(X)ckd2cckd64.exe: $(X)dasdcopy64.exe
    copy /b /v /y $(X)dasdcopy64.exe $(X)ckd2cckd64.exe > NUL

$(X)cckd642ckd.exe: $(X)dasdcopy64.exe
    copy /b /v /y $(X)dasdcopy64.exe $(X)cckd642ckd.exe > NUL

$(X)fba2cfba64.exe: $(X)dasdcopy64.exe
    copy /b /v /y $(X)dasdcopy64.exe $(X)fba2cfba64.exe > NUL

$(X)cfba642fba.exe: $(X)dasdcopy64.exe
    copy /b /v /y $(X)dasdcopy64.exe $(X)cfba642fba.exe > NUL

$(X)dasdinit.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdinit64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdisup.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdload.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdload64.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdls.exe:   $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdpdsu.exe: $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdseq.exe:  $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

$(X)dasdser.exe:  $(O)$(@B).obj $(O)hdasd.lib $(O)hsys.lib $(O)hutil.lib $(O)hercdasd.res

# ---------------------------------------------------------------------
# Tape utilities

$(X)hetget.exe:   $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)hetinit.exe:  $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)hetmap.exe:   $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)hetupd.exe:   $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)maketape.exe: $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)tapecopy.exe: $(O)$(@B).obj $(O)scsiutil.obj \
                                $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)tapemap.exe:  $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)tapesplt.exe: $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)herctape.res

$(X)vmfplc2.exe:  $(O)$(@B).obj $(O)htape.lib $(O)hsys.lib $(O)hutil.lib $(O)hdt3420.lib $(O)herctape.res

# NOTE: to be safe, since this member contains build rules, we need to
# make sure there's always a blank line following the last build rule
# in the member so that nmake doesn't complain or otherwise treat the
# statements immediately following the original !INCLUDE statement as
# part of the build rule actions. Thus the purpose of the comments you
# are now reading as the very last few lines in every build rule member.
