### MOSAIC KLIC COMPILATION

KLIC = klic
KLICFLAGS = -g
CFLAGS = -g
CC = gcc

OBJ = support.o list.o connect.o interface.o cci_interface.o  \
      tohtml.o util.o html.o cgi.o fromhtml.o http.o \
      ping.o url.o page.o server first.cgi 

all: $(OBJ) 


clean: 
	rm -f *.o

## FIX: replace /home/http/programs/epontell with the path
##      to the local CGI directory
server: server.kl1
	$(KLIC) $(KLICFLAGS) -o server server.kl1 util.o html.o tohtml.o cgi.o
first.cgi: cgi_script.kl1
	$(KLIC) $(KLICFLAGS) -o first.cgi cgi_script.kl1
	mv first.cgi /home/http/programs/epontell
	chmod 755 /home/http/programs/epontell/first.cgi
support.o: support.c cci.h 
	$(CC) $(CFLAGS) -c support.c
list.o: list.c list.h listP.h
	$(CC) $(CFLAGS) -c list.c
connect.o: connect.c connect.h port.h memStuffForPipSqueeks.h
	$(CC) $(CFLAGS) -c connect.c
interface.o: interface.c cci.h
	$(CC) $(CFLAGS) -c interface.c
cci_interface.o : cci_interface.kl1 port.h cci.h
	$(KLIC) $(KLICFLAGS) -c -o cci_interface.o cci_interface.kl1
tohtml.o: tohtml.kl1
	$(KLIC) $(KLICFLAGS) -c -o tohtml.o tohtml.kl1
util.o: util.kl1
	$(KLIC) $(KLICFLAGS) -c -o util.o util.kl1
string_to_integer.o: string_to_integer.kl1
	$(KLIC) $(KLICFLAGS) -c -o string_to_integer.o string_to_integer.kl1
cgi.o: cgi.kl1
	$(KLIC) $(KLICFLAGS) -c -o cgi.o cgi.kl1
html.o: html.kl1
	$(KLIC) $(KLICFLAGS) -c -o html.o html.kl1
fromhtml.o: fromhtml.kl1
	$(KLIC) $(KLICFLAGS) -c -o fromhtml.o fromhtml.kl1
http.o: http.kl1 http_connect.h cio.h
	$(KLIC) $(KLICFLAGS) -c -o http.o http.kl1
page.o: page.kl1 http_connect.h cio.h
	$(KLIC) $(KLICFLAGS) -c -o page.o page.kl1
url.o: url.kl1 
	$(KLIC) $(KLICFLAGS) -c -o url.o url.kl1
ping.o: ping.kl1 
	$(KLIC) $(KLICFLAGS) -c -o ping.o ping.kl1
