Update install script.
This commit is contained in:
41
install.sh
41
install.sh
@@ -2,6 +2,8 @@
|
||||
LIBXDP=0
|
||||
INSTALL=1
|
||||
CLEAN=0
|
||||
OBJDUMP=0
|
||||
HELP=0
|
||||
STATIC=1
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
@@ -32,17 +34,14 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--help)
|
||||
echo "Usage: install.sh [OPTIONS]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " --libxdp Build and install LibXDP before building the tool."
|
||||
echo " --no-install Build the tool and/or LibXDP without installing them."
|
||||
echo " --clean Remove build files for the tool and LibXDP."
|
||||
echo " --no-static Do not statically link LibXDP and LibBPF object files when building the tool and rely on shared libraries (-lbpf and -lxdp flags)."
|
||||
echo " --help Display this help message."
|
||||
--objdump)
|
||||
OBJDUMP=1
|
||||
|
||||
exit 0
|
||||
shift
|
||||
;;
|
||||
|
||||
--help)
|
||||
HELP=1
|
||||
|
||||
shift
|
||||
;;
|
||||
@@ -53,6 +52,20 @@ while [[ $# -gt 0 ]]; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$HELP" -gt 0 ]; then
|
||||
echo "Usage: install.sh [OPTIONS]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " --libxdp Build and install LibXDP before building the tool."
|
||||
echo " --no-install Build the tool and/or LibXDP without installing them."
|
||||
echo " --clean Remove build files for the tool and LibXDP."
|
||||
echo " --no-static Do not statically link LibXDP and LibBPF object files when building the tool and rely on shared libraries (-lbpf and -lxdp flags)."
|
||||
echo " --objdump Dumps the XDP/BPF object file using 'llvm-objdump' to Assemby into 'objdump.asm'."
|
||||
echo " --help Display this help message."
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$CLEAN" -gt 0 ]; then
|
||||
if [ "$LIBXDP" -gt 0 ]; then
|
||||
echo "Cleaning LibXDP..."
|
||||
@@ -67,6 +80,14 @@ if [ "$CLEAN" -gt 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$OBJDUMP" -gt 0 ]; then
|
||||
echo "Dumping object file..."
|
||||
|
||||
./scripts/objdump.sh
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$LIBXDP" -gt 0 ]; then
|
||||
echo "Building LibXDP..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user