Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 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 | |
Damjan Marion | cb034b9 | 2016-12-28 18:38:59 +0100 | [diff] [blame] | 82 | SUBDIRS += plugins |
| 83 | |
| 84 | if ENABLE_PAPI |
| 85 | SUBDIRS += vpp-api/python |
| 86 | endif |
| 87 | |
| 88 | if ENABLE_JAPI |
| 89 | SUBDIRS += vpp-api/java |
| 90 | endif |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 91 | |
| 92 | ############################################################################### |
| 93 | # API |
| 94 | ############################################################################### |
| 95 | |
| 96 | include suffix-rules.mk |
| 97 | |
| 98 | # Set the suffix list |
| 99 | apidir = $(prefix)/share/vpp/api/core |
| 100 | |
| 101 | api_DATA = \ |
| 102 | $(patsubst %.api,%.api.json,$(API_FILES)) |
| 103 | |
| 104 | BUILT_SOURCES += \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 105 | $(patsubst %.api,%.api.h,$(API_FILES)) |
| 106 | |
| 107 | endif # if ENABLE_VLIB |
| 108 | endif # if ENABLE_SVM |