acl: The ACL plugin.
[vpp.git] / plugins / acl-plugin / 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 AUTOMAKE_OPTIONS = foreign subdir-objects
15
16 AM_CFLAGS = -Wall
17 AM_LDFLAGS = -module -shared -avoid-version
18
19 vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
20 vpppluginsdir = ${libdir}/vpp_plugins
21
22 vppapitestplugins_LTLIBRARIES = acl_test_plugin.la
23 vppplugins_LTLIBRARIES = acl_plugin.la
24
25 acl_plugin_la_SOURCES =                         \
26         acl/acl.c                               \
27         acl/node_in.c                           \
28         acl/node_out.c                          \
29         acl/l2sess.c                            \
30         acl/l2sess_node.c                       \
31         acl/l2sess.h                            \
32         acl/acl_plugin.api.h
33
34 BUILT_SOURCES = acl/acl.api.h
35
36 SUFFIXES = .api.h .api
37
38 #
39 # ACL API
40 #
41 %.api.h: %.api
42         mkdir -p $(dir $@) ; \
43         $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
44         | vppapigen --input - --output $@ --show-name $@
45
46 apidir = $(prefix)/acl
47 api_DATA = acl/acl.api
48
49 noinst_HEADERS =                                \
50   acl/acl_all_api_h.h                           \
51   acl/acl_msg_enum.h                            \
52   acl/acl.api.h
53
54 acl_test_plugin_la_SOURCES = acl/acl_test.c acl/acl_plugin.api.h
55
56 # Remove *.la files
57 install-data-hook:
58         @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
59         @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))