1# Makefile for NFA->DFA conversion utility 2# 3# Copyright (C) Richard P. Curnow 2000-2001,2003,2005,2006,2007 4# This program is free software; you can redistribute it and/or modify 5# it under the terms of version 2 of the GNU General Public License as 6# published by the Free Software Foundation. 7# 8# This program is distributed in the hope that it will be useful, but 9# WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11# General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License along 14# with this program; if not, write to the Free Software Foundation, Inc., 15# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16# 17 18CC=gcc 19#CFLAGS=-g -Wall 20#CFLAGS=-O2 -pg 21CFLAGS=-Wall 22prefix?=/usr/local 23bindir=$(prefix)/bin 24mandir?=$(prefix)/man 25man1dir=$(mandir)/man1 26man5dir=$(mandir)/man5 27 28OBJ = dfasyn.o parse.o scan.o \ 29 tokens.o abbrevs.o charclass.o \ 30 stimulus.o \ 31 blocks.o states.o \ 32 n2d.o expr.o evaluator.o \ 33 tabcompr.o compdfa.o 34 35all : dfasyn 36 37install : all 38 [ -d $(bindir) ] || mkdir -p $(bindir) 39 [ -d $(man1dir) ] || mkdir -p $(man1dir) 40 [ -d $(man5dir) ] || mkdir -p $(man5dir) 41 cp dfasyn $(bindir) 42 cp dfasyn.1 $(man1dir) 43 cp dfasyn.5 $(man5dir) 44 45dfasyn : $(OBJ) 46 $(CC) $(CFLAGS) -o dfasyn $(OBJ) 47 48parse.c parse.h : parse.y 49 bison -v -d -o parse.c parse.y 50 51parse.o : parse.c dfasyn.h 52 53scan.c : scan.l 54 flex -t -s scan.l > scan.c 55 56scan.o : scan.c parse.h dfasyn.h 57 58$(OBJ) : dfasyn.h 59 60clean: 61 rm -f dfasyn *.o scan.c parse.c parse.h parse.output 62 63