android: add libecl build instructions

This commit is contained in:
Daniel Kochmański 2015-10-28 18:13:00 +01:00
parent fd7547aaa6
commit c95ba3ce93
2 changed files with 78 additions and 17 deletions

74
INSTALL
View file

@ -1,22 +1,62 @@
You will find detailed installation instructions in the ECL manual
http://ecls.sourceforge.net/new-manual/pr01s06.html
If you do not have access to the online version, follow the following two small recipies.
https://common-lisp.net/project/ecl/manual/pr01s06.html
If you do not have access to the online version, follow the following recipies.
* Unix and similar platforms.
1. Type
./configure --help
to get a list of the flags with which ECL can be configured.
2. Enter
./configure ...
where "..." is the set of flags you have chosen.
3. Use "make" followed by "make install" to build and install ECL.
1. Type
./configure --help
to get a list of the flags with which ECL can be configured.
2. Enter
./configure ...
where "..." is the set of flags you have chosen.
3. Use "make" followed by "make install" to build and install ECL.
* Windows with Visual Studio C++ 2008
1. Enter the msvc directory
2. Read the file Makefile to find the configuration options. They typically have the
form ECL_UNICODE=1, ECL_THREADS=1, etc
3. Enter
nmake ...
followed by zero or more of those options
4. Use "nmake install" to create a directory called "package" with ECL in it.
5. Move that directory wherever you need.
1. Enter the msvc directory
2. Read the file Makefile to find the configuration options. They typically have the
form ECL_UNICODE=1, ECL_THREADS=1, etc
3. Enter
nmake ...
followed by zero or more of those options
4. Use "nmake install" to create a directory called "package" with ECL in it.
5. Move that directory wherever you need.
* Cross-compile for the android platform (from the UNIX machine)
1. Build the host ECL
#+BEGIN_SRC shell-script
./configure ABI=32 CFLAGS="-m32 -g -O2" LDFLAGS="-m32 -g -O2" \
--prefix=`pwd`/ecl-android-host \
--disable-longdouble \
--enable-libatomic=included
make -j9
make install
rm -r build
export ECL_TO_RUN=`pwd`/ecl-android-host/bin/ecl
#+END_SRC
2. Build the toolchain (requires android-ndk) and export the
necessary paths - if you have a toolchain for the android just
export it's bin/ directory
#+BEGIN_SRC shell-script
export PLATFORM_PREFIX=/opt/toolchains/android-ndk/
export NDK_PATH=/opt/android-ndk/
export NDK_PLATFORM=android-4
mkdir ${PLATFORM_PREFIX}
${NDK_PATH}/build/tools/make-standalone-toolchain.sh \
--platform=${NDK_PLATFORM} \
--install-dir=${PLATFORM_PREFIX} \
--arch=arm
export PATH=${PLATFORM_PREFIX}/bin:${PATH}
#+END_SRC
3. Build and install the target library
#+BEGIN_SRC shell-script
./configure --host=arm-linux-androideabi \
--prefix=`pwd`/ecl-android \
--with-cross-config=`pwd`/android.cross_config \
--disable-soname
make -j9
make install
#+END_SRC
4. Library and assets in the ecl-android directory are ready to run
on the Android system.

21
android.cross_config Normal file
View file

@ -0,0 +1,21 @@
CL_FIXNUM_TYPE=int
CL_FIXNUM_BITS=32
CL_FIXNUM_MAX=536870911L
CL_FIXNUM_MIN=-536870912L
CL_INT_BITS=32
CL_LONG_BITS=32
ECL_STACK_DIR=down
ECL_BIGENDIAN=no
ECL_NEWLINE=LF
ECL_FILE_CNT=2
ECL_STDINT_HEADER="#include <stdint.h>"
ECL_UINT8_T=uint8_t
ECL_UINT16_T=uint16_t
ECL_UINT32_T=uint32_t
ECL_UINT64_T=no
ECL_INT8_T=int8_t
ECL_INT16_T=int16_t
ECL_INT32_T=int32_t
ECL_INT64_T=no
ECL_LONG_LONG_BITS=no
ECL_WORKING_ENVIRON=yes