all: $(PROGS) say klatt
#	say make completed

KLATT_OBJS = klatt.o parwave.o

kl2elm : kl2elm.o phonemes.o

klatt : $(KLATT_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(KLATT_OBJS) $(LDLIBS)

SKLATT_OBJS = sklatt.o def_pars.o parwave.o hplay.o timer.o

sklatt : $(SKLATT_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(SKLATT_OBJS) $(LDLIBS)

SAY_OBJS = say.o saynum.o darray.o ASCII.o text.o english.o trie.o phtoelm.o holmes.o elements.o nsynth.o def_pars.o hplay.o dict.o getarg.o


say : $(SAY_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(SAY_OBJS) $(LDLIBS)

clean:
	rm -f *.o $(PROGS) say klatt lex.yy.c tmp.par core

spotless: clean
	rm -f *~ *%

distribution: spotless
	name=`pwd | sed 's:^.*/::`;\
        cd .. ;\
        tar cvf - $$name | compress > $$name.tar.Z

#MM
ASCII.o : ASCII.c ASCII.h 
darray.o : darray.c proto.h darray.h 
def_pars.o : def_pars.c proto.h getargs.h parwave.h pars.def 
dict.o : dict.c proto.h dict.h 
elements.o : elements.c elements.h Elements.def 
english.o : english.c 
getarg.o : getarg.c proto.h getargs.h 
holmes.o : holmes.c proto.h parwave.h elements.h darray.h holmes.h getargs.h 
holmes_save.o : holmes_save.c proto.h parwave.h elements.h darray.h holmes.h 
hplay.o : hplay.c proto.h getargs.h hplay.h 
kl2elm.o : kl2elm.c proto.h phonemes.h phonemes.def 
klatt.o : klatt.c proto.h parwave.h 
nsynth.o : nsynth.c proto.h parwave.h 
parwave.o : parwave.c proto.h parwave.h 
phonemes.o : phonemes.c proto.h phonemes.h phonemes.def 
phtoelm.o : phtoelm.c proto.h elements.h darray.h trie.h phtoelm.h holmes.h \
  phtoelm.def 
plot.o : plot.c proto.h elements.h phonemes.h phonemes.def 
say.o : say.c proto.h parwave.h hplay.h dict.h ASCII.h darray.h holmes.h phtoelm.h \
  text.h say.h 
saynum.o : saynum.c proto.h darray.h say.h 
text.o : text.c proto.h darray.h phtoelm.h text.h say.h 
tidy_elm.o : tidy_elm.c proto.h elements.h parwave.h 
trie.o : trie.c proto.h trie.h 
