Monday, March 8, 2010

Porting Libraries

When porting exsisting programs to the DR1000, the program itself is mostly not the problem, but the libraries it needs are. From the MobileRead forum I gathered the following receipt:
I assume you will be working in an environment in which you succeeded to build hello-world.
1) Configure
./configure --host=arm-poky-linux-gnueabi --prefix=/usr
With this line you indicate that you are going to build for arm and that the root of the resulting files should go in the /usr folder.
2) Building
3) Creating the installables
make install DESTDIR=/home/user/mylib
cd /home/user/mylib
tar -czf mylib.tar.gz usr
This creates the stuff that is normally needed to install a library (.so .a) and to use it during building (.h).
4) installing in build environment
sudo tar -xzvf mylib.tar.gz -C /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/
This copies the libraries and header files into the correct place of the development environment.

You should now be able to use the library for porting other apps.

This ofcourse only works for libabries that come with a configure script.

No comments:

Post a Comment