## Makefile for SQL test program...

CC = gcc
LIBS = -lc -lcrypt -lmysqlclient
INCLUDES = -I../include
OPTIMIZE = -O6
DEBUG = 

all : rmincident lsincident mkincident report chincident getincident makereport menu

test       :
	$(CC) $(DEBUG) -o test.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) test.cc

lsincident :
	$(CC) $(DEBUG) -o lsincident.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) lsincident.cc

mkincident :
	$(CC) $(DEBUG) -o mkincident.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) mkincident.cc

report :
	$(CC) $(DEBUG) -o report.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) report.cc

rmincident :
	$(CC) $(DEBUG) -o rmincident.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) rmincident.cc

chincident :
	$(CC) $(DEBUG) -o chincident.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) chincident.cc

getincident :
	$(CC) $(DEBUG) -o getincident.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) getincident.cc

makereport :
	$(CC) $(DEBUG) -o makereport.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) makereport.cc

menu       :
	$(CC) $(DEBUG) -o menu.cgi $(OPTIMIZE) $(INCLUDES) $(LIBS) menu.cc

install : all
	cp *.cgi /usr/local/httpd/uncgi-bin
	chown root.root /usr/local/httpd/uncgi-bin/*
	chmod 0755 /usr/local/httpd/uncgi-bin/*

clean : 
	rm *.cgi