Hi!
I can solve the problem. i add in the makefile the next code:
examplecairo:examplecairo.c
$(CC) $^ -Wall `pkg-config --cflags --libs cairo directfb` -o $@

this way compile correctly


2015-04-23 11:18 GMT+02:00 Alejandro Vázquez <vazlup@gmail.com>:
Hi!,
i am trying the compile of a example for the library directFB and other for library cairo. I have isntall the libraries directFB and Cairo.
The first step: i create a new package type "src-make-prog".
2: copy the example "hello world" in the new file "helloworld*.c"
3: I modify the Makefile file  and i  add:
CFLAGS   = -g -Wall -O2 -MD `pkg-config --cflags directfb`
LDFLAGS  = -g -Wall -O2 `pkg-config --libs directfb`

for cairo is the same but the flags are:
CFLAGS   = -g -Wall -O2 -MD `pkg-config --cflags cairo`
LDFLAGS  = -g -Wall -O2 `pkg-config --libs cairo`

In both cases, the compiler say me: 
undefined reference to `DirectFBInit', etc...
undefined reference to `cairo_image_surface_create',etc...

Am I doing it the right way or I need something more to add?