Browse Source

autotools: run ndk-build when 'make android' is invoked to simplify the build steps

master
Reece H. Dunn 12 years ago
parent
commit
6f085e7a94
3 changed files with 19 additions and 13 deletions
  1. 9
    3
      Makefile.am
  2. 5
    10
      README.md
  3. 5
    0
      configure.ac

+ 9
- 3
Makefile.am View File

@@ -6,7 +6,7 @@ DATADIR=$(PREFIX)/share/espeak-data

PLATFORM=big_endian

.PHONY: all clean distclean espeak-phoneme-data
.PHONY: android all clean distclean espeak-phoneme-data

EXTRA_DIST=

@@ -118,7 +118,10 @@ espeak-data/phsource/dir.stamp: phsource/ph_* phsource/phonemes phsource/intonat
espeak-data/phontab: src/espeakedit espeak-data/dictsource/dir.stamp espeak-data/phsource/dir.stamp
ESPEAK_DATA_PATH=$(PWD) src/espeakedit --compile

##### android language data packs:
##### android targets:

jni:
cd android && ndk-build

android/res/raw/espeakdata.zip: espeak-data/phontab dictionaries
mkdir -pv android/res/raw
@@ -130,7 +133,10 @@ android/res/raw/espeakdata.zip: espeak-data/phontab dictionaries
android/res/raw/espeakdata_version: android/res/raw/espeakdata.zip
sha1sum $< | awk '{ print $$1 }' > $@

android: android/res/raw/espeakdata.zip android/res/raw/espeakdata_version
android: \
jni \
android/res/raw/espeakdata.zip \
android/res/raw/espeakdata_version

##### dictionaries:


+ 5
- 10
README.md View File

@@ -23,17 +23,12 @@ If you are building on the command line, you will also need:

## Building eSpeak

1. Generate the build files and get the required git submodules by running:
The eSpeak language data file and the JNI bindings needed for the Android
APK can be build using the following commands:

$ ./autogen.sh
1. Build the `libttsespeak.so` file by running:

$ cd android
$ ndk-build
2. Build the `android/res/raw/espeakdata.zip` file by running:

$ ./configure --prefix=/usr
$ make android
$ ./autogen.sh
$ ./configure --prefix=/usr
$ make android

## Building the APK with Eclipse


+ 5
- 0
configure.ac View File

@@ -17,6 +17,11 @@ AC_PROG_CXX
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

AC_CHECK_PROG(NDKBUILD_CHECK,[ndk-build],yes)
if test x"$NDKBUILD_CHECK" != xyes ; then
AC_MSG_ERROR([Please ensure that the Android NDK is installed and ndk-build is usable from the command line.])
fi

dnl ================================================================
dnl getopt checks.
dnl ================================================================

Loading…
Cancel
Save