# WebServe makefile For GenApps Directoary. 6, March, 1997. Will make the GenApps code.
#

!include \rtrware\include\gblmkdef

!if $(WEB_SERVER_INCLUDED)
CFLAGS = $(CFLAGS) -P WEB=1
!endif

OBJS =	$(OLS)apputil.ol \
	$(OLS)checksum.ol \
	$(OLS)compsum.ol \
	$(OLS)flowcont.ol \
	$(OLS)readent.ol \
	$(OLS)sockout.ol \
	$(OLS)streamw.ol \
	$(OLS)strout.ol \
	$(OLS)testret.ol \
	$(OLS)upload.ol

LIBFILE = GenApps.lib


$(LIBFILE): delerr $(OBJS)

delerr :
	del err

$(OLS)apputil.ol : $(@B).c  apputil.h \
		   $(PROCHTTP)httpd.h \
		   $(PROCHTTP)reqlist.h \
		   $(PROCHTTP)util.h \
		   $(PROCHTTP)datatran.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)checksum.ol : $(@B).c  \
		    streamw.h \
		    upload.h \
		    compsum.h \
		    $(PROCHTTP)httpd.h \
		    $(PROCHTTP)httperr.h \
		    $(PROCHTTP)util.h \
		    $(HTMLFORM)streamfl.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)compsum.ol : $(@B).c  \
		   $(PROCHTTP)httpd.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)flowcont.ol : $(@B).c  \
		    $(PROCHTTP)httpd.h \
		    $(PROCHTTP)webdisp.h \
		    $(PROCHTTP)util.h \
		    $(PROCHTTP)datatran.h \
		    flowcont.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)readent.ol : $(@B).c  \
		   $(PROCHTTP)httpd.h \
		   $(PROCHTTP)reqlist.h \
		   $(PROCHTTP)util.h \
		   $(PROCHTTP)datatran.h \
		   $(SYSDEP)tcprw.h 
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)sockout.ol : $(@B).c  \
	 $(PROCHTTP)httpd.h \
	  $(PROCHTTP)reqlist.h \
	  $(PROCHTTP)util.h \
	  $(PROCHTTP)datatran.h \
	  $(SYSDEP)tcprw.h 
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)streamw.ol : $(@B).c   upload.h \
		   $(PROCHTTP)httpd.h \
		   $(PROCHTTP)httperr.h \
		   $(HTMLFORM)streamfl.h \
		   $(SYSDEP)sysfile.h \
		   $(PROCHTTP)util.h \
		   streamw.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)strout.ol : $(@B).c  flowcont.h apputil.h strout.h \
		   $(PROCHTTP)httpd.h \
		   $(PROCHTTP)reqlist.h \
		   $(PROCHTTP)util.h \
		   $(PROCHTTP)datatran.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)testret.ol : $(@B).c  readent.h flowcont.h streamw.h apputil.h \
		   strout.h compsum.h\
		   $(PROCHTTP)httpd.h \
		   $(PROCHTTP)reqlist.h \
		   $(PROCHTTP)util.h \
		   $(PROCHTTP)datatran.h \
		   $(SYSDEP)tcprw.h \
		   $(SYSDEP)timezone.h \
		   $(HTMLFORM)formpars.h \
		   $(HTMLFORM)multiprt.h \
		   $(HTMLFORM)initoper.h \
		   $(PROCHTTP)formphas.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

$(OLS)upload.ol : $(@B).c upload.h \
		  $(HTMLFORM)streamfl.h
	$(CC) $(@B).c $(CFLAGS) -pw
	$(LIB) $(OLS)$(@B).ol $(LIBFLG) $(LIBFILE)

pizza.h: 
	$(UTILDIR)formelem example-7b.html pizza.h PIZZA
filesend.h:
	$(UTILDIR)formelem filesend.html filesend.h FILESEND
filetest.h:
	$(UTILDIR)formelem filetest.html filetest.h FILETEST

testform.h:
	$(UTILDIR)compfile filetest.html testform.h FILE_TEST_FORM HTML
exam7.h:
	$(UTILDIR)compfile example-7b.html EX7 HTML

testurl.h:
	$(UTILDIR)urltree testurl.def testurl.h


