#SERIAL makefile. 22, July, 1996. Will make the serial driver code.
#

!include \rtrware\include\gblmkdef

OBJS =	$(OLS)serinit.ol \
	$(OLS)sertx.ol \
	$(OLS)serrx.ol \
	$(OLS)serial.ol

LIBFILE = serial.lib


$(LIBFILE): delerr $(OBJS)

delerr :
	del err

$(OLS)serinit.ol : $(@B).c $(INC)kstart.h $(INC)v8022str.h $(INC)vethstr.h \
	$(INC)lslproto.h $(INC)visnpstr.h ..\..\socket\socklib.h \
	$(INC)rwarebuf.h $(INC)uartmode.h \
	$(INC)defs.h vserstr.h serasm.h $(INC)serial.h 
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)sertx.ol : $(@B).c $(INC)kstart.h $(INC)v8022str.h $(INC)vethstr.h \
	$(INC)lslproto.h $(INC)visnpstr.h ..\..\socket\socklib.h \
	$(INC)rwarebuf.h \
	$(INC)defs.h vserstr.h serasm.h $(INC)serial.h 
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)serrx.ol : $(@B).c $(INC)kstart.h $(INC)v8022str.h $(INC)vethstr.h \
	$(INC)lslproto.h $(INC)visnpstr.h ..\..\socket\socklib.h \
	$(INC)rwarebuf.h \
	$(INC)defs.h vserstr.h serasm.h $(INC)serial.h 
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)serial.ol : $(@B).68k ..\include\a360def.h ..\include\driver.inc
	$(ASM) $(@B).68k -o $(OLS)$(@B).ol -l $(LST)$(@B).lst $(ASMFLG)  -err+ err
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
