CC				= gcc
CFLAGS        = -g -Wall -pedantic -Wmissing-prototypes -Wstrict-prototypes -O2

RM = rm

PROGRAM  = sql2html
DEBRIS   = a.out core

FILES.c  =	aggregate.c \
			alias.c \
			alias_info.c \
			cast.c \
			collection.c \
			column.c \
			condition.c \
			database.c \
			datatype.c \
			dbspace.c \
			directives.c \
			esqlc.c \
			expression.c \
			for_ro_upd.c \
			fragment.c \
			from.c \
			grant.c \
			having.c \
			identifier.c \
			index.c \
			literal.c \
			opaque.c \
			order.c \
			owner.c \
			routine.c \
			row.c \
			select.c \
			set.c \
			spl.c \
			sql.c \
			tabinfo3.c \
			table.c \
			token.c \
			transaction.c \
			trigger.c \
			where.c \
			view.c \
			updstats.c \
			drop.c \
			delete.c \
			insert.c \
			update.c \
			downshift.c

FILES.o  = ${FILES.c:.c=.o}

all:	${PROGRAM}

tape: 
	tar cvzf sql2html.tgz main.c ${FILES.c} ${FILES.c:.c=.h} Makefile

${PROGRAM}:	${FILES.o} main.o
	${CC} main.o ${FILES.o} -o $@

clean:
	-${RM} ${FILES.o} main.o
	-${RM} ${DEBRIS}

realclean:	clean
	-${RM} ${PROGRAM}

aggregate.o : aggregate.h owner.h routine.h tabinfo3.h token.h 
alias.o : alias.h identifier.h tabinfo3.h token.h 
alias_info.o : alias_info.h downshift.h tabinfo3.h table.h token.h 
cast.o : cast.h datatype.h literal.h routine.h token.h 
collection.o : cast.h collection.h identifier.h literal.h select.h token.h 
column.o : alias.h column.h expression.h identifier.h literal.h table.h token.h 
condition.o : condition.h expression.h identifier.h literal.h select.h token.h 
database.o : database.h dbspace.h esqlc.h identifier.h tabinfo3.h token.h 
datatype.o : datatype.h identifier.h literal.h owner.h tabinfo3.h table.h token.h 
dbspace.o : condition.h dbspace.h identifier.h tabinfo3.h token.h 
delete.o : condition.h delete.h table.h token.h 
directives.o : alias_info.h directives.h identifier.h index.h literal.h select.h table.h token.h 
drop.o : database.h datatype.h drop.h identifier.h index.h owner.h routine.h spl.h table.h token.h trigger.h 
esqlc.o : esqlc.h identifier.h token.h 
expression.o : alias.h cast.h collection.h column.h datatype.h esqlc.h expression.h identifier.h literal.h routine.h select.h token.h 
for_ro_upd.o : for_ro_upd.h identifier.h token.h 
fragment.o : condition.h dbspace.h expression.h fragment.h index.h table.h token.h 
from.o : from.h table.h token.h 
grant.o : datatype.h grant.h identifier.h routine.h table.h token.h 
having.o : condition.h having.h token.h 
identifier.o : cast.h identifier.h literal.h token.h 
index.o : identifier.h index.h literal.h owner.h routine.h tabinfo3.h table.h token.h 
insert.o : expression.h identifier.h insert.h literal.h routine.h select.h spl.h table.h token.h 
literal.o : datatype.h identifier.h literal.h token.h 
main.o : alias_info.h database.h sql.h tabinfo3.h token.h 
opaque.o : datatype.h literal.h opaque.h tabinfo3.h table.h token.h 
order.o : column.h index.h order.h token.h 
owner.o : identifier.h owner.h tabinfo3.h token.h 
routine.o : database.h datatype.h expression.h identifier.h owner.h routine.h select.h spl.h tabinfo3.h token.h 
row.o : datatype.h row.h tabinfo3.h table.h token.h 
select.o : column.h directives.h esqlc.h for_ro_upd.h from.h having.h identifier.h literal.h order.h select.h tabinfo3.h token.h where.h 
set.o : expression.h identifier.h literal.h set.h table.h token.h 
spl.o : column.h condition.h datatype.h esqlc.h expression.h identifier.h literal.h routine.h select.h spl.h sql.h token.h 
sql.o : aggregate.h cast.h database.h delete.h drop.h fragment.h grant.h index.h insert.h opaque.h routine.h row.h select.h set.h sql.h table.h token.h transaction.h trigger.h update.h updstats.h view.h 
downshift.o : downshift.h 
tabinfo3.o : tabinfo3.h token.h 
table.o : alias.h alias_info.h collection.h condition.h database.h datatype.h dbspace.h esqlc.h expression.h fragment.h identifier.h literal.h owner.h routine.h select.h tabinfo3.h table.h token.h 
token.o : downshift.h token.h 
transaction.o : token.h transaction.h 
trigger.o : condition.h delete.h identifier.h insert.h routine.h table.h token.h trigger.h update.h 
update.o : condition.h directives.h expression.h identifier.h table.h token.h update.h 
updstats.o : identifier.h literal.h routine.h table.h token.h updstats.h 
view.o : datatype.h identifier.h select.h tabinfo3.h table.h token.h view.h 
where.o : condition.h token.h where.h 
