VCL-LDPRELOAD: statically link vppcom into libvcl-ldpreload.so
[vpp.git] / src / vcl.am
1 # Copyright (c) 2017 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 lib_LTLIBRARIES += libvppcom.la libvcl_ldpreload.la
15
16 libvppcom_la_SOURCES =
17 libvcl_ldpreload_la_SOURCES =
18 libvppcom_la_DEPENDENCIES =     \
19         libvppinfra.la          \
20         libvlib.la              \
21         libsvmdb.la             \
22         libsvm.la               \
23         libvlibmemory.la        \
24         libvlibmemoryclient.la
25
26 libvcl_ldpreload_la_DEPENDENCIES = $(libvppcom_la_DEPENDENCIES)
27
28 libvppcom_la_LIBADD = $(libvppcom_la_DEPENDENCIES) -lpthread
29 libvcl_ldpreload_la_LIBADD = $(libvcl_ldpreload_la_DEPENDENCIES) -lpthread
30
31 libvppcom_la_SOURCES +=                         \
32   vcl/vppcom.c
33
34 nobase_include_HEADERS +=                       \
35   vcl/vppcom.h
36
37 libvcl_ldpreload_la_SOURCES +=                  \
38   vcl/vcom_socket_wrapper.c                     \
39   vcl/vcom.c                                    \
40   vcl/vcom_socket.c                             \
41   vcl/vppcom.c
42
43 nobase_include_HEADERS +=                       \
44   vcl/vcom_socket_wrapper.h                     \
45   vcl/vcom_glibc_socket.h                       \
46   vcl/vcom.h                                    \
47   vcl/vcom_socket.h
48
49 noinst_PROGRAMS +=                              \
50         vcl_test_server                         \
51         vcl_test_client                         \
52         sock_test_server                        \
53         sock_test_client
54
55 vcl_test_server_SOURCES = vcl/vcl_test_server.c
56 vcl_test_server_LDADD = libvppcom.la
57
58 vcl_test_client_SOURCES = vcl/vcl_test_client.c
59 vcl_test_client_LDADD = libvppcom.la
60
61 sock_test_server_SOURCES = vcl/sock_test_server.c
62 sock_test_client_SOURCES = vcl/sock_test_client.c
63
64 nobase_include_HEADERS +=                       \
65   vcl/sock_test.h