/android euphoria

Building the Euphoria interpreter for Android.

Required software

This is something that is easiest to do on a PC running Linux. It might be possible in Windows using Cygwin, but then you'd probably have to change a lot of things in the Makefiles.

Start by downloading this archive of a modified version of the 4.0a3 source: http://jiggawatt.org/badc0de/android/eu/android-eu-4.0a3.zip.
There's a pre-built version of exu in the zip, so you can try it out without having to compile it yourself if you want to.

I've only included the files that have been changed from the original versions. So replace the corresponding files in the original source package with the modified versions.
Then build as usual. I.e. in the source directory, run:

make interpreter

If you configure with --debug, you may want to change the makefile in source/pcre so that the alternative CFLAGs are used instead (the ones with -g3 -O0).

Now you can try out the interpreter by running some simple test, like the hash.ex program from the euphoria/demo directory. Start up the Android emulator, copy exu and hash.ex to the tools folder of the Android SDK and run:

adb push exu /data/misc/exu
adb push hash.ex /data/misc/hash.ex
adb shell chmod 777 /data/misc/exu
adb shell
# cd /data/misc
# ./exu hash.ex < ./hash.ex