Building DirectFB
From DirectFBWiki
This page explains which steps you need to go from source to installed libraries. If your distribution already comes with precompiled packages, this still might be of interest if you are going to program with DirectFB: it will give you an idea of the way the libraries are connected, and maybe you will need to change the precompiled options.
| Table of contents |
Get the sources
The DirectFB webpage (http://www.directfb.org) is the place to get the sources. If you are interested in sharing your changes, you want to have a look at GIT access (http://www.directfb.org/index.php?path=Development%2FSource+Code%2FGIT+Access), which can give you the latest status. If you are only interested in a compressed archive with everything pre-packaged, check the Download section (http://www.directfb.org/index.php?path=Main%2FDownloads). It's are best off with the latest version of DirectFB, and the latest version of linux-fusion.
Build fusion
If you are planning to run multiple DirectFB applications simultaneously, you need to build the linux-fusion kernel module. You will also need the kernel headers for your DirectFB target. Have a look at the README (http://git.directfb.org/?p=core/linux-fusion.git;a=blob_plain;f=README;hb=HEAD) file in the fusion source code tree that you downloaded.
If you are making a build targeted for the PC your working on, the Makefile is already correct. If you are making a build for another target you need to cross compile. Please edit the top-level Makefile by hand and change the options listed at the top of the file. Then you can:
make make install
if you have appropriate priviliges. Afterwards make sure the module is insmod'ed (check with lsmod) and that your device nodes are created in /dev, as it is described in the README.
Build DirectFB
The GIT archive and the packaged releases are slightly different. The GIT archive does not have the ./configure script, so you will need to generate that by running ./autogen.sh which will accept the same commands as ./configure.
For building DirectFB, the best reference is the README (http://git.directfb.org/?p=core/DirectFB.git;a=blob_plain;f=README;hb=HEAD) file as provided in the sources. ./configure --help will list all the configuration options. Advisable is the option --enable-debug which is by default off. This will compile debug log code, which you can conditionally turn on by configuration in directfbrc.
Now you should be able to
make make install
further steps
If everything has installed correctly, some basic utilities are present. You should be able to run dfbinfo or dfbdump and get some meaningful output. You can now also build and install DirectFB-examples (http://www.directfb.org/index.php?path=Main%2FDownloads&page=1) which contain some example applications and some benchmarks.
