From: Jakub Kicinski <hidden> Date: 2017-07-24 21:22:49
Install the bpf.h header to $(prefix)/include/bpf/ directory.
This is necessary to build standalone applications using libbpf,
without the need to clone the kernel sources and point to them.
Signed-off-by: Jakub Kicinski <redacted>
---
I'm not 100% sure if it's OK to export the header file and which
directory it should end up in (bpf/? libbpf/?).
tools/lib/bpf/Makefile | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2017-07-25 16:51:22
On 07/24/2017 11:22 PM, Jakub Kicinski wrote:
Install the bpf.h header to $(prefix)/include/bpf/ directory.
This is necessary to build standalone applications using libbpf,
without the need to clone the kernel sources and point to them.
Signed-off-by: Jakub Kicinski <redacted>
---
I'm not 100% sure if it's OK to export the header file and which
directory it should end up in (bpf/? libbpf/?).
Given the Makefile is heavily derived from tools/lib/traceevent/,
we should probably have a similar install_headers target instead,
in order to keep semantics similar. /include/bpf/ should be good.
From: Jakub Kicinski <hidden> Date: 2017-07-25 18:17:16
Add a new target to install the bpf.h header to $(prefix)/include/bpf/
directory. This is necessary to build standalone applications using
libbpf, without the need to clone the kernel sources and point to them.
Signed-off-by: Jakub Kicinski <redacted>
---
v2:
- make the header installation similar to tools/lib/traceevent (Daniel).
The functional change is that the header will not be installed as part
of make install, one has to make install_headers, which seems OK.
Out of curiosity - why are only "force elfdep bpfdep" added to the PHONY
target? Is there some Makefile magic that makes adding install* targets
there unnecessary? Or does the PHONY target just not matter in practice
so it's not updated?
tools/lib/bpf/Makefile | 4 ++++
1 file changed, 4 insertions(+)
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2017-07-25 19:45:31
On 07/25/2017 08:17 PM, Jakub Kicinski wrote:
Add a new target to install the bpf.h header to $(prefix)/include/bpf/
directory. This is necessary to build standalone applications using
libbpf, without the need to clone the kernel sources and point to them.
Signed-off-by: Jakub Kicinski <redacted>
Looks good to me, we might do the same for libbpf.h later on as
well, though the naming scheme is a confusing choice (bpf.h and
libbpf.h).
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
---
v2:
- make the header installation similar to tools/lib/traceevent (Daniel).
The functional change is that the header will not be installed as part
of make install, one has to make install_headers, which seems OK.
Out of curiosity - why are only "force elfdep bpfdep" added to the PHONY
target? Is there some Makefile magic that makes adding install* targets
there unnecessary? Or does the PHONY target just not matter in practice
so it's not updated?
Add a new target to install the bpf.h header to $(prefix)/include/bpf/
directory. This is necessary to build standalone applications using
libbpf, without the need to clone the kernel sources and point to them.
Signed-off-by: Jakub Kicinski <redacted>