
include ../Info

VERSION=="agraph$(_VERSION_NUM)"

/*
if "$(HAVE_AST)"
	:PACKAGE:       ast
else
	PACKAGE_cdt = ../cdt
	:PACKAGE:       cdt
end
*/

if "$(DEBUG)"
	MEMDEBUG==1
end

if "$(HAVE_VMALLOC)"
	.SOURCE: ../vmalloc
	LIBS := $(LIBS) -lvmalloc
end

LEX=flex -8	/* required */

GRAPH = apply.c attr.c edge.c agerror.c flatten.c \
	grammar.y graph.c id.c imap.c io.c mem.c \
	node.c obj.c pend.c rec.c refstr.c scan.l \
	subg.c utils.c write.c agraph.3

agraph $(_VERSION_NUM) :LIBRARY: $(GRAPH)

YACCFIX.grammar = aag
/* YYPREFIX.grammar = aag grammar.y scan.l */

LEX.FIX : .AFTER
	$(SED) "s/yy/aag/g" < $(<<:N=*.c) > y.tab.c
	mv y.tab.c $(<<:N=*.c)

%.c : %.l LEX.FIX 

$(INCLUDEDIR) :INSTALLDIR: agraph.h

::	README makefile dotdge.c cmpnd.c tester.c vmstub.h malloc.h main.c
