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
25 vpp/api/custom_dump.c \
30 vpp/api/api_format.c \
36 # comment out to disable stats upload to gmond
38 bin_vpp_CFLAGS = @APICLI@
42 nobase_include_HEADERS += \
43 vpp/api/vpe_all_api_h.h \
44 vpp/api/vpe_msg_enum.h \
47 API_FILES += vpp/api/vpe.api
49 BUILT_SOURCES += .version
51 vpp/app/version.o: vpp/app/version.h
55 VPP_VERSION = $(shell $(srcdir)/scripts/version)
57 # update version.h only when version changes, to avoid
58 # unnecessary re-linking of vpp binary
61 @if [ "$$(cat .version 2> /dev/null)" != "$(VPP_VERSION)" ] ; then \
62 f="vpp/app/version.h" ;\
63 echo " VERSION $$f ($(VPP_VERSION))" ;\
64 echo $(VPP_VERSION) > .version ;\
65 echo "#define VPP_BUILD_DATE \"$$(date)\"" > $$f ;\
66 echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $$f ;\
67 echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $$f ;\
68 echo -n "#define VPP_BUILD_TOPDIR " >> $$f ;\
69 echo "\"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $$f ;\
70 echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\
80 -lrt -lm -lpthread -ldl
82 bin_vpp_LDFLAGS = -Wl,--export-dynamic
85 noinst_PROGRAMS += bin/test_client
87 bin_test_client_SOURCES = \
90 bin_test_client_LDADD = \
91 libvlibmemoryclient.la \
96 noinst_PROGRAMS += bin/test_client bin/test_ha
98 bin_test_ha_SOURCES = \
101 bin_test_ha_LDADD = \
102 libvlibmemoryclient.la \
109 noinst_PROGRAMS += bin/summary_stats_client
111 bin_summary_stats_client_SOURCES = \
112 vpp/api/summary_stats_client.c
114 bin_summary_stats_client_LDADD = \
115 libvlibmemoryclient.la \
120 bin_PROGRAMS += bin/vpp_get_metrics
122 bin_vpp_get_metrics_SOURCES = \
123 vpp/api/vpp_get_metrics.c
125 bin_vpp_get_metrics_LDADD = \
131 CLEANFILES += vpp/app/version.h