ipsec: allow null/null for crypto/integ algorithms pair
[vpp.git] / src / vpp.am
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:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
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.
13
14 bin_PROGRAMS += bin/vpp
15
16 bin_vpp_SOURCES =                               \
17   vpp/vnet/main.c                               \
18   vpp/app/vpe_cli.c                             \
19   vpp/app/version.c                             \
20   vpp/oam/oam.c                                 \
21   vpp/oam/oam_api.c                             \
22   vpp/stats/stats.c
23
24 bin_vpp_SOURCES +=                              \
25   vpp/api/api.c                                 \
26   vpp/api/custom_dump.c                         \
27   vpp/api/json_format.c
28
29 if WITH_APICLI
30   bin_vpp_SOURCES +=                            \
31   vpp/api/api_format.c                          \
32   vpp/api/api_main.c                            \
33   vpp/api/plugin.c                              \
34   vpp/api/plugin.h
35 endif
36
37 # uncomment to enable stats upload to gmond
38 # bin_vpp_SOURCES +=                            \
39 #  vpp/api/gmon.c
40
41 bin_vpp_CFLAGS = @APICLI@
42
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                         \
47   vpp/oam/oam.api.h                             \
48   vpp/api/vpe.api.h
49
50 API_FILES +=                                    \
51   vpp/api/vpe.api                               \
52   vpp/stats/stats.api                           \
53   vpp/oam/oam.api
54
55 BUILT_SOURCES += .version
56
57 vpp/app/version.o:      vpp/app/version.h
58
59 .PHONY: .version
60
61 VPP_VERSION = $(shell $(srcdir)/scripts/version)
62
63 VPP_BUILD_DATE ?= $$(date)
64 VPP_BUILD_USER ?= $$(whoami)
65 VPP_BUILD_HOST ?= $$(hostname)
66
67 # update version.h only when version changes, to avoid
68 # unnecessary re-linking of vpp binary
69
70 .version:
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                        ;\
81         fi
82
83 bin_vpp_LDADD = \
84   libvlibmemory.la \
85   libvlib.la \
86   libvnet.la \
87   libsvm.la \
88   libsvmdb.la \
89   libvppinfra.la \
90   -lrt -lm -lpthread -ldl
91
92 bin_vpp_LDFLAGS = -Wl,--export-dynamic
93
94 bin_PROGRAMS += bin/vppctl
95 bin_vppctl_SOURCES = vpp/app/vppctl.c
96 bin_vppctl_LDADD = libvppinfra.la
97
98 if ENABLE_TESTS
99 noinst_PROGRAMS += bin/test_client
100
101 bin_test_client_SOURCES = \
102   vpp/api/test_client.c
103
104 bin_test_client_LDADD = \
105   libvlibmemoryclient.la \
106   libsvm.la \
107   libvppinfra.la \
108   -lpthread -lm -lrt
109
110 noinst_PROGRAMS += bin/test_client bin/test_ha
111
112 bin_test_ha_SOURCES = \
113   vpp/api/test_ha.c
114
115 bin_test_ha_LDADD = \
116   libvlibmemoryclient.la \
117   libsvm.la \
118   libvppinfra.la \
119   -lpthread -lm -lrt
120 endif
121
122 noinst_PROGRAMS += bin/summary_stats_client
123
124 bin_summary_stats_client_SOURCES = \
125    vpp/api/summary_stats_client.c
126
127 bin_summary_stats_client_LDADD = \
128    libvlibmemoryclient.la \
129    libsvm.la \
130    libvppinfra.la \
131    -lpthread -lm -lrt
132
133 bin_PROGRAMS += bin/vpp_get_metrics
134
135 bin_vpp_get_metrics_SOURCES = \
136   vpp/api/vpp_get_metrics.c
137
138 bin_vpp_get_metrics_LDADD = \
139   libsvmdb.la \
140   libsvm.la \
141   libvppinfra.la \
142   -lpthread -lm -lrt
143
144 CLEANFILES += vpp/app/version.h
145
146 # vi:syntax=automake