mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
Change libbpf install location to fix "dirty" submodule
When installing libbpf headers into 'lib/libbpf/src/root/' then the git submodule for libbpf is marked dirty. This result in stgit complains under different operations. This patch fix the issue by installing libbpf outside submodule directory. Choose directory 'lib/libbpf-install/' to emphasize relation to 'lib/libbpf/'. V2: Don't install the library only the header files as before. Also installing the should be a separate commit. Patch still statically link with libbpf/src/libbpf.a. Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com>
This commit is contained in:
@@ -31,15 +31,18 @@ endif
|
||||
|
||||
# Detect submodule libbpf source file changes
|
||||
LIBBPF_SOURCES := $(wildcard libbpf/src/*.[ch])
|
||||
LIBBPF_INSTALL := libbpf-install
|
||||
INSTDIR=../../$(LIBBPF_INSTALL)
|
||||
|
||||
.PHONY: libbpf_clean
|
||||
libbpf/src/libbpf.a: $(LIBBPF_SOURCES)
|
||||
@echo ; echo " libbpf"
|
||||
$(QUIET_CC)$(MAKE) -C libbpf/src CFLAGS="$(LIBBPF_CFLAGS)" $P
|
||||
$(QUIET_INSTALL)$(MAKE) -C libbpf/src install_headers DESTDIR=root $P
|
||||
$(QUIET_INSTALL)$(MAKE) -C libbpf/src DESTDIR=$(INSTDIR) install_headers $P
|
||||
|
||||
libbpf_clean:
|
||||
$(Q)$(MAKE) -C libbpf/src clean $P
|
||||
$(Q)$(RM) -r $(LIBBPF_INSTALL)
|
||||
|
||||
else
|
||||
|
||||
|
Reference in New Issue
Block a user