Makefile.am cleanup
[vpp.git] / src / Makefile.am
1 # Copyright (c) 2016 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 ###############################################################################
15 # Global Defines
16 ###############################################################################
17
18 AUTOMAKE_OPTIONS = foreign subdir-objects
19 ACLOCAL_AMFLAGS = -I m4
20 AM_LIBTOOLFLAGS = --quiet
21
22 AM_CFLAGS = -Wall
23
24 SUBDIRS = .
25 SUFFIXES = .api.h .api .api.json
26 API_FILES =
27 noinst_HEADERS =
28 dist_bin_SCRIPTS =
29 lib_LTLIBRARIES =
30 BUILT_SOURCES =
31
32 ###############################################################################
33 # DPDK
34 ###############################################################################
35
36 if WITH_DPDK
37 if ENABLE_DPDK_SHARED
38 DPDK_LD_FLAGS = -Wl,--whole-archive,-ldpdk,--no-whole-archive
39 else
40 DPDK_LD_FLAGS = -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive
41 endif
42 if WITH_DPDK_CRYPTO
43 DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
44 endif
45 if WITH_DPDK_MLX5_PMD
46 DPDK_LD_FLAGS += -libverbs -lmlx5 -lnuma
47 endif
48 else
49 DPDK_LD_FLAGS =
50 DPDK_LD_ADD =
51 endif
52
53 ###############################################################################
54 # Components
55 ###############################################################################
56
57 include vppinfra.am
58 include vppapigen.am
59
60 if ENABLE_PERFTOOL
61 include perftool.am
62 endif
63
64 if ENABLE_G2
65 include g2.am
66 endif
67
68 if ENABLE_SVM
69 include svm.am
70 endif
71
72 if ENABLE_VLIB
73 include vlib.am
74 endif
75
76 if ENABLE_SVM
77 if ENABLE_VLIB
78 include vlib-api.am
79 include vnet.am
80 include vpp.am
81 include vpp-api-test.am
82
83 SUBDIRS += plugins
84
85 if ENABLE_PAPI
86 SUBDIRS += vpp-api/python
87 endif
88
89 if ENABLE_JAPI
90 SUBDIRS += vpp-api/java
91 endif
92
93 ###############################################################################
94 # API
95 ###############################################################################
96
97 include suffix-rules.mk
98
99 # Set the suffix list
100 apidir = $(prefix)/share/vpp/api/core
101
102 api_DATA = \
103         $(patsubst %.api,%.api.json,$(API_FILES))
104
105 BUILT_SOURCES += \
106         $(patsubst %.api,%.api.h,$(API_FILES))
107
108 endif # if ENABLE_VLIB
109 endif # if ENABLE_SVM