aboutsummaryrefslogtreecommitdiffstats
path: root/extras/scripts/build_static_vppctl.sh
blob: 72408ade938629f0f44d77fa70a45e3f6a566cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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}