3 # Experimental script, please consult with dmarion@me.com before
4 # submitting any changes
10 prefix_path=/opt/vpp/external/$(uname -m)/
15 VPP Build Configuration Script
21 --build-dir, -b Build directory
22 --install-dir, -i Install directory
23 --type, -t Build type (release, debug, ... )
24 --wipe, -w Wipe whole repo (except startup.* files)
35 if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
39 echo "Error: Argument for $1 is missing" >&2
44 if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
48 echo "Error: Argument for $1 is missing" >&2
53 if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
57 echo "Error: Argument for $1 is missing" >&2
62 git clean -fdx --exclude=startup.\*
65 -*|--*=) # unsupported flags
66 echo "Error: Unsupported flag $1" >&2
69 *) # preserve positional arguments
80 -DCMAKE_PREFIX_PATH=${prefix_path} \
81 -DCMAKE_INSTALL_PREFIX=${install_dir} \
82 -DCMAKE_BUILD_TYPE:STRING=${build_type}
86 Useful build commands:
89 ninja config Start build configuration TUI
90 ninja compdb Generate compile_commands.json
91 ninja run Runs VPP using startup.conf in the build directory
92 ninja debug Runs VPP inside GDB using startup.conf in the build directory
93 ninja pkg-deb Create .deb packages
94 ninja install Install VPP to $install_dir