1 # Copyright (c) 2015 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 bin_PROGRAMS += bin/vpp
26 vpp/api/custom_dump.c \
31 vpp/api/api_format.c \
37 # uncomment to enable stats upload to gmond
38 # bin_vpp_SOURCES += \
41 bin_vpp_CFLAGS = @APICLI@
43 nobase_include_HEADERS += \
44 vpp/api/vpe_all_api_h.h \
45 vpp/api/vpe_msg_enum.h \
46 vpp/stats/stats.api.h \
55 BUILT_SOURCES += .version
57 vpp/app/version.o: vpp/app/version.h
61 VPP_VERSION = $(shell $(srcdir)/scripts/version)
63 VPP_BUILD_DATE ?= $$(date)
64 VPP_BUILD_USER ?= $$(whoami)
65 VPP_BUILD_HOST ?= $$(hostname)
67 # update version.h only when version changes, to avoid
68 # unnecessary re-linking of vpp binary
71 @if [ "$$(cat .version 2> /dev/null)" != "$(VPP_VERSION)" ] ; then \
72 f="vpp/app/version.h" ;\
73 echo " VERSION $$f ($(VPP_VERSION))" ;\
74 echo $(VPP_VERSION) > .version ;\
75 echo "#define VPP_BUILD_DATE \"$(VPP_BUILD_DATE)\"" > $$f ;\
76 echo "#define VPP_BUILD_USER \"$(VPP_BUILD_USER)\"" >> $$f ;\
77 echo "#define VPP_BUILD_HOST \"$(VPP_BUILD_HOST)\"" >> $$f ;\
78 echo -n "#define VPP_BUILD_TOPDIR " >> $$f ;\
79 echo "\"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $$f ;\
80 echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\
90 -lrt -lm -lpthread -ldl
92 bin_vpp_LDFLAGS = -Wl,--export-dynamic
94 bin_PROGRAMS += bin/vppctl
95 bin_vppctl_SOURCES = vpp/app/vppctl.c
96 bin_vppctl_LDADD = libvppinfra.la
99 noinst_PROGRAMS += bin/test_client
101 bin_test_client_SOURCES = \
102 vpp/api/test_client.c
104 bin_test_client_LDADD = \
105 libvlibmemoryclient.la \
110 noinst_PROGRAMS += bin/test_client bin/test_ha
112 bin_test_ha_SOURCES = \
115 bin_test_ha_LDADD = \
116 libvlibmemoryclient.la \
122 noinst_PROGRAMS += bin/summary_stats_client
124 bin_summary_stats_client_SOURCES = \
125 vpp/api/summary_stats_client.c
127 bin_summary_stats_client_LDADD = \
128 libvlibmemoryclient.la \
133 bin_PROGRAMS += bin/vpp_get_metrics
135 bin_vpp_get_metrics_SOURCES = \
136 vpp/api/vpp_get_metrics.c
138 bin_vpp_get_metrics_LDADD = \
144 CLEANFILES += vpp/app/version.h