#	name		Lattice makefile
#	author		Anthony Hay, John Linney Digital Research (UK) Ltd.
#
# 	purpose		Build the DOS Plus 3.x / Concurrent DOS 6.x utilities.
#
#	history
#	13-Jan-88 JFL	Dos 3.3 BACKUP/RESTORE utilities
#	24-MAR-87 ACH	Work started.
#

RASMFLG = $$szpznc


#INC	= $(MWCINC)
#CSLIB	= $(MWCLIB)\SMALL\HCSE.LIB
#
#.SET: IPATH=$(INC)\;$(APPS)\\

#
#	Configuration parameters for Borland Turbo C
#
INC	= $(TCCINC)
CSLIB	= $(TCCLIB)\CS.LIB
TCCSTART = $(TCCLIB)\C0S.OBJ+

.c.obj:
#       $(MSC) $(MSCFLG) $*.C,$@;
#       $(MWC) $* -obj $@ $(MWCFLG)
	$(TCC) $(TCCFLG) -I$(APPS) -o$@ $*.c 

all:		backup restore

# backup.exe 	###############################################################
backup:	$(MSG)\backup.com

$(MSG)\backup.com:	backup.obj $(MSG)\backmsg.obj msfixed.obj criter.obj $(APPS)\appslib.lib
	$(LINK) @<<(backup.inp)
$(TCCSTART)backup+msfixed+criter+$(MSG)\backmsg /EXEPACK
$@

$(APPS)\appslib+$(CSLIB)
<
	$(PIFED) $@ $(PIFLARGE)
	
backup.obj:	backup.c backup.h i:portab.h 

$(MSG)\backmsg.obj:	$(MSG)\backmsg.c

msfixed.obj:	msfixed.a86

criter.obj:	criter.asm

# restore.exe 	###############################################################
restore:	$(MSG)\restore.com

$(MSG)\restore.com:	restore.obj $(MSG)\restmsg.obj msfixed.obj criter.obj i:portab.h $(APPS)\appslib.lib
	$(LINK) @<<(restore.inp)
$(TCCSTART)restore+msfixed+criter+$(MSG)\restmsg /EXEPACK
$@

$(APPS)\appslib+$(CSLIB)
<
	$(PIFED) $@ $(PIFLARGE)

	
	
restore.obj:	restore.c i:portab.h

$(MSG)\restmsg.obj:	$(MSG)\restmsg.c


###############################################################################
#	The following targets control the archival system. Targets have
#	been declared to ARCHIVE, EXTRACT, VERSION and REPORT on the
#	COMMAND.COM product and its history.
#
THREAD =			# Thread must be defined before the
				# ASSIGN target is used.
EXTPARM = -OWLRlatest		# Extract Target Options
ASSPARM = -LXRlatest		# Assign Target Options
ARCPARM = -LCUSQ		# Archive Target Options

ARCLIST	= ..\*.*

extract:
	$(TOOLS)\dget.exe $(EXTPARM) $(ARCLIST)

assign:
	$(TOOLS)\dget.exe -A$(THREAD) $(ASSPARM) $(ARCLIST)

archive:
	$(TOOLS)\dgen.exe $(ARCPARM) -Nn7000 -nB7000 $(ARCLIST)

report:
        $(TOOLS)\dlist -PL60 -PO00 -FF $(FOOTER) -AD:01/01/86\
		$(FMT) $(ARCLIST)

######################   E N D   O F   M A K E F I L E    #####################
