1###########################################################################
2##                                                                       ##
3##                Centre for Speech Technology Research                  ##
4##                     University of Edinburgh, UK                       ##
5##                       Copyright (c) 1996,1997                         ##
6##                        All Rights Reserved.                           ##
7##                                                                       ##
8##  Permission is hereby granted, free of charge, to use and distribute  ##
9##  this software and its documentation without restriction, including   ##
10##  without limitation the rights to use, copy, modify, merge, publish,  ##
11##  distribute, sublicense, and/or sell copies of this work, and to      ##
12##  permit persons to whom this work is furnished to do so, subject to   ##
13##  the following conditions:                                            ##
14##   1. The code must retain the above copyright notice, this list of    ##
15##      conditions and the following disclaimer.                         ##
16##   2. Any modifications must be clearly marked as such.                ##
17##   3. Original authors' names are not deleted.                         ##
18##   4. The authors' names are not used to endorse or promote products   ##
19##      derived from this software without specific prior written        ##
20##      permission.                                                      ##
21##                                                                       ##
22##  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK        ##
23##  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ##
24##  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ##
25##  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE     ##
26##  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ##
27##  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ##
28##  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ##
29##  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ##
30##  THIS SOFTWARE.                                                       ##
31##                                                                       ##
32###########################################################################
33TOP=../..
34DIRNAME=src/main
35
36SRCS = festival_main.cc audsp.cc festival_client.cc
37OBJS = $(SRCS:.cc=.o)
38FILES=Makefile $(SRCS)
39LOCAL_CLEAN = $(ETCDIR)/audsp $(ETCDIR)/.made
40
41ETCDIR=$(TOP)/lib/etc/$(SYSTEM_TYPE)
42
43ALL_EXECS = festival  festival_client
44
45ALL = $(ALL_EXECS) make_audiosp
46
47include $(TOP)/config/common_make_rules
48include $(EST)/config/rules/bin_process.mak
49
50ETCDIR=$(TOP)/lib/etc/$(SYSTEM_TYPE)
51
52ifeq (SIOD_PYTHON, $(findstring SIOD_PYTHON, $(INCLUDE_MODULES)))
53	LIBS += $(shell python3-config --ldflags) -ldl -lutil -lm
54endif
55
56festival: festival_main.o $(LIBDEPS)
57	$(LINK_COMMAND) -o festival festival_main.o $(LIBS)
58
59festival_client: festival_client.o $(REQUIRED_LIBDEPS)
60	$(LINK_COMMAND) -o festival_client festival_client.o $(LIBS)
61
62$(ETCDIR)/audsp: $(ETCDIR)/.made audsp.o $(LIBDEPS)
63	$(LINK_COMMAND) -o $(ETCDIR)/audsp audsp.o $(LIBS)
64
65# Can't just rely on the dir as it gets updated with new files
66# check for the data of a file created in etcdir
67
68make_audiosp: $(ETCDIR)/audsp
69	@$(DO_NOTHING)
70
71$(ETCDIR)/.made:
72	@ if [ ! -d $(ETCDIR) ] ; \
73          then mkdir -p $(ETCDIR); fi
74	@ if [ ! -f $(ETCDIR)/.made ] ; \
75          then touch $(ETCDIR)/.made ; fi
76
77