blob: 5e24897255ade053c59e09815ea9bbf85b1b8ca4 [file] [log] [blame]
Damjan Marion7cd468a2016-12-19 23:05:39 +01001# 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
18AUTOMAKE_OPTIONS = foreign subdir-objects
19ACLOCAL_AMFLAGS = -I m4
Damjan Marion724f64c2017-01-11 11:11:00 +010020AM_LIBTOOLFLAGS = --quiet
Damjan Marion7cd468a2016-12-19 23:05:39 +010021
22AM_CFLAGS = -Wall
23
24SUBDIRS = .
25SUFFIXES = .api.h .api .api.json
26API_FILES =
27noinst_HEADERS =
28dist_bin_SCRIPTS =
29lib_LTLIBRARIES =
30BUILT_SOURCES =
Padraig Connolly69915cb2017-01-10 17:10:39 +000031install-data-local:
32 @echo "Building vppctl command list..."
33 @DIR_SEARCH="$(srcdir)" ; \
34 DIR_EXCLUDE="examples" ; \
35 GREP_TIME=`time (grep -wIr "\.path = " $$DIR_SEARCH --exclude-dir=$$DIR_EXCLUDE \
36 | cut -d '"' -f2 | sort -u > $(srcdir)/scripts/vppctl-cmd-list) 2>&1` ; \
37 GREP_TIME=`echo $$GREP_TIME | awk '{print $$2}'` ; \
38 echo "Command list built, Time taken: $$GREP_TIME"
Damjan Marion7cd468a2016-12-19 23:05:39 +010039
40###############################################################################
41# DPDK
42###############################################################################
43
44if WITH_DPDK
45if ENABLE_DPDK_SHARED
46DPDK_LD_FLAGS = -Wl,--whole-archive,-ldpdk,--no-whole-archive
47else
Damjan Marionc74a86a2017-01-16 14:00:03 +010048DPDK_LD_FLAGS = -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive,-lm,-ldl
Damjan Marion7cd468a2016-12-19 23:05:39 +010049endif
50if WITH_DPDK_CRYPTO
51DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
52endif
53if WITH_DPDK_MLX5_PMD
54DPDK_LD_FLAGS += -libverbs -lmlx5 -lnuma
55endif
56else
57DPDK_LD_FLAGS =
58DPDK_LD_ADD =
59endif
60
61###############################################################################
62# Components
63###############################################################################
64
65include vppinfra.am
66include vppapigen.am
67
68if ENABLE_PERFTOOL
69include perftool.am
70endif
71
72if ENABLE_G2
73include g2.am
74endif
75
76if ENABLE_SVM
77include svm.am
78endif
79
80if ENABLE_VLIB
81include vlib.am
82endif
83
84if ENABLE_SVM
85if ENABLE_VLIB
86include vlib-api.am
87include vnet.am
88include vpp.am
89include vpp-api-test.am
90
Damjan Marioncb034b92016-12-28 18:38:59 +010091SUBDIRS += plugins
92
93if ENABLE_PAPI
94SUBDIRS += vpp-api/python
95endif
96
97if ENABLE_JAPI
98SUBDIRS += vpp-api/java
99endif
Damjan Marion7cd468a2016-12-19 23:05:39 +0100100
101###############################################################################
102# API
103###############################################################################
104
105include suffix-rules.mk
106
107# Set the suffix list
108apidir = $(prefix)/share/vpp/api/core
109
110api_DATA = \
111 $(patsubst %.api,%.api.json,$(API_FILES))
112
113BUILT_SOURCES += \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100114 $(patsubst %.api,%.api.h,$(API_FILES))
115
116endif # if ENABLE_VLIB
117endif # if ENABLE_SVM