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 \
34 # comment out to disable stats upload to gmond
36 bin_vpp_CFLAGS = @APICLI@
40 nobase_include_HEADERS += \
41 vpp/api/vpe_all_api_h.h \
42 vpp/api/vpe_msg_enum.h \
45 API_FILES += vpp/api/vpe.api
47 BUILT_SOURCES += .version
49 vpp/app/version.o: vpp/app/version.h
53 VPP_VERSION = $(shell $(srcdir)/scripts/version)
55 # update version.h only when version changes, to avoid
56 # unnecessary re-linking of vpp binary
59 @if [ "$$(cat .version 2> /dev/null)" != "$(VPP_VERSION)" ] ; then \
60 f="vpp/app/version.h" ;\
61 echo " VERSION $$f ($(VPP_VERSION))" ;\
62 echo $(VPP_VERSION) > .version ;\
63 echo "#define VPP_BUILD_DATE \"$$(date)\"" > $$f ;\
64 echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $$f ;\
65 echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $$f ;\
66 echo -n "#define VPP_BUILD_TOPDIR " >> $$f ;\
67 echo "\"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $$f ;\
68 echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\
72 # Generate a plugin configuration script. Misconfiguring a
73 # plugin can cause very subtle problems.
75 bin_SCRIPTS = vpp_plugin_configure
77 BUILT_SOURCES += vpp_plugin_configure
79 .PHONY: vpp_plugin_configure
82 PLUGIN_DPDK_ARG="--with-dpdk"
89 @echo "#!/bin/bash" > $@
93 @echo "if [ -f ./configure ] ; then" >> $@
94 @echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ./configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
96 @echo " if [ -f ../configure ] ; then" >> $@
97 @echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ../configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
99 @echo " echo Couldnt find ./configure or ../configure " >> $@
100 @echo " exit 1" >> $@
114 bin_vpp_LDFLAGS = $(DPDK_LD_FLAGS)
115 bin_vpp_LDADD += libvppinfra.la -lm -lpthread -ldl $(DPDK_LD_ADD)
117 noinst_PROGRAMS += bin/test_client
119 bin_test_client_SOURCES = \
120 vpp/api/test_client.c
122 bin_test_client_LDADD = \
123 libvlibmemoryclient.la \
129 noinst_PROGRAMS += bin/test_client bin/test_ha
131 bin_test_ha_SOURCES = \
134 bin_test_ha_LDADD = \
135 libvlibmemoryclient.la \
142 noinst_PROGRAMS += bin/summary_stats_client
144 bin_summary_stats_client_SOURCES = \
145 vpp/api/summary_stats_client.c
147 bin_summary_stats_client_LDADD = \
148 libvlibmemoryclient.la \
154 bin_PROGRAMS += bin/vpp_get_metrics
156 bin_vpp_get_metrics_SOURCES = \
157 vpp/api/vpp_get_metrics.c
159 bin_vpp_get_metrics_LDADD = \