MEM = /AL
COMPSW = /Od
WARN=beep \beep.wrn
BAD=beep \beep.bad
OK=beep \beep.ok
#*****************************************************************************
#	makefile for 1401
#*****************************************************************************
#	Change Log
#   Date    | Change
#-----------+-----------------------------------------------------------------
# 15-Nov-85 | Created
# 24-Nov-85 | [1.98] Added CW
#  7-Dec-85 | [1.151] Now called '1401.c', not 'track.c'
# 11-Dec-85 | [1.164] Added MLC, MLZS
# 12-Dec-85 | [1.172] Added MLNS
# 12-Dec-85 | [1.174] Added SRF, SPF
# 12-Dec-85 | [1.175] Added length module
# 12-Dec-85 | [1.175] SS -> SWITCHES (preparing for SS module)
# 13-Dec-85 | [1.181] Added MRCM
# 13-Dec-85 | [1.183] Added SAR, cvbytes
# 14-Dec-85 | [1.188] Added SBR
# 15-Dec-85 | [1.199] Added BWZ
# 15-Dec-85 | [1.201] Added C
# 15-Dec-85 | [1.206] Added P
# 15-Dec-85 | [1.209] Added WP, WRP, RP
# 16-Dec-85 | [1.212] Added A, arith
# 16-Dec-85 | [1.212] Now up to M6, I4
# 20-Dec-85 | [1.226] Added S, also up to I5
# 24-Dec-85 | [1.231] Added SELECT
# 26-Dec-85 | [1.237] Arith depends on logic.h
# 26-Dec-85 | [1.238] Added CU
# 27-Dec-85 | [1.241] Added MCS
# 27-Dec-85 | [1.242] Added ZA
# 27-Dec-85 | [1.244] Added ZS
# 27-Dec-85 | [1.247] Added MCE
# 27-Dec-85 | [1.252] Added CC
# 29-Dec-85 | [1.270] Added MA, now up to I6
# 29-Dec-85 | [1.270] Enter now depends on modes.h
# 31-Dec-85 | [1.283] Added iocheck, now up to M7
# 11-Jan-86 | [1.293] Added keys.h file
# 24-Jan-86 | [1.312] Added scan.obj
# 24-Jan-86 | [1.314] 1401.obj no longer depends on keys.h
# 24-Jan-86 | [1.314] Added dead.obj
#  8-Feb-86 | [1.357] Added screen.h dependencies where required
# 23-Feb-86 | [1.365] Numerous dependencies for color added as required
# 25-Feb-86 | [1.374] added color.h
# 25-Feb-86 | [1.379] Changed to p (large program) model
# 25-Feb-86 | [1.380] Added /seg:256 to link command
# 25-Feb-86 | [1.382] mach.obj depends on logic.h
# 29-Jul-86 | [1.385] Added cdump module
# 29-Jul-86 | [1.385] Fixed order of switches in LC1, LC2 commands so file
#           | is at end
# 30-Jul-86 | [1.398] Added 'lamp' module
# 31-Jul-86 | [1.405] Added kbd.obj
#  6-Aug-86 | [1.410] Added bcd.h dependencies
# 18-Aug-86 | [1.414] screen.h -> bscreen.h (ctools plus update)
# 18-Aug-86 | [1.414] Removed ctools2 from linker command file
# 19-Aug-86 | [1.422] Updated logic.obj dependencies
# 19-Aug-86 | [1.423] display now depends upon debugcolor
# 17-Nov-91 | [1.428] <jmn> converted to C6.0/SageMake
# 19-Nov-91 | [1.428] <jmn> added printers.c
# 23-Nov-91 | [1.468] <jmn> added font.c
#  7-Dec-91 | [1.479] <jmn> added WARN, BAD, OK
# 22-Dec-91 | [1.514] <jmn> added form
#*****************************************************************************

# Standard prolog

COMPILER = d:\c600\bin\cl
LINK = d:\c600\binb\link
VDISK=e:
LDISK=c:
# no ASM for now
ASM =
.SUFFIXES

INCLUDES = -I. -Id:\c600\include -Id:\c600\include\sys

SRCEXT = .c .asm
.c.obj :
    del $*.obj
    set gc0=
    set gc1=
    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
    $(COMPILER) /Fo$*.obj $<
    if exist $*.obj goto $[r,$*]
    echo * * *    Compilation of '$*' failed >> nolink
    $(WARN)
    :$[r,$*]

.asm.obj :
	del $*.obj
	$(ASM) $*,$*,$*;
	if exist $*.obj goto $*
	echo * * *    Assembly of $* failed >> nolink
	:$*

include makefile.fil

1401.exe: \
	1401.lnk \
	1401.obj \
	a.obj \
	addr.obj \
	alert.obj \
	arith.obj \
	b.obj \
	bbe.obj \
	bcd.obj \
	beep.obj \
	button.obj \
	bwz.obj \
	c.obj \
	card.obj \
	cc.obj \
	cdp.obj \
	cdr.obj \
	cdump.obj \
	chars.obj \
	cs.obj \
	cu.obj \
	cvbytes.obj \
	cw.obj \
	data.obj \
	dead.obj \
	ddiag.obj \
	diag.obj \
	dispatch.obj \
	display.obj \
	enter.obj \
	error.obj \
	font.obj \
	form.obj \
	h.obj \
	ifetch.obj \
	iocheck.obj \
	kbd.obj \
	lamp.obj \
	length.obj \
	logic.obj \
	ma.obj \
	mach.obj \
	mce.obj \
	mcs.obj \
	memory.obj \
	mlc.obj \
	mlcwa.obj \
	mlns.obj \
	mlzs.obj \
	mode.obj \
	mrcm.obj \
	nop.obj \
	p.obj \
	pause.obj \
	peek.obj \
	periph.obj \
	periph2.obj \
	poll.obj \
	prdev.obj \
	print.obj \
	printers.obj \
	r.obj \
	rp.obj \
	rdy.obj \
	s.obj \
	sar.obj \
	sbr.obj \
	scan.obj \
	scdspmsg.obj \
	select.obj \
	spf.obj \
	srf.obj \
	ss.obj \
	sw.obj \
	switches.obj \
	version.obj \
	vprinter.obj \
	w.obj \
	wp.obj \
	wr.obj \
	wrp.obj \
	za.obj \
	zs.obj
	if exist nolink goto nolink
	$(LINK) @1401.lnk
	if errorlevel 1 goto nolink
	version version.c version.ver
	goto end
	:nolink
	$(BAD)
	type nolink
	:end

##############################################################################
#	Object file specifications
##############################################################################


1401.obj :  btypes.h scdspmsg.h mouse.h hercules.h logic.h display.h diag.h \
           disp.h 1401.h lamp.h addr.h data.h length.h periph.h iocheck.h \
           mode.h modes.h enter.h button.h switches.h iocheck.h kb.h kbd.h \
           scan.h dead.h cdr.h alert.h select.h card.h pause.h pr.h \
           printers.h print.h vprinter.h color.h chars.h form.h 1401.c

addr.obj :  btypes.h scdspmsg.h panel.h hercules.h disp.h color.h mach.h \
           machmem.h diag.h addr.h display.h 1401.h kb.h scan.h addr.c

alert.obj :  btypes.h scdspmsg.h alert.h alerts.h diag.h panel.h hercules.h \
            disp.h button.h color.h display.h mach.h machmem.h alert.c

arith.obj :  btypes.h diag.h instr.h mach.h machmem.h mem1401.h logic.h \
            bcd.h arith.h kb.h scan.h arith.c

b.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h alerts.h alert.h \
        logic.h switches.h poll.h ifetch.h b.c

bbe.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h alerts.h \
          ifetch.h poll.h bbe.c

bcd.obj :  mach.h machmem.h bcd.c

beep.obj :  beep.c

button.obj :  btypes.h scdspmsg.h panel.h button.h display.h disp.h mach.h \
             machmem.h diag.h color.h 1401.h addr.h hercules.h kb.h scan.h \
             button.c

bwz.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h alerts.h \
          poll.h ifetch.h alert.h bwz.c

c.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h alerts.h logic.h \
        ifetch.h c.c

card.obj :  bcd.h disp.h btypes.h scdspmsg.h color.h hercules.h pause.h \
           display.h beep.h card.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

cc.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h poll.h \
         pr.h print.h printers.h cc.c

cdp.obj :  btypes.h scdspmsg.h mach.h machmem.h mem1401.h periph.h button.h \
          hercules.h disp.h bcd.h color.h display.h kb.h scan.h diag.h \
          cdr.h cdp.c

cdr.obj :  btypes.h scdspmsg.h mach.h machmem.h mem1401.h periph.h button.h \
          hercules.h diag.h disp.h color.h display.h kb.h scan.h switches.h \
          bcd.h cdr.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

cdump.obj :  peek.h cdump.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

chars.obj :  chars.h chars.c

cs.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h poll.h \
         cs.c

cu.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h cu.c

cvbytes.obj :  mach.h machmem.h cvbytes.h cvbytes.c

cw.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h alerts.h \
         ifetch.h alert.h cw.c

data.obj :  btypes.h scdspmsg.h panel.h disp.h hercules.h display.h data.h \
           color.h data.c

dead.obj :  btypes.h scdspmsg.h disp.h hercules.h color.h pause.h display.h \
           dead.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

diag.obj :  btypes.h scdspmsg.h hercules.h disp.h color.h 1401.h hercules.h \
           select.h display.h panel.h diag.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

ddiag.obj :  btypes.h scdspmsg.h hercules.h disp.h color.h 1401.h hercules.h \
            select.h display.h panel.h ddiag.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

dispatch.obj :  dispatch.c

display.obj :  btypes.h scdspmsg.h display.h hercules.h disp.h kb.h scan.h \
              debugcolor.h periph.h color.h data.h 1401.h select.h \
              vprinter.h diag.h display.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

enter.obj :  btypes.h scdspmsg.h panel.h mem1401.h mach.h machmem.h modes.h \
            mouse.h keys.h hercules.h disp.h diag.h enter.h addr.h \
            display.h kb.h scan.h color.h bcd.h kbd.h 1401.h button.h \
            enter.h pause.h chars.h enter.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

error.obj :  error.c

font.obj :  font.h font.c

form.obj :  pr.h form.h form.c

h.obj :  btypes.h mem1401.h mach.h machmem.h diag.h ifetch.h poll.h h.c

ifetch.obj :  mem1401.h btypes.h instr.h state.h mach.h machmem.h alerts.h \
             modes.h dispatch.h diag.h icycle.h bcd.h kb.h scan.h alert.h \
             mach.h machmem.h length.h data.h ifetch.c

iocheck.obj :  btypes.h scdspmsg.h panel.h hercules.h disp.h color.h diag.h \
              kb.h scan.h display.h 1401.h iocheck.c

kbd.obj :  mouse.h btypes.h keys.h diag.h kb.h scan.h display.h pr.h print.h \
          button.h printers.h kbd.c

lamp.obj :  btypes.h scdspmsg.h panel.h hercules.h disp.h color.h diag.h \
           kb.h scan.h display.h button.h 1401.h length.h lamp.c

length.obj :  btypes.h scdspmsg.h panel.h icycle.h hercules.h disp.h color.h \
             display.h length.h length.c

logic.obj :  btypes.h scdspmsg.h panel.h mach.h machmem.h hercules.h disp.h \
            display.h logic.h color.h kb.h scan.h chars.h logic.c

ma.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h ifetch.h ma.c

mach.obj :  btypes.h scdspmsg.h modes.h alerts.h button.h mem1401.h mach.h \
           machmem.h panel.h dispatch.h length.h enter.h ifetch.h alert.h \
           diag.h select.h logic.h bcd.h ifetch.h data.h kb.h scan.h addr.h \
           poll.h cdr.h pr.h print.h printers.h mach.c

mce.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h bcd.h ifetch.h \
          kb.h scan.h mce.c

mcs.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h mcs.c

memory.obj :  memory.c

mlc.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h mlc.c

mlcwa.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h \
            mlcwa.c

mlns.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h alerts.h \
           ifetch.h alert.h mlns.c

mlzs.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h alerts.h \
           ifetch.h alert.h mlzs.c

mode.obj :  btypes.h scdspmsg.h panel.h hercules.h disp.h diag.h display.h \
           color.h 1401.h button.h mode.h modes.h mode.c

mrcm.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h mrcm.c

nop.obj :  btypes.h mem1401.h mach.h machmem.h diag.h nop.c

p.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h cdp.h alert.h \
        poll.h ifetch.h p.c

pause.obj :  pause.c

peek.obj :  mem1401.h peek.c

periph.obj :  btypes.h scdspmsg.h mouse.h hercules.h display.h disp.h diag.h \
             periph.h panel.h keys.h pr.h print.h cdr.h cdp.h button.h kb.h \
             kbd.h scan.h alert.h color.h 1401.h periph.c

periph2.obj :  btypes.h scdspmsg.h mouse.h hercules.h display.h disp.h \
              diag.h periph.h panel.h keys.h pr.h print.h cdr.h cdp.h \
              button.h kb.h scan.h alert.h color.h 1401.h periph2.c

poll.obj :  btypes.h scdspmsg.h mouse.h keys.h addr.h periph.h diag.h \
           iocheck.h kb.h kbd.h scan.h button.h switches.h enter.h \
           display.h 1401.h poll.c

prdev.obj :  font.h pr.h prdev.h chars.h prdev.c

print.obj :  btypes.h scdspmsg.h mem1401.h mach.h machmem.h diag.h button.h \
            periph.h alerts.h disp.h hercules.h bcd.h color.h addr.h \
            alert.h pr.h printers.h print.h cdump.h prdev.h display.h rdy.h \
            print.c

printers.obj :  pr.h prdev.h vprdev.h printers.c

r.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h cdr.h alert.h \
        poll.h ifetch.h r.c

rp.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h p.h r.h rp.c

rdy.obj :  rdy.c

s.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h arith.h \
        s.c

sar.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h \
          cvbytes.h sar.c

sbr.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h ifetch.h \
          cvbytes.h sbr.c

scan.obj :  btypes.h scdspmsg.h mouse.h keys.h kb.h kbd.h scan.h kbd.h \
           scan.c

scdspmsg.obj :  scdspmsg.c

select.obj :  btypes.h scdspmsg.h mouse.h diag.h button.h ce.h dispatch.h \
             display.h panel.h disp.h hercules.h color.h kb.h kbd.h scan.h \
             select.h arith.h 1401.h select.c

spf.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h poll.h \
          ifetch.h spf.c

srf.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h poll.h \
          ifetch.h srf.c

ss.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h poll.h ifetch.h \
         ss.c

sw.obj :  btypes.h mem1401.h mach.h machmem.h diag.h instr.h alerts.h \
         ifetch.h poll.h alert.h sw.c

switches.obj :  btypes.h scdspmsg.h panel.h diag.h hercules.h disp.h kb.h \
               scan.h display.h 1401.h button.h switches.h color.h \
               switches.c
	    del $*.obj
	    set gc0=
	    set gc1=
	    set CL= /W2 /X $(INCLUDES) $(MEM) $(COMPSW) /Zi /c
	    $(COMPILER) /Fo$*.obj $<
	    if exist $*.obj goto $[r,$*]
	    echo * * *    Compilation of '$*' failed >> nolink
	    $(WARN)
	    :$[r,$*]

version.obj :  version.c

vprinter.obj :  btypes.h pr.h printers.h scdspmsg.h mouse.h color.h kb.h \
               kbd.h scan.h button.h display.h hercules.h bcd.h diag.h \
               chars.h prdev.h vprinter.h vprinter.c

w.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h pr.h print.h \
        alert.h poll.h ifetch.h printers.h w.c

wp.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h w.h p.h wp.c

wr.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h w.h r.h wr.c

wrp.obj :  btypes.h mem1401.h mach.h machmem.h diag.h alerts.h w.h r.h p.h \
          wrp.c

za.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h ifetch.h za.c

zs.obj :  mem1401.h btypes.h mach.h machmem.h diag.h instr.h ifetch.h zs.c
