forked from rlane/ubpf
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactored and added steps for linux * libbpf build script for linux * refactored headings
- Loading branch information
1 parent
b0a1d98
commit 7acf505
Showing
2 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/bash | ||
# Copyright (c) Microsoft Corporation | ||
# SPDX-License-Identifier: MIT | ||
|
||
git clone /~https://github.com/libbpf/libbpf.git | ||
if [ $? -ne 0 ]; then | ||
echo "Could not clone the libbpf repository." | ||
exit 1 | ||
fi | ||
|
||
# Jump in to the src directory to do the actual build. | ||
cd libbpf/src | ||
|
||
make | ||
if [ $? -ne 0 ]; then | ||
echo "Could not build libbpf source." | ||
exit 1 | ||
fi | ||
|
||
# Now that the build was successful, install the library (shared | ||
# object and header files) in a spot where FindLibBpf.cmake can | ||
# find it when it is being built. | ||
sudo PREFIX=/usr LIBDIR=/usr/lib/x86_64-linux-gnu/ make install | ||
exit 0 |