Bug 1051146 - Part 3: Introduce build system changes for the new Pocketsphinx and Sphinxbase code. r=smaug, r=gps
authorKelly Davis <kdavis@mozilla.com>
Wed, 27 May 2015 21:39:00 -0400
changeset 246939 123b9a110a78d54a2a8d4c34cbad92cd30a16b49
parent 246938 72d3499011ff584d99b67fef64c5bb231f4d1a78
child 246940 796e964c17691bcfed88d3b686fbd0a13ba8b7cd
push id60578
push userryanvm@gmail.com
push dateWed, 03 Jun 2015 13:43:47 +0000
treeherdermozilla-inbound@efe257c2ba14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, gps
bugs1051146
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1051146 - Part 3: Introduce build system changes for the new Pocketsphinx and Sphinxbase code. r=smaug, r=gps
config/external/moz.build
layout/build/moz.build
media/pocketsphinx/moz.build
media/sphinxbase/moz.build
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -35,16 +35,22 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ
     external_dirs += ['media/libvpx']
 
 if not CONFIG['MOZ_NATIVE_PNG']:
     external_dirs += ['media/libpng']
 
 if CONFIG['CPU_ARCH'] == 'arm':
     external_dirs += ['media/openmax_dl']
 
+if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
+    external_dirs += [
+        'media/sphinxbase',
+        'media/pocketsphinx',
+    ]
+
 external_dirs += [
     'media/kiss_fft',
     'media/libcubeb',
     'media/libogg',
     'media/libopus',
     'media/libtheora',
     'media/libspeex_resampler',
     'media/libstagefright',
--- a/layout/build/moz.build
+++ b/layout/build/moz.build
@@ -117,16 +117,23 @@ if CONFIG['MOZ_B2G_BT']:
             '/dom/bluetooth/bluetooth1',
         ]
 
 if CONFIG['MOZ_WEBSPEECH']:
     LOCAL_INCLUDES += [
         '/dom/media/webspeech/synth',
     ]
 
+if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
+    LOCAL_INCLUDES += [
+        '/media/pocketsphinx',
+        '/media/sphinxbase',
+    ]
+
+
 if CONFIG['MOZ_GSTREAMER']:
     CXXFLAGS += CONFIG['GSTREAMER_CFLAGS']
 
 if CONFIG['MOZ_SECUREELEMENT']:
     LOCAL_INCLUDES += [
         '/dom/secureelement',
     ]
 
new file mode 100644
--- /dev/null
+++ b/media/pocketsphinx/moz.build
@@ -0,0 +1,54 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+LOCAL_INCLUDES += [
+    '/media/sphinxbase',
+]
+
+EXPORTS.pocketsphinx += [
+    'pocketsphinx.h',
+]
+
+SOURCES += [
+    'src/acmod.c',
+    'src/allphone_search.c',
+    'src/bin_mdef.c',
+    'src/blkarray_list.c',
+    'src/dict.c',
+    'src/dict2pid.c',
+    'src/fsg_history.c',
+    'src/fsg_lextree.c',
+    'src/fsg_search.c',
+    'src/hmm.c',
+    'src/kws_detections.c',
+    'src/kws_search.c',
+    'src/mdef.c',
+    'src/ms_gauden.c',
+    'src/ms_mgau.c',
+    'src/ms_senone.c',
+    'src/ngram_search.c',
+    'src/ngram_search_fwdflat.c',
+    'src/ngram_search_fwdtree.c',
+    'src/phone_loop_search.c',
+    'src/pocketsphinx.c',
+    'src/ps_alignment.c',
+    'src/ps_lattice.c',
+    'src/ps_mllr.c',
+    'src/ptm_mgau.c',
+    'src/s2_semi_mgau.c',
+    'src/state_align_search.c',
+    'src/tmat.c',
+    'src/vector.c',
+]
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CC']:
+    CFLAGS += ['-Wno-sign-compare']
+
+if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+    NO_VISIBILITY_FLAGS = True,
+
+FINAL_LIBRARY = 'gkmedias'
new file mode 100644
--- /dev/null
+++ b/media/sphinxbase/moz.build
@@ -0,0 +1,79 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+EXPORTS.sphinxbase += [
+    'sphinxbase/cmd_ln.h',
+    'sphinxbase/fe.h',
+    'sphinxbase/feat.h',
+    'sphinxbase/logmath.h',
+]
+
+SOURCES += [
+    'src/libsphinxbase/fe/fe_interface.c',
+    'src/libsphinxbase/fe/fe_noise.c',
+    'src/libsphinxbase/fe/fe_prespch_buf.c',
+    'src/libsphinxbase/fe/fe_sigproc.c',
+    'src/libsphinxbase/fe/fe_warp.c',
+    'src/libsphinxbase/fe/fe_warp_affine.c',
+    'src/libsphinxbase/fe/fe_warp_inverse_linear.c',
+    'src/libsphinxbase/fe/fe_warp_piecewise_linear.c',
+    'src/libsphinxbase/fe/fixlog.c',
+    'src/libsphinxbase/fe/yin.c',
+    'src/libsphinxbase/feat/agc.c',
+    'src/libsphinxbase/feat/cmn.c',
+    'src/libsphinxbase/feat/cmn_prior.c',
+    'src/libsphinxbase/feat/feat.c',
+    'src/libsphinxbase/feat/lda.c',
+    'src/libsphinxbase/lm/fsg_model.c',
+    'src/libsphinxbase/lm/jsgf.c',
+    'src/libsphinxbase/lm/jsgf_parser.c',
+    'src/libsphinxbase/lm/jsgf_scanner.c',
+    'src/libsphinxbase/lm/lm3g_model.c',
+    'src/libsphinxbase/lm/ngram_model.c',
+    'src/libsphinxbase/lm/ngram_model_arpa.c',
+    'src/libsphinxbase/lm/ngram_model_dmp.c',
+    'src/libsphinxbase/lm/ngram_model_set.c',
+    'src/libsphinxbase/util/bio.c',
+    'src/libsphinxbase/util/bitvec.c',
+    'src/libsphinxbase/util/blas_lite.c',
+    'src/libsphinxbase/util/case.c',
+    'src/libsphinxbase/util/ckd_alloc.c',
+    'src/libsphinxbase/util/cmd_ln.c',
+    'src/libsphinxbase/util/dtoa.c',
+    'src/libsphinxbase/util/err.c',
+    'src/libsphinxbase/util/errno.c',
+    'src/libsphinxbase/util/f2c_lite.c',
+    'src/libsphinxbase/util/filename.c',
+    'src/libsphinxbase/util/genrand.c',
+    'src/libsphinxbase/util/glist.c',
+    'src/libsphinxbase/util/hash_table.c',
+    'src/libsphinxbase/util/heap.c',
+    'src/libsphinxbase/util/huff_code.c',
+    'src/libsphinxbase/util/listelem_alloc.c',
+    'src/libsphinxbase/util/logmath.c',
+    'src/libsphinxbase/util/matrix.c',
+    'src/libsphinxbase/util/mmio.c',
+    'src/libsphinxbase/util/pio.c',
+    'src/libsphinxbase/util/profile.c',
+    'src/libsphinxbase/util/sbthread.c',
+    'src/libsphinxbase/util/slamch.c',
+    'src/libsphinxbase/util/slapack_lite.c',
+    'src/libsphinxbase/util/strfuncs.c',
+    'src/libsphinxbase/util/utf8.c',
+]
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CC']:
+    CFLAGS += ['-Wno-sign-compare']
+
+# Add define required of third party code.
+if CONFIG['GNU_CC']:
+    DEFINES['HAVE_CONFIG_H'] = True
+
+if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+    NO_VISIBILITY_FLAGS = True,
+
+FINAL_LIBRARY = 'gkmedias'