#  phoneformat - produce a compact TeX file for a simple address database.
#  Copyright (C) 1989-1994  Luigi Semenzato
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#  Author's address:
#  Computer Science Division
#  University of California
#  Berkeley, CA 94720
#  luigi@cs.berkeley.edu
#
#  This program was developed in the author's own time
#  and is not connected in any way to the author's research
#  at Berkeley.


OBJ =  main.o y.tab.o lexphones.o texformat.o
CFLAGS = -g
LDFLAGS =
CC = gcc

phoneformat: $(OBJ)
	$(CC) $(LDFLAGS) $(OBJ) -ll -o phoneformat

main.o: main.c phones.h
texformat.o: texformat.c
lexphones.c: lexphones.l phones.h

y.tab.c: phones.y
	yacc -d phones.y

y.tab.o: y.tab.c

clean:
	rm -f *.o y.tab.c y.tab.h

install: phoneformat
	install -s -c -m 555 phoneformat $$HOME/bin

shar:
	shar phoneformat.1 COPYING Makefile main.c lexphones.l phones.h \
	texformat.c phones.y example.format > phoneformat.shar
