From 864a4077c5cfbc3c4eec7165bafc2c260d95acca Mon Sep 17 00:00:00 2001 From: Giulio Paci Date: Sat, 19 Aug 2017 17:03:38 +0200 Subject: [PATCH] Added instructions to compile Phonetisaurus.so in Makefile.am. --- Makefile.am | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Makefile.am b/Makefile.am index 09e0875..a4eba67 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,3 +39,21 @@ endif rnnlm_SOURCES = src/bin/rnnlm.cc src/3rdparty/rnnlm/rnnlmlib.cpp src/3rdparty/rnnlm/rnnlmlib.h rnnlm_CXXFLAGS = $(OPENFST_CXXFLAGS) -I$(top_srcdir)/src/3rdparty/rnnlm -funroll-loops -ffast-math rnnlm_LDADD = $(OPENFST_LDFLAGS) + +if WANT_PYTHON +if HAVE_PYTHON + +Phonetisaurus-binding.cc: $(top_srcdir)/src/phonetisaurus-module.py + $(PYTHON) -B $(top_srcdir)/src/phonetisaurus-module.py > Phonetisaurus-binding.cc + +CLEANFILES = Phonetisaurus-binding.cc + +if HAVE_PYTHON_DEV +pyexec_LTLIBRARIES = Phonetisaurus.la +nodist_Phonetisaurus_la_SOURCES = Phonetisaurus-binding.cc src/lib/util.cc src/include/util.h +Phonetisaurus_la_CXXFLAGS = $(OPENFST_CXXFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/src/3rdparty/utfcpp -funroll-loops -ffast-math +Phonetisaurus_la_LIBADD = $(OPENFST_LDFLAGS) $(PYTHON_LIBS) +Phonetisaurus_la_LDFLAGS = -avoid-version -module +endif +endif +endif