06b575d1cc35df69d442bbf7b2c9abc3a4b54a64
[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 AM_LIBTOOLFLAGS = --quiet
20 SUFFIXES = .api.h .api .api.json
21 API_FILES =
22 BUILT_SOURCES =
23 vppplugins_LTLIBRARIES =
24 vppapitestplugins_LTLIBRARIES =
25 noinst_HEADERS =
26 nobase_apiinclude_HEADERS =
27
28 vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
29 vpppluginsdir = ${libdir}/vpp_plugins
30
31 if ENABLE_ACL_PLUGIN
32 include acl.am
33 endif
34
35 if ENABLE_FLOWPERPKT_PLUGIN
36 include flowperpkt.am
37 endif
38
39 if ENABLE_ILA_PLUGIN
40 include ila.am
41 endif
42
43 if ENABLE_IOAM_PLUGIN
44 include ioam.am
45 endif
46
47 if ENABLE_LB_PLUGIN
48 include lb.am
49 endif
50
51 if ENABLE_SIXRD_PLUGIN
52 include sixrd.am
53 endif
54
55 if ENABLE_SNAT_PLUGIN
56 include snat.am
57 endif
58
59 include ../suffix-rules.mk
60
61 # Remove *.la files
62 install-data-hook:
63         @-(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
64         @-(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
65
66 ###############################################################################
67 # API
68 ###############################################################################
69
70 apidir = $(prefix)/share/vpp/api/plugins
71 apiincludedir = ${includedir}/vpp_plugins
72
73 api_DATA = \
74         $(patsubst %.api,%.api.json,$(API_FILES))
75
76 BUILT_SOURCES += \
77         $(patsubst %.api,%.api.h,$(API_FILES))
78
79 CLEANFILES = $(BUILT_SOURCES) $(api_DATA)