#$Header$
#
# Compiler level:
#	Lattice 5.04.01
#
# Compiler and linker options:
#	This Makefile is distributed with the -d3 option turned on and the optimizer
#	option turned off because it yields working executables. Other combinations
#	may also yield working executables, but removing "-d3" and turing on the
#	optimizer didn't.
#
#
.SILENT:
#
#
CC1 = LC:lc1
CC2 = LC:go
CC3 = LC:lc2
C1FLAGS	= -d3
C2FLAGS	=
C3FLAGS	=
#
ASM = LC:asm
ASMFLAGS = -iinclude:
#
#
#.c.o:
#	$(CC1) -. $(C1FLAGS) $(CFLAGS) -oQUAD: $*
#	$(CC2) -. $(C2FLAGS) QUAD:$*.q
#	$(CC3) -. $(C3FLAGS) -o$*.o QUAD:$*.q
#
.c.o:
	$(CC1) -. $(C1FLAGS) $(CFLAGS) -oQUAD: $*
	$(CC3) -. $(C3FLAGS) -o$*.o QUAD:$*.q
	rename $*.o $*.z
	-lc:blink prelink nodebug from $*.z to $*.o
	delete $*.z
#
#
.asm.o:
	$(ASM) -. $(ASMFLAGS) $*.asm
#
#

CDEFINES =
CFLAGS	 = $(CDEFINES)


TARGETS = rsbx.lib xc.o


all:	$(TARGETS)


install:
	copy rsbx.lib LIB:
	copy xc.o LIB:


clean:
	-delete \#?.o
	-delete $(TARGETS)


RSBXOBJ = childstatus.o createfamily.o emptymorgue.o escaping.o launchc.o orpha
child.o orphanchildren.o popen.o ulseg.o uxmain.o waitchild.o
rsbx.lib:	$(RSBXOBJ)
	oml $@ r $?


#SOURCE = childstatus.c createfamily.c emptymorgue.c escaping.c launchc.c orpha
child.c orphanchildren.c popen.c ulseg.asm uxmain.c waitchild.c xc.asm
#
#HFILES = INCLUDE:rsbx/childtasking.h
#
#depend:	${SOURCE} ${HFILES}
#	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
#	 cc -Em ${CFLAGS} ${SOURCE} | sed 's/\.\///; /\//d' \
#	) >Makefile.new
#	cp Makefile Makefile.bak
#	cp Makefile.new Makefile
#	rm -f Makefile.new


# DO NOT DELETE THIS LINE - 
childstatus.c: INCLUDE:rsbx/childtasking.h
childstatus.o: childstatus.c
createfamily.c: INCLUDE:rsbx/childtasking.h
createfamily.o: createfamily.c
emptymorgue.c: INCLUDE:rsbx/childtasking.h
emptymorgue.o: emptymorgue.c
escaping.o: escaping.c
launchc.c: INCLUDE:rsbx/childtasking.h
launchc.o: launchc.c
orphanchild.c: INCLUDE:rsbx/childtasking.h
orphanchild.o: orphanchild.c
orphanchildren.c: INCLUDE:rsbx/childtasking.h
orphanchildren.o: orphanchildren.c
popen.c: INCLUDE:rsbx/childtasking.h
popen.o: popen.c
ulseg.o: ulseg.asm
uxmain.o: uxmain.c
waitchild.c: INCLUDE:rsbx/childtasking.h
waitchild.o: waitchild.c
xc.o: xc.asm
