1.6 KiB
Compiling FreeType on Android using Termux
If you want to test FreeType on arm devices, compiling it on an Android phone is one of the easiest ways.
1. Compiling FreeType
-
Install and open termux
-
Update termux packages using:
pkg update pkg upgrade
Select
y
if any configuration changes are asked -
Install
git
:pkg install git
-
Install packages required for compilation:
pkg install automake autoconf libtool make clang binutils
-
Clone FreeType's git repository:
git clone https://gitlab.freedesktop.org/freetype/freetype.git
-
Enter into the source directory:
cd freetype/
-
Now you can compile FreeType according to INSTALL_UNIX.md:
./autogen.sh ./configure make -j$(nproc)
The compiled binaries can be accessed under
objs/.libs
2. Compiling FreeType Demo programs
If you need to test your changes you may want to use ft-demo programs. They can be compiled and run by follwing these steps:
-
First compile FreeType using the steps above.
-
Clone FreeType demos adjacent to the
freetype/
directory:git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git
i.e. If you can access FreeType repo under
~/freetype
, you should be able to access~/freetype-demos
. -
Enter into the ft-demos directory:
cd freetype-demos
-
Compile the programs:
make
-
The compiled binaries can be accessed and executed under
bin/
like:cd bin ./ftlint