diff options
author | Damjan Marion <damarion@cisco.com> | 2021-04-02 23:04:05 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2021-04-07 19:13:04 +0000 |
commit | 289c7f590e1ca80dde5638c109c738fe9b8f3eaf (patch) | |
tree | 10aa1e5acf89205a84a257afe27ac82460550b7c /extras | |
parent | 70e21976aa0303c037ef849f7859010c9d543fab (diff) |
misc: add build_static_vppctl.sh
Type: make
Change-Id: I47cf68ecd546cad05732a572579569594f96a1ff
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'extras')
-rwxr-xr-x | extras/scripts/build_static_vppctl.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/extras/scripts/build_static_vppctl.sh b/extras/scripts/build_static_vppctl.sh new file mode 100755 index 00000000000..72408ade938 --- /dev/null +++ b/extras/scripts/build_static_vppctl.sh @@ -0,0 +1,36 @@ +#/bin/env bash + +src=$(realpath $(dirname $0)/../..)/src +tmp=$(mktemp -d) +mkdir ${tmp}/vppinfra +touch ${tmp}/vppinfra/config.h + +${CC:-cc} \ + -O2 \ + -flto \ + -static \ + -I ${src} \ + -I ${tmp} \ + -DHAVE_MEMFD_CREATE \ + -DHAVE_GETCPU \ + ${src}/vppinfra/backtrace.c \ + ${src}/vppinfra/dlmalloc.c \ + ${src}/vppinfra/elf.c \ + ${src}/vppinfra/elf_clib.c \ + ${src}/vppinfra/error.c \ + ${src}/vppinfra/format.c \ + ${src}/vppinfra/hash.c \ + ${src}/vppinfra/mem.c \ + ${src}/vppinfra/mem_dlmalloc.c \ + ${src}/vppinfra/std-formats.c \ + ${src}/vppinfra/string.c \ + ${src}/vppinfra/socket.c \ + ${src}/vppinfra/vec.c \ + ${src}/vppinfra/unformat.c \ + ${src}/vppinfra/unix-misc.c \ + ${src}/vppinfra/linux/mem.c \ + ${src}/vpp/app/vppctl.c \ + -o vppctl + +rm ${tmp}/vppinfra/config.h +rmdir ${tmp}/vppinfra ${tmp} |