10-14-2013 01:56 PM - last edited on 11-01-2013 09:27 AM by doturner
Library name: libx264
Build system: autotools
First, make sure your environment is configured for command line development, and that you have autotools installed.
Changes to configure script
The QNX specific part of the configure script adds the 'extras' directory to the include path, but the files in there can only be compiled by Microsoft Visual studio. Fix this by opening configure, looking for the section starting with '*qnx*)' and commenting out the following line:
Configuring for QNX ARM (for devices)
./configure --host=arm-nto-qnx --cross-prefix=arm-unknown-nto-qnx8.0.0eabi- --disable-cli --enable-static --disable-asm --prefix=`pwd`/build/arm-qnx
Configuring for QNX x86 (for simulator)
./configure --host=x86-nto-qnx --cross-prefix=i486-pc-nto-qnx8.0.0- --disable-cli --enable-static --disable-asm --prefix=`pwd`/build/x86-qnx/
Configure flags explained
Here's what the configure flags do:
--host. This is used by the configure script to determine which host architecture we're building for. In this case the important part is: qnx. In configure you'll find a switch statement which matches *qnx* and sets up the build accordingly.
--cross-prefix. This identifies the prefix which should be used when calling the build tools. For example, instead of calling gcc, we'll call arm-unknown-nto-qnx8.0.0eabi-gcc.
--disable-cli. Don't build the command line interface. I've assumed that the library will be called directly when running on the device, rather than from the command line.
--enable-static. Build a static library. Also possible to create a shared library using --enable-shared
--disable-asm. Disable the platform specific assembler optimisation. Without this configure will look for yasm. But yasm isn't compatible with ARM so we cannot use it for optimisations.
make -j8 make install
Note: the -j flag simply specifies the number of cores I want to use during compilation. It can dramatically decrease build times.
Because I used the --prefix flag the library and header files will be installed under build/<qnx_variant>