sqlfun/Makefile
Jeff Garzik 62870f4575 Check in SQL lexer and parser from John Levine's _Flex & Bison_ O'Reilly book
The only changes were those needed to make the newly renamed parser build,
makefile and header file name changes.

Book URL, which describes the parser's construction (chapter 4):
	http://oreilly.com/catalog/9780596155988

Software URL: ftp://ftp.iecc.com/pub/file/flexbison.zip

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 17:34:31 -05:00

35 lines
668 B
Makefile

# $Header: /home/johnl/flnb/code/sql/RCS/Makefile,v 2.1 2009/11/08 02:53:39 johnl Exp $
# Companion source code for "flex & bison", published by O'Reilly
# Media, ISBN 978-0-596-15597-1
# Copyright (c) 2009, Taughannock Networks. All rights reserved.
# See the README file for license conditions and contact info.
CC = cc -g
LEX = flex
YACC = bison
CFLAGS = -DYYDEBUG=1
PROGRAMS = sql
all: ${PROGRAMS}
# chapter 4
sql: sql.tab.o sql.o
${CC} -o $@ sql.tab.o sql.o
sql.tab.c sql.tab.h: sql.y
${YACC} -vd sql.y
sql.c: sql.l
${LEX} -o $@ $<
sql.o: sql.c sql.tab.h
clean:
rm -f sql sql.tab.c sql.tab.h sql.c sql.tab.o sql.o \
sql.output
.SUFFIXES: .l .y .c