netdev-linux: Fix off-by-one error dumping queue stats.
[openvswitch] / lib / automake.mk
1 # Copyright (C) 2009, 2010 Nicira Networks, Inc.
2 #
3 # Copying and distribution of this file, with or without modification,
4 # are permitted in any medium without royalty provided the copyright
5 # notice and this notice are preserved.  This file is offered as-is,
6 # without warranty of any kind.
7
8 noinst_LIBRARIES += lib/libopenvswitch.a
9
10 lib_libopenvswitch_a_SOURCES = \
11         lib/aes128.c \
12         lib/aes128.h \
13         lib/backtrace.c \
14         lib/backtrace.h \
15         lib/bitmap.c \
16         lib/bitmap.h \
17         lib/byteq.c \
18         lib/byteq.h \
19         lib/classifier.c \
20         lib/classifier.h \
21         lib/command-line.c \
22         lib/command-line.h \
23         lib/compiler.h \
24         lib/coverage.c \
25         lib/coverage.h \
26         lib/coverage-counters.h \
27         lib/csum.c \
28         lib/csum.h \
29         lib/daemon.c \
30         lib/daemon.h \
31         lib/dhcp-client.c \
32         lib/dhcp-client.h \
33         lib/dhcp.c \
34         lib/dhcp.h \
35         lib/dhparams.h \
36         lib/dirs.h \
37         lib/dpif-netdev.c \
38         lib/dpif-provider.h \
39         lib/dpif.c \
40         lib/dpif.h \
41         lib/dynamic-string.c \
42         lib/dynamic-string.h \
43         lib/entropy.c \
44         lib/entropy.h \
45         lib/fatal-signal.c \
46         lib/fatal-signal.h \
47         lib/flow.c \
48         lib/flow.h \
49         lib/hash.c \
50         lib/hash.h \
51         lib/hmap.c \
52         lib/hmap.h \
53         lib/json.c \
54         lib/json.h \
55         lib/jsonrpc.c \
56         lib/jsonrpc.h \
57         lib/leak-checker.c \
58         lib/leak-checker.h \
59         lib/learning-switch.c \
60         lib/learning-switch.h \
61         lib/list.c \
62         lib/list.h \
63         lib/lockfile.c \
64         lib/lockfile.h \
65         lib/mac-learning.c \
66         lib/mac-learning.h \
67         lib/netdev-provider.h \
68         lib/netdev.c \
69         lib/netdev.h \
70         lib/odp-util.c \
71         lib/odp-util.h \
72         lib/ofp-parse.c \
73         lib/ofp-parse.h \
74         lib/ofp-print.c \
75         lib/ofp-print.h \
76         lib/ofp-util.c \
77         lib/ofp-util.h \
78         lib/ofpbuf.c \
79         lib/ofpbuf.h \
80         lib/ovsdb-data.c \
81         lib/ovsdb-data.h \
82         lib/ovsdb-error.c \
83         lib/ovsdb-error.h \
84         lib/ovsdb-idl-provider.h \
85         lib/ovsdb-idl.c \
86         lib/ovsdb-idl.h \
87         lib/ovsdb-parser.c \
88         lib/ovsdb-parser.h \
89         lib/ovsdb-types.c \
90         lib/ovsdb-types.h \
91         lib/packets.c \
92         lib/packets.h \
93         lib/pcap.c \
94         lib/pcap.h \
95         lib/poll-loop.c \
96         lib/poll-loop.h \
97         lib/port-array.c \
98         lib/port-array.h \
99         lib/process.c \
100         lib/process.h \
101         lib/queue.c \
102         lib/queue.h \
103         lib/random.c \
104         lib/random.h \
105         lib/rconn.c \
106         lib/rconn.h \
107         lib/reconnect.c \
108         lib/reconnect.h \
109         lib/sat-math.h \
110         lib/sha1.c \
111         lib/sha1.h \
112         lib/shash.c \
113         lib/shash.h \
114         lib/signals.c \
115         lib/signals.h \
116         lib/socket-util.c \
117         lib/socket-util.h \
118         lib/sort.c \
119         lib/sort.h \
120         lib/stream-fd.c \
121         lib/stream-fd.h \
122         lib/stream-provider.h \
123         lib/stream-ssl.h \
124         lib/stream-tcp.c \
125         lib/stream-unix.c \
126         lib/stream.c \
127         lib/stream.h \
128         lib/string.h \
129         lib/svec.c \
130         lib/svec.h \
131         lib/tag.c \
132         lib/tag.h \
133         lib/timeval.c \
134         lib/timeval.h \
135         lib/type-props.h \
136         lib/unaligned.h \
137         lib/unicode.c \
138         lib/unicode.h \
139         lib/unixctl.c \
140         lib/unixctl.h \
141         lib/util.c \
142         lib/util.h \
143         lib/uuid.c \
144         lib/uuid.h \
145         lib/valgrind.h \
146         lib/vconn-provider.h \
147         lib/vconn-stream.c \
148         lib/vconn.c \
149         lib/vconn.h \
150         lib/vlog-modules.def \
151         lib/vlog.c \
152         lib/vlog.h \
153         lib/xtoxll.h
154 nodist_lib_libopenvswitch_a_SOURCES = \
155         lib/coverage-counters.c \
156         lib/dirs.c
157 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
158
159 noinst_LIBRARIES += lib/libsflow.a
160 lib_libsflow_a_SOURCES = \
161         lib/sflow_api.h \
162         lib/sflow.h \
163         lib/sflow_agent.c \
164         lib/sflow_sampler.c \
165         lib/sflow_poller.c \
166         lib/sflow_receiver.c
167 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
168 if HAVE_WNO_UNUSED
169 lib_libsflow_a_CFLAGS += -Wno-unused
170 endif
171 if HAVE_WNO_UNUSED_PARAMETER
172 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
173 endif
174
175 if HAVE_NETLINK
176 lib_libopenvswitch_a_SOURCES += \
177         lib/dpif-linux.c \
178         lib/netdev-linux.c \
179         lib/netdev-patch.c \
180         lib/netdev-tunnel.c \
181         lib/netdev-vport.c \
182         lib/netdev-vport.h \
183         lib/netlink-protocol.h \
184         lib/netlink.c \
185         lib/netlink.h \
186         lib/rtnetlink.c \
187         lib/rtnetlink.h
188 endif
189
190 if HAVE_OPENSSL
191 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
192 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
193 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
194         (echo '#include "lib/dhparams.h"' &&                            \
195          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
196          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
197          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
198         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
199         mv lib/dhparams.c.tmp lib/dhparams.c
200 endif
201
202 EXTRA_DIST += \
203         lib/dh1024.pem \
204         lib/dh2048.pem \
205         lib/dh4096.pem \
206         lib/dhparams.h
207
208 EXTRA_DIST += \
209         lib/common.man \
210         lib/common-syn.man \
211         lib/daemon.man \
212         lib/daemon-syn.man \
213         lib/dpif.man \
214         lib/leak-checker.man \
215         lib/ssl-bootstrap.man \
216         lib/ssl-bootstrap-syn.man \
217         lib/ssl-peer-ca-cert.man \
218         lib/ssl.man \
219         lib/ssl-syn.man \
220         lib/unixctl.man \
221         lib/unixctl-syn.man \
222         lib/vconn-active.man \
223         lib/vconn-passive.man \
224         lib/vlog-unixctl.man \
225         lib/vlog-syn.man \
226         lib/vlog.man
227
228
229 lib/dirs.c: Makefile
230         ($(ro_c) && \
231          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
232          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
233          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
234          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
235         mv lib/dirs.c.tmp lib/dirs.c
236
237 install-data-local: lib-install-data-local
238 lib-install-data-local:
239         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
240         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
241         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
242
243 # All the source files that have coverage counters.
244 COVERAGE_FILES = \
245         lib/dpif.c \
246         lib/flow.c \
247         lib/lockfile.c \
248         lib/hmap.c \
249         lib/mac-learning.c \
250         lib/netdev.c \
251         lib/netdev-linux.c \
252         lib/netlink.c \
253         lib/odp-util.c \
254         lib/poll-loop.c \
255         lib/process.c \
256         lib/rconn.c \
257         lib/rtnetlink.c \
258         lib/stream.c \
259         lib/stream-ssl.c \
260         lib/timeval.c \
261         lib/unixctl.c \
262         lib/util.c \
263         lib/vconn.c \
264         ofproto/ofproto.c \
265         ofproto/pktbuf.c \
266         vswitchd/bridge.c \
267         vswitchd/ovs-brcompatd.c
268 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
269         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
270         mv $@.tmp $@
271 EXTRA_DIST += lib/coverage-scan.pl
272
273 ALL_LOCAL += check-vlog-modules
274 check-vlog-modules:
275         cd $(srcdir) && build-aux/check-vlog-modules
276 .PHONY: check-vlog-modules
277 EXTRA_DIST += build-aux/check-vlog-modules