@arooni/hawhill: The Makefile is slightly broken. Move $(LIBS) *after* the objects/binaries that depends on it in the commandline. (In this case, at the end). [And possibly get the correct CPPFLAGS/LDFLAGS/LIBS from pkgconfig].
@arooni: Also, PATH has nothing to do with gcc/ld searchpaths.
Patch attached for the simple fix
.
EDIT: And another one with pkg-config handling.
EDITē: And a few printf/include/warning fixes I hit on GCC 4.6.3/GLIBC 2.15 (take with a grain a salt, I suck at C, and it's 6:30 AM here ;D). (unistd is to pull sleep(), read is a shadowed varname, size_t/off_t printf fun times...)
.
EDIT^3: Kill the attachments, merged in v03
.