PACKAGE = gtalk
VERSION = 0.0

CC	= gcc
RM	= /bin/rm
TAR	= /bin/tar
GZIP	= /bin/gzip

CFLAGS	= -DPACKAGE_NAME=\"gtalk\" -DPACKAGE_TARNAME=\"gtalk\" -DPACKAGE_VERSION=\"0.0\" -DPACKAGE_STRING=\"gtalk\ 0.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBM=1 -DLINUX=1 -DWORDS_LITTLEENDIAN=1 
LIBS	=  -lm 
TARGET	= gtalk

OBJ	= accent.o \
	chasen.o \
	do_output.o \
	do_synthesis.o \
	hmmsynth.o \
	main.o \
	make_aphrase.o \
	make_breath.o \
	make_duration.o \
	make_mora.o \
	make_parameter.o \
	make_phoneme.o \
	make_sentence.o \
	misc.o \
	mlpg.o \
	model.o \
	modify_parameter.o \
	morph.o \
	read_conf.o \
	send.o \
	sleep.o \
	tag.o \
	text.o \
	tree.o \
	util.o \
	vocoder.o

SRC	= accent.c \
	accent.h \
	chasen.c \
	command.h \
	confpara.h \
	da.h \
	defaults.h \
	do_output.c \
	do_synthesis.c \
	hmmsynth.c \
	hmmsynth.h \
	main.c \
	make_aphrase.c \
	make_breath.c \
	make_duration.c \
	make_mora.c \
	make_parameter.c \
	make_phoneme.c \
	make_sentence.c \
	misc.c \
	misc.h \
	mlpg.c \
	mlpg.h \
	model.c \
	model.h \
	modify_parameter.c \
	morph.c \
	pronunciation.h \
	read_conf.c \
	send.c \
	sleep.c \
	slot.h \
	synthesis.h \
	tag.c \
	tag.h \
	text.c \
	tree.c \
	tree.h \
	util.c \
	vocoder.c \
	vocoder.h

gtalk: $(OBJ)
	$(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LIBS)

all: $(TARGET)

main.o: command.h slot.h confpara.h

read_conf.o: confpara.h slot.h

text.o: synthesis.h confpara.h

chasen.o: chasen.c confpara.h

tag.o: synthesis.h tag.h

morpph.o: synthesis.h accent.h

accent.o: synthesis.h accent.h

make_mora.o: synthesis.h accent.h

make_aphrase.o: synthesis.h accent.h

make_breath.o: synthesis.h accent.h

make_phoneme.o: synthesis.h pronunciation.h confpara.h

make_sentence.o: synthesis.h

send.o: confpara.h

hmmsynth.o: synthesis.h defaults.h misc.h model.h mlpg.h vocoder.h hmmsynth.h confpara.h

make_duration.o: synthesis.h defaults.h misc.h model.h tree.h hmmsynth.h confpara.h

make_parameter.o: synthesis.h defaults.h misc.h model.h tree.h mlpg.h hmmsynth.h confpara.h

do_synthesis.o: synthesis.h misc.h mlpg.h vocoder.h hmmsynth.h confpara.h

modyfy_parameter.o: synthesis.h hmmsynth.h tag.h defaults.h tag.h confpara.h

do_output.o: synthesis.h defaults.h hmmsynth.h confpara.h

model.o: synthesis.h defaults.h misc.h model.h confpara.h

tree.o: misc.h tree.h confpara.h

mlpg.o: synthesis.h defaults.h misc.h model.h mlpg.h hmmsynth.h confpara.h

vocoder.o: synthesis.h defaults.h misc.h model.h vocoder.h

misc.o: misc.h

util.o: confpara.h

clean:
	$(RM) -rf *~ $(OBJ) core

allclean:
	$(RM) -rf *~ *.o core .nfs* $(TARGET) config.log config.cache config.status

dist-src = $(SRC)
dist-info  = README RUN Changelog
dist-common = configure configure.in Makefile.in config
dist-etc = data mono.lst ssm.conf chasenrc
DISTFILES = $(dist-src) $(dist-info) $(dist-common) $(dist-etc)

distdir	= $(PACKAGE)-$(VERSION)
dist: distdir
	-chmod -R a+r $(distdir)
	$(TAR) chof $(distdir).tar $(distdir)
	$(GZIP) -f $(distdir).tar
	-rm -rf $(distdir)
distdir: $(DISTFILES)
	-rm -rf $(distdir)
	mkdir $(distdir)
	-chmod 777 $(distdir)
	@for file in $(DISTFILES); do \
	  if test -d $$file; then \
	    cp -pr $$file $(distdir); \
	  else \
	    cp -p $$file $(distdir); \
	  fi \
	done
