Fixed vxlan link status.
[vpp.git] / vpp / Makefile.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 AUTOMAKE_OPTIONS = foreign subdir-objects
15
16 AM_CFLAGS = -Wall @DPDK@ @IPSEC@ @VCGN@ @IPV6SR@
17
18 noinst_PROGRAMS = 
19 BUILT_SOURCES =
20 bin_PROGRAMS = 
21 CLEANFILES = 
22
23 bin_PROGRAMS += vpp
24
25 vpp_SOURCES =                                   \
26   vnet/main.c                                   \
27   app/vpe_cli.c                                 \
28   app/version.c                                 \
29   oam/oam.c                                     \
30   stats/stats.c
31
32 vpp_SOURCES +=                                  \
33   api/api.c                                     \
34   api/custom_dump.c
35
36 # comment out to disable stats upload to gmond 
37
38 vpp_SOURCES +=                                  \
39   api/gmon.c    
40
41 nobase_include_HEADERS =                        \
42   api/vpe_all_api_h.h                           \
43   api/vpe_msg_enum.h                            \
44   api/vpe.api.h
45
46 # install the API definition, so we can produce java bindings, etc.
47
48 apidir = $(prefix)/api
49 api_DATA = api/vpe.api
50
51 BUILT_SOURCES += api/vpe.api.h app/version.h
52
53 app/version.o:  app/version.h
54
55 .PHONY: app/version.h
56
57 app/version.h:
58         @echo "  VERSION " $@ 
59         @echo "#define VPP_BUILD_DATE \"$$(date)\"" > $@
60         @echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $@
61         @echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $@
62         @echo "#define VPP_BUILD_TOPDIR \"$$(git rev-parse --show-toplevel)\""  >> $@
63         @echo "#define VPP_BUILD_VER \"$$(../../scripts/version)\"" >> $@
64
65 vpp_LDADD = -lvlibapi -lvlibmemory  -lvlib_unix -lvlib
66
67 vpp_LDADD += -lvnet
68
69 vpp_LDADD += -lsvm -lsvmdb -lrt
70
71 if WITH_DPDK
72 vpp_LDADD += -l:libdpdk.a
73 endif
74
75 vpp_LDADD += -lvppinfra -lm -lpthread -ldl
76
77 if WITH_IPV6SR
78   vpp_LDADD += -lcrypto
79 endif
80
81 SUFFIXES = .api.h .api
82
83 %.api.h: %.api
84         @echo "  APIGEN  " $@ ;                                 \
85         @mkdir -p `dirname $@` ;                                \
86         $(CC) $(CPPFLAGS) -E -P -C -x c $^                      \
87         | vppapigen --input - --output $@ --show-name $@
88
89
90 noinst_PROGRAMS += test_client test_ha
91
92 test_client_SOURCES = api/test_client.c
93 test_client_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
94         -lpthread -lm -lrt
95
96 test_ha_SOURCES = api/test_ha.c
97 test_ha_LDADD = -lvlibmemoryclient -lvlibapi -lsvmdb -lsvm -lvppinfra \
98                 -lpthread -lm -lrt
99
100 noinst_PROGRAMS += summary_stats_client
101
102 summary_stats_client_SOURCES = api/summary_stats_client.c
103 summary_stats_client_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
104         -lpthread -lm -lrt