RIOT-OS/RIOT — pull request #630 by benpicco (2014-02-06 00:53:39+00:00)
Title: [RFC] add oonf_api to pkg

This adds OLSRs oonf_api as a RIOT package. oonf_api provides a rfc5444 reader/writer as well as utilities such as an avl tree, a flexible buffer, a double linked list as well as address abstraction (IPv4/Ipv6/MAC - not very necessary on RIOT) and string functions.
The package provides three modules, oonf_common, oonf_rfc5444 (depends on oonf_common) and cunit for unit tests.
This package pulls in the whole of oonf_api from git, but the majority of the code (OS abstraction, config framework, telnet and webserver, …) is neither required nor functional on RIOT, so it's ignored by the build system.
The only folders of interest are:

dir | use
---------------------|-----
src-api/common | library functions
src-api/rfc5444 | rfc5444 reader/writer
tests/cunit | cunit test framework
tests/common | unit tests for common (run `generate_makefiles.sh`)
tests/rfc5444 | unit tests for rfc5444 (run `generate_makefiles.sh`)
examples/rfc5444_reader_writer | example application

Usage is a bit cumbersome because of the include paths, as seen in https://github.com/benpicco/tiny_olsr2/blob/master/Makefile

EXTERNAL_MODULES +=$(RIOTBASE)/pkg/oonf_api
USEMODULE += oonf_common
USEMODULE += oonf_rfc5444
INCLUDES += -I$(RIOTBASE)/pkg/oonf_api/oonf_api/src-api

Also, build order is important, modules that depend on this won't find includes unless the pkg is build, aka checked out and patched.

I'm welcome for suggestions on how to improve this.