Add pkg-config support and include compat/linux* in packaging
authorBrenden Blanco <bblanco@plumgrid.com>
Fri, 31 Jul 2015 20:04:16 +0000 (13:04 -0700)
committerBrenden Blanco <bblanco@plumgrid.com>
Fri, 31 Jul 2015 20:10:42 +0000 (13:10 -0700)
commite06f10a3eb83dab89857fe067bcf47edd397cbeb
treebc9398649ae85d0b7f690160d9935d0799b81974
parent8010bf23ccf0ef9acd6596e47d24c62629977af6
Add pkg-config support and include compat/linux* in packaging

Different kernel header versions has been a continuing source of pain.
Though I don't prefer this approach, it seems the most reliable way to
get a build (for the time being) is to bundle the linux/bpf*.h in a
compat directory in the target install location.

To get visibility into that compat directory from another library, one
will need to rely on pkg-config --cflags argument to pull in that compat
directory.

Future work will be to avoid bundling the compat directory if the
version of linux-libc-dev is high enough, or if the presence of the
result of 'make headers_install' from the running kernel can be
detected.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
src/cc/CMakeLists.txt
src/cc/libbpfprog.pc.in [new file with mode: 0644]
src/libbpf.h