Reorganize source tree to use single autotools instance
[vpp.git] / src / plugins / Makefile.am
1
2 # Copyright (c) <current-year> <your-organization>
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 AUTOMAKE_OPTIONS = foreign subdir-objects
16
17 AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir}
18 AM_LDFLAGS = -module -shared -avoid-version
19 SUFFIXES = .api.h .api .api.json
20 API_FILES =
21 BUILT_SOURCES =
22 vppplugins_LTLIBRARIES =
23 vppapitestplugins_LTLIBRARIES =
24 noinst_HEADERS =
25
26 vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
27 vpppluginsdir = ${libdir}/vpp_plugins
28
29 if ENABLE_FLOWPERPKT_PLUGIN
30 include flowperpkt.am
31 endif
32
33 if ENABLE_ILA_PLUGIN
34 include ila.am
35 endif
36
37 if ENABLE_SIXRD_PLUGIN
38 include sixrd.am
39 endif
40
41 include ../suffix-rules.mk
42
43 # Remove *.la files
44 install-data-hook:
45         @-(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
46         @-(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
47
48 ###############################################################################
49 # API
50 ###############################################################################
51
52 apidir = $(prefix)/share/vpp/api/plugins
53
54 api_DATA = \
55         $(patsubst %.api,%.api.json,$(API_FILES))
56
57 BUILT_SOURCES += \
58         $(patsubst %.api,%.api.json,$(API_FILES)) \
59         $(patsubst %.api,%.api.h,$(API_FILES))
60