blob: b38c843fc5f5971c5a479709086eeb69280c383f [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# Copyright (c) 2015 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
14AUTOMAKE_OPTIONS = foreign subdir-objects
15
16AM_CFLAGS = -Wall @DPDK@
17
18PRE_DATA_SIZE=@PRE_DATA_SIZE@
19
20lib_LTLIBRARIES = libvlib.la
21
22BUILT_SOURCES = vlib/config.h
23
24vlib/config.h:
25 echo "#define __PRE_DATA_SIZE" $(PRE_DATA_SIZE) > $@
26
27libvlib_la_SOURCES = \
28 vlib/cli.c \
29 vlib/cli.h \
30 vlib/config.h \
31 vlib/counter.c \
32 vlib/error.c \
33 vlib/format.c \
34 vlib/init.c \
35 vlib/main.c \
36 vlib/mc.c \
37 vlib/node.c \
38 vlib/node_cli.c \
39 vlib/node_format.c \
40 vlib/threads.c \
41 vlib/trace.c
42
43if WITH_DPDK
44 libvlib_la_SOURCES += vlib/dpdk_buffer.c
45else
46 libvlib_la_SOURCES += vlib/buffer.c
47endif
48
49nobase_include_HEADERS = \
50 vlib/buffer_funcs.h \
51 vlib/buffer_node.h \
52 vlib/buffer.h \
53 vlib/cli.h \
54 vlib/cli_funcs.h \
55 vlib/config.h \
56 vlib/counter.h \
57 vlib/defs.h \
58 vlib/error_funcs.h \
59 vlib/error.h \
60 vlib/format_funcs.h \
61 vlib/global_funcs.h \
62 vlib/init.h \
63 vlib/main.h \
64 vlib/mc.h \
65 vlib/node_funcs.h \
66 vlib/node.h \
67 vlib/physmem.h \
68 vlib/threads.h \
69 vlib/trace_funcs.h \
70 vlib/trace.h \
71 vlib/vlib.h
72
73lib_LTLIBRARIES += libvlib_unix.la
74
75libvlib_unix_la_SOURCES = \
76 vlib/unix/cj.c \
77 vlib/unix/cli.c \
78 vlib/unix/input.c \
79 vlib/unix/main.c \
80 vlib/unix/mc_socket.c \
81 vlib/unix/plugin.c \
82 vlib/unix/plugin.h \
83 vlib/unix/physmem.c \
84 vlib/unix/unix.h
85
86nobase_include_HEADERS += \
87 vlib/unix/cj.h \
88 vlib/unix/mc_socket.h \
89 vlib/unix/physmem.h \
90 vlib/unix/plugin.h \
91 vlib/unix/unix.h
92
Damjan Marion2c29d752015-12-18 10:26:56 +010093if !WITH_DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -070094noinst_PROGRAMS = vlib_unix
95
96vlib_unix_SOURCES = \
97 example/main_stub.c \
98 example/mc_test.c
99
100vlib_unix_LDADD = libvlib_unix.la libvlib.la \
101 -lvppinfra -lpthread -lm -ldl -lrt
Damjan Marion2c29d752015-12-18 10:26:56 +0100102endif