#
#Copyright 1987 by Rensselaer Polytechnic Institute
#
#Permission to use, copy, modify, and distribute this
#software and its documentation for any purpose and without
#fee is hereby granted, provided that the above copyright
#notice appear in all copies and that both that copyright
#notice and this permission notice appear in supporting
#documentation, and that the name of RPI not be used in
#advertising or publicity pertaining to distribution of the
#software without specific, written prior permission.
#RPI makes no representations about the suitability of
#this software for any purpose.  It is provided "as is"
#without express or implied warranty.
#
#	CFLAGS - complete command flags for the compile
O=	-O
CFLGS=	$O -I../../h 
CDEFS=
CFLAGS=$(CFLGS) $(CDEFS) 
OBJS= main.o y.tab.o lex.yy.o tbl_util.o util.o
#	LIBES - list of standard libraries to use
LIBES=-ll -lsgmp -lresolv -lBSD
#
sgmpask:$(OBJS)
	cc  $(CFLAGS) -o sgmpask $(OBJS) $(LIBES)

install: sgmpask
	cp sgmpask /usr/local/sgmpask

clean:
	/bin/rm $(OBJS) lex.yy.c y.tab.c sgmpask

#	dependancies:
#
main.o : main.c

y.tab.o : y.tab.c

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

lex.yy.c :smpask.l y.tab.h
	lex smpask.l
#	patch lex.yy.c lex.yy.c.diff
#	rm lex.yy.c.orig

lex.yy.o: lex.yy.c

tbl_util.o: tbl_util.c

util.o: util.c
