
#TFTP makefile, 6th October 1995

!include \rtrware\include\gblmkdef

GETASM=0
DEBUG=0
RAS=0

!if $(RAS)
DEFINES = -P "RAS"
!else
DEFINES =
!endif

OBJS= $(OLS)tftpcfg.ol $(OLS)tftpinit.ol \
      $(OLS)tftpio.ol $(OLS)tftpsock.ol $(OLS)tftpstmc.ol \
      $(OLS)tftptimr.ol $(OLS)tftptrap.ol $(OLS)tftputil.ol \
      $(OLS)vtftp.ol

LIBFILE= tftp.lib


!if $(DEBUG)
DEFS = -P "DEBUG" -P "TRACE"
!else
DEFS =
!endif

DEPS = vtftpstr.h ktftp.h tftp.h tftpio.h tftplib.h vnvtftp.h vtftp.h $(INC)flashmgr.h

LIBFILE:	delerr $(OBJS)

delerr:
	del err

size:
	olsize -i ollist -o tftp.siz

$(OLS)tftpcfg.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftpcfg
	copy tftpcfg.psa psa
	del tftpcfg.psa
!endif

$(OLS)tftpinit.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftpinit
	copy tftpinit.psa psa
	del tftpinit.psa
!endif

$(OLS)tftpio.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftpio
	copy tftpio.psa psa
	del tftpio.psa
!endif

$(OLS)tftpsock.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftpsock
	copy tftpsock.psa psa
	del tftpsock.psa
!endif

$(OLS)tftpstmc.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftpstmc
	copy tftpstmc.psa psa
	del tftpstmc.psa
!endif

$(OLS)tftptimr.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftptimr
	copy tftptimr.psa psa
	del tftptimr.psa
!endif

$(OLS)tftptrap.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftptrap
	copy tftptrap.psa psa
	del tftptrap.psa
!endif

$(OLS)tftputil.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST tftputil
	copy tftputil.psa psa
	del tftputil.psa
!endif

$(OLS)vtftp.ol: $(DEPS) $(@B).c $(INC)defs.h
	-$(CC) $(@B).c $(CFLAGS) $(DEFS) $(DEFINES)
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)
!if $(GETASM)
	ASMLIST vtftp
	copy vtftp.psa psa
	del vtftp.psa
	del *.ol
!endif

