makefile: support libbpf symbol versioning in shared library mode

Similarly to Linux's 1bd63524593b ("libbpf: handle symbol versioning properly
for libbpf.a"), add necessary changes to build static and shared object
files separately with extra shared library flags. This allows to
properly handle symbol versioning in shared library mode, while still
having statically linkable library.

Cc: Yonghong Song <yhs@fb.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This commit is contained in:
Andrii Nakryiko
2019-09-30 20:41:39 -07:00
committed by Andrii Nakryiko
parent 886e8149a0
commit 8b2782a1f2
2 changed files with 29 additions and 17 deletions

2
src/.gitignore vendored
View File

@@ -2,3 +2,5 @@
*.a
/libbpf.pc
/libbpf.so*
/staticobjs
/sharedobjs