VPATH= dillib:dillib/vty:dillib/Spawn:src:include:tests

noinst_LIBRARIES =libdill.a

#lib_LTLIBRARIES=libdill.la

bin_PROGRAMS=ah-tty ah-tty.static
# xpsh dilltest

data_DATA=ah-tty.conf
man_MANS=ah-tty.1
info_TEXINFOS=ah-tty.texi
ah_tty_TEXINFOS=doc/Intro.texi doc/ah-tty2.texi
TEXINFO_TEX=doc/texinfo.tex
ah_tty_SOURCES=psh.c sig.c monitor.c help.c psh.h ShellWin.c usage.c
ah_tty_LDADD= libdill.a -lpanel
ah_tty_static_SOURCES=$(ah_tty_SOURCES)
ah_tty_static_LDADD=$(ah_tty_LDADD)
ah_tty_static_LDFLAGS=--static

EXTRA_DIST=doc/RULES doc/README-pty ah-tty.lsm \
	$(TEXINFO_TEX) $(info_TEXINFOS) $(ah_tty_TEXINFOS)	\
	$(man_MANS) $(data_DATA)

autohelp_SOURCES = \
	autohelp.c	\
	ahread.c	

libdill_a_SOURCES = \
	$(autohelp_SOURCES) \
	dillofork.c	\
	dillofork2.c	\
	dillospawn.c	\
	IOQ.h		\
	platform.h	\
	circque.h	\
	dillib.h	\
	dillomsgs.h	\
	LDL.h		\
	pty.c		\
	vtcurses.h	\
	vtansi.c	\
	vtcurses.c	\
	vtlabel.c	\
	tvdiff.c

#dilltest_SOURCES = \
#	dilltest.c	\
#	t_Dillo_fork.c	\
#	t_Dillo_spawn.c

#dilltest.c: calltree.m callseq.m
#	(cd tests; ./gentest >dilltest.c)

#Generate the call tree, since CFlow doesn't strip static's out, we will need
# to hack that in
calltree.m: $(libdill_a_SOURCES)
	tests/gencalltree libdill.a $^ > tests/calltree.m

#This assumes, of course, that you have these tools installed...
doc/ah-tty2.texi:
	txh2texi --c --output-file=doc/ah-tty2.texi

doc/ah-tty_toc.html: ah-tty.texi doc/Intro.texi doc/ah-tty2.texi
	(cd doc; texi2html -glossary -split_chapter -menu ../ah-tty.texi)

texi: doc/ah-tty_toc.html
	(cd doc;texihtml_mod ah-tty)


syntax highlighted by Code2HTML, v. 0.9.1