#
#
#	MAKE file for JMODEM, the 'C' version.
#	Created 01-FEB-1990		Richard B. Johnson
#                                       405 Broughton Drive
#                                       Beverly, Massachusetts 01915
#                                       BBS (508) 922-3166
#	Execute MAKE JMODEM
#
#	Revised 21-APR-1990		Richard B. Johnson
#
#	Changed this MAKE file after several "professional programmers"
#	informed me that the previous one was too amateur and simplistic.
#	In keeping with maintaining the highest degree of complexity possible
#	to appease these bombastic mutants of diddly-wop, I made this file
#	unreadable by incorporating macros for no useful purpose. The next
#	revision will remove all spaces and tabs <grin>.
#
#	Revised 02-JAN-1991		Richard B. Johnson
#
#	Changed the warning-level to /W4 in the Microsoft CL command to
#	be compatible with Microsoft's C600 highest level of error checking.
#
#	Revised 27-NOV-1991		Richard B. Johnson
#
#	Added support for the external assembly-language routines in
#	JMODEM_G.ASM.
#
#	Had to add a response file for the linker because the number of
#	parameters on the command line exceeded some arbitrary limit
#	imposed by either the linker or DOS.
#
#
	nam	= Jmodem
	headers = $(nam).h $(nam)
        csrc    = $*.c
	asrc	= $*.asm
	exe	= $(nam).exe
	cmp	= CL /AS /c /Oais /FPi /W4 /DNOENV $(csrc)
	asm	= MASM/W2 $(asrc);
	lnk	= Link @$(nam).res
        objects = $(nam)_a.obj $(nam)_b.obj $(nam)_c.obj\
                  $(nam)_d.obj $(nam)_e.obj $(nam)_f.obj $(nam)_g.obj

$(nam)_a.obj:		$(headers) $(csrc)
			$(cmp)

$(nam)_b.obj:		$(headers) $(csrc)
			$(cmp)

$(nam)_c.obj:		$(headers) $(csrc)
			$(cmp)

$(nam)_d.obj:		$(headers) $(csrc)
			$(cmp)

$(nam)_e.obj:		$(headers) $(csrc) uart.h
			$(cmp)

$(nam)_f.obj:		$(headers) $(csrc) screen.h
			$(cmp)

$(nam)_g.obj:		$(headers) $(asrc)
			$(asm)

$(nam).res:		$(headers)
			Echo $(nam)_a+>   $(nam).res
			Echo $(nam)_b+>>  $(nam).res
			Echo $(nam)_c+>>  $(nam).res
			Echo $(nam)_d+>>  $(nam).res
			Echo $(nam)_e+>>  $(nam).res
			Echo $(nam)_f+>>  $(nam).res
			Echo $(nam)_g,>>  $(nam).res
			Echo $(nam).exe /Noe/Map/Exepack;>>$(nam).res

$(exe):			$(headers) $(objects) $(nam).res
			$(lnk)
