CC		=	gcc
LEX		=	lex
YACC		=	yacc -d -v
TARGET		=	filter
BASEDIR         =       /users/qpop/Qd
LDFLAGS		= 	-ll -ly
CDEBUGFLAGS	=	-g -Wall
CDEBUGDEFS	=	-D_DEBUG -DYYDEBUG=1
OBJS		=	y.tab.o lex.yy.o dastruct.o


all: ${TARGET}

${TARGET} : ${OBJS}
	${CC} ${OBJS} -o ${TARGET} ${LDFLAGS}

%.o: %.c
	${CC} ${CDEBUGFLAGS} -c ${CDEBUGDEFS} $< -o $@

y.tab.c: y.tab.y
	${YACC} y.tab.y

lex.yy.c: lex.yy.l
	${LEX} lex.yy.l

clean:
	rm -f ${OBJS}
	rm -f ${TARGET}
	rm -f *~
	rm -f lex.yy.c y.tab.c
