Reorganize source tree to use single autotools instance
[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
21 AM_CFLAGS = -Wall
22
23 SUBDIRS = .
24 SUFFIXES = .api.h .api .api.json
25 API_FILES =
26 noinst_HEADERS =
27 dist_bin_SCRIPTS =
28 lib_LTLIBRARIES =
29 BUILT_SOURCES =
30
31 ###############################################################################
32 # DPDK
33 ###############################################################################
34
35 if WITH_DPDK
36 if ENABLE_DPDK_SHARED
37 DPDK_LD_FLAGS = -Wl,--whole-archive,-ldpdk,--no-whole-archive
38 else
39 DPDK_LD_FLAGS = -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive
40 endif
41 if WITH_DPDK_CRYPTO
42 DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
43 endif
44 if WITH_DPDK_MLX5_PMD
45 DPDK_LD_FLAGS += -libverbs -lmlx5 -lnuma
46 endif
47 else
48 DPDK_LD_FLAGS =
49 DPDK_LD_ADD =
50 endif
51
52 ###############################################################################
53 # Components
54 ###############################################################################
55
56 include vppinfra.am
57 include vppapigen.am
58
59 if ENABLE_PERFTOOL
60 include perftool.am
61 endif
62
63 if ENABLE_G2
64 include g2.am
65 endif
66
67 if ENABLE_SVM
68 include svm.am
69 endif
70
71 if ENABLE_VLIB
72 include vlib.am
73 endif
74
75 if ENABLE_SVM
76 if ENABLE_VLIB
77 include vlib-api.am
78 include vnet.am
79 include vpp.am
80 include vpp-api-test.am
81
82 SUBDIRS += vpp-api/python plugins
83
84 ###############################################################################
85 # API
86 ###############################################################################
87
88 include suffix-rules.mk
89
90 # Set the suffix list
91 apidir = $(prefix)/share/vpp/api/core
92
93 api_DATA = \
94         $(patsubst %.api,%.api.json,$(API_FILES))
95
96 BUILT_SOURCES += \
97         $(patsubst %.api,%.api.json,$(API_FILES)) \
98         $(patsubst %.api,%.api.h,$(API_FILES))
99
100 endif # if ENABLE_VLIB
101 endif # if ENABLE_SVM