Add config option to use dlmalloc instead of mheap
[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 = @CPU_FLAGS@ @DLMALLOC@ -Wall
23 AM_CXXFLAGS = -Wall -std=gnu++11
24
25 SUBDIRS = .
26 SUFFIXES = .api.h .api .api.json
27 API_FILES =
28 noinst_HEADERS =
29 dist_bin_SCRIPTS =
30 lib_LTLIBRARIES =
31 BUILT_SOURCES =
32 CLEANFILES =
33 install-data-local:
34         @echo "Building vppctl command list..."
35         @DIR_SEARCH="$(srcdir)" ; \
36         DIR_EXCLUDE="examples" ; \
37         GREP_TIME=`time (grep -wIr "\.path = " $$DIR_SEARCH --exclude-dir=$$DIR_EXCLUDE \
38         | cut -d '"' -f2 | sort -u > $(srcdir)/scripts/vppctl-cmd-list) 2>&1` ; \
39         GREP_TIME=`echo $$GREP_TIME | awk '{print $$2}'` ; \
40         echo "Command list built, Time taken: $$GREP_TIME"
41
42 ###############################################################################
43 # Components
44 ###############################################################################
45
46 include vppinfra.am
47 include vppapigen.am
48
49 if ENABLE_PERFTOOL
50 include perftool.am
51 endif
52
53 if ENABLE_G2
54 include g2.am
55 endif
56
57 if ENABLE_SVM
58 include svm.am
59 endif
60
61 if ENABLE_VLIB
62 include vlib.am
63 endif
64
65 if ENABLE_SVM
66 if ENABLE_VLIB
67 include vlib-api.am
68 include vnet.am
69 include vpp.am
70 include vpp-api-test.am
71 include vcl.am
72
73 SUBDIRS += plugins
74 SUBDIRS += vpp-api/vapi
75
76 if ENABLE_PAPI
77 include vpp-api.am
78 SUBDIRS += vpp-api/python
79 endif
80
81 if ENABLE_JAPI
82 SUBDIRS += vpp-api/java
83 endif
84
85 ###############################################################################
86 # API
87 ###############################################################################
88
89 include suffix-rules.mk
90
91 # Set the suffix list
92 apidir = $(prefix)/share/vpp/api/core
93
94 api_DATA = \
95         $(patsubst %.api,%.api.json,$(API_FILES))
96
97 BUILT_SOURCES += \
98         $(patsubst %.api,%.api.h,$(API_FILES))
99
100 endif # if ENABLE_VLIB
101 endif # if ENABLE_SVM
102
103 CLEANFILES += $(BUILT_SOURCES) $(api_DATA)