stress: Remove essentially unused library.
[sliver-openvswitch.git] / lib / automake.mk
1 # Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicira, 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/bfd.c \
16         lib/bfd.h \
17         lib/bitmap.c \
18         lib/bitmap.h \
19         lib/bond.c \
20         lib/bond.h \
21         lib/bundle.c \
22         lib/bundle.h \
23         lib/byte-order.h \
24         lib/byteq.c \
25         lib/byteq.h \
26         lib/cfm.c \
27         lib/cfm.h \
28         lib/classifier.c \
29         lib/classifier.h \
30         lib/command-line.c \
31         lib/command-line.h \
32         lib/compiler.h \
33         lib/coverage.c \
34         lib/coverage.h \
35         lib/csum.c \
36         lib/csum.h \
37         lib/daemon.c \
38         lib/daemon.h \
39         lib/dhcp.h \
40         lib/dummy.c \
41         lib/dummy.h \
42         lib/dhparams.h \
43         lib/dirs.h \
44         lib/dpif-netdev.c \
45         lib/dpif-provider.h \
46         lib/dpif.c \
47         lib/dpif.h \
48         lib/heap.c \
49         lib/heap.h \
50         lib/dynamic-string.c \
51         lib/dynamic-string.h \
52         lib/entropy.c \
53         lib/entropy.h \
54         lib/fatal-signal.c \
55         lib/fatal-signal.h \
56         lib/flow.c \
57         lib/flow.h \
58         lib/hash.c \
59         lib/hash.h \
60         lib/hindex.c \
61         lib/hindex.h \
62         lib/hmap.c \
63         lib/hmap.h \
64         lib/hmapx.c \
65         lib/hmapx.h \
66         lib/jhash.c \
67         lib/jhash.h \
68         lib/json.c \
69         lib/json.h \
70         lib/jsonrpc.c \
71         lib/jsonrpc.h \
72         lib/lacp.c \
73         lib/lacp.h \
74         lib/learn.c \
75         lib/learn.h \
76         lib/learning-switch.c \
77         lib/learning-switch.h \
78         lib/list.c \
79         lib/list.h \
80         lib/lockfile.c \
81         lib/lockfile.h \
82         lib/mac-learning.c \
83         lib/mac-learning.h \
84         lib/match.c \
85         lib/match.h \
86         lib/memory.c \
87         lib/memory.h \
88         lib/meta-flow.c \
89         lib/meta-flow.h \
90         lib/multipath.c \
91         lib/multipath.h \
92         lib/netdev-dummy.c \
93         lib/netdev-provider.h \
94         lib/netdev-vport.c \
95         lib/netdev-vport.h \
96         lib/netdev.c \
97         lib/netdev.h \
98         lib/netflow.h \
99         lib/netlink.c \
100         lib/netlink.h \
101         lib/nx-match.c \
102         lib/nx-match.h \
103         lib/odp-execute.c \
104         lib/odp-execute.h \
105         lib/odp-util.c \
106         lib/odp-util.h \
107         lib/ofp-actions.c \
108         lib/ofp-actions.h \
109         lib/ofp-errors.c \
110         lib/ofp-errors.h \
111         lib/ofp-msgs.c \
112         lib/ofp-msgs.h \
113         lib/ofp-parse.c \
114         lib/ofp-parse.h \
115         lib/ofp-print.c \
116         lib/ofp-print.h \
117         lib/ofp-util.c \
118         lib/ofp-util.def \
119         lib/ofp-util.h \
120         lib/ofp-version-opt.h \
121         lib/ofp-version-opt.c \
122         lib/ofpbuf.c \
123         lib/ofpbuf.h \
124         lib/ovs-atomic-c11.h \
125         lib/ovs-atomic-gcc4+.c \
126         lib/ovs-atomic-gcc4+.h \
127         lib/ovs-atomic-gcc4.7+.h \
128         lib/ovs-atomic-pthreads.c \
129         lib/ovs-atomic-pthreads.h \
130         lib/ovs-atomic.h \
131         lib/ovs-thread.c \
132         lib/ovs-thread.h \
133         lib/ovsdb-data.c \
134         lib/ovsdb-data.h \
135         lib/ovsdb-error.c \
136         lib/ovsdb-error.h \
137         lib/ovsdb-idl-provider.h \
138         lib/ovsdb-idl.c \
139         lib/ovsdb-idl.h \
140         lib/ovsdb-parser.c \
141         lib/ovsdb-parser.h \
142         lib/ovsdb-types.c \
143         lib/ovsdb-types.h \
144         lib/packets.c \
145         lib/packets.h \
146         lib/pcap-file.c \
147         lib/pcap-file.h \
148         lib/poll-loop.c \
149         lib/poll-loop.h \
150         lib/process.c \
151         lib/process.h \
152         lib/random.c \
153         lib/random.h \
154         lib/rconn.c \
155         lib/rconn.h \
156         lib/reconnect.c \
157         lib/reconnect.h \
158         lib/sat-math.h \
159         lib/sha1.c \
160         lib/sha1.h \
161         lib/shash.c \
162         lib/shash.h \
163         lib/simap.c \
164         lib/simap.h \
165         lib/signals.c \
166         lib/signals.h \
167         lib/smap.c \
168         lib/smap.h \
169         lib/socket-util.c \
170         lib/socket-util.h \
171         lib/sort.c \
172         lib/sort.h \
173         lib/sset.c \
174         lib/sset.h \
175         lib/stp.c \
176         lib/stp.h \
177         lib/stream-fd.c \
178         lib/stream-fd.h \
179         lib/stream-provider.h \
180         lib/stream-ssl.h \
181         lib/stream-tcp.c \
182         lib/stream-unix.c \
183         lib/stream.c \
184         lib/stream.h \
185         lib/string.c \
186         lib/string.h \
187         lib/svec.c \
188         lib/svec.h \
189         lib/table.c \
190         lib/table.h \
191         lib/tag.c \
192         lib/tag.h \
193         lib/timer.c \
194         lib/timer.h \
195         lib/timeval.c \
196         lib/timeval.h \
197         lib/token-bucket.c \
198         lib/token-bucket.h \
199         lib/type-props.h \
200         lib/unaligned.h \
201         lib/unicode.c \
202         lib/unicode.h \
203         lib/unixctl.c \
204         lib/unixctl.h \
205         lib/util.c \
206         lib/util.h \
207         lib/uuid.c \
208         lib/uuid.h \
209         lib/valgrind.h \
210         lib/vconn-provider.h \
211         lib/vconn-stream.c \
212         lib/vconn.c \
213         lib/vconn.h \
214         lib/vlan-bitmap.c \
215         lib/vlan-bitmap.h \
216         lib/vlandev.c \
217         lib/vlandev.h \
218         lib/vlog.c \
219         lib/vlog.h \
220         lib/vswitch-idl.c \
221         lib/vswitch-idl.h
222
223 nodist_lib_libopenvswitch_a_SOURCES = \
224         lib/dirs.c
225 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
226
227 noinst_LIBRARIES += lib/libsflow.a
228 lib_libsflow_a_SOURCES = \
229         lib/sflow_api.h \
230         lib/sflow.h \
231         lib/sflow_agent.c \
232         lib/sflow_sampler.c \
233         lib/sflow_poller.c \
234         lib/sflow_receiver.c
235 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
236 if HAVE_WNO_UNUSED
237 lib_libsflow_a_CFLAGS += -Wno-unused
238 endif
239 if HAVE_WNO_UNUSED_PARAMETER
240 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
241 endif
242
243 if LINUX_DATAPATH
244 lib_libopenvswitch_a_SOURCES += \
245         lib/dpif-linux.c \
246         lib/dpif-linux.h \
247         lib/netdev-linux.c \
248         lib/netdev-linux.h \
249         lib/netlink-notifier.c \
250         lib/netlink-notifier.h \
251         lib/netlink-protocol.h \
252         lib/netlink-socket.c \
253         lib/netlink-socket.h \
254         lib/rtnetlink-link.c \
255         lib/rtnetlink-link.h \
256         lib/route-table.c \
257         lib/route-table.h
258 endif
259
260 if ESX
261 lib_libopenvswitch_a_SOURCES += \
262         lib/route-table-stub.c
263 endif
264
265 if HAVE_IF_DL
266 lib_libopenvswitch_a_SOURCES += \
267         lib/netdev-bsd.c \
268         lib/rtbsd.c \
269         lib/rtbsd.h \
270         lib/route-table-bsd.c
271 endif
272
273 if HAVE_OPENSSL
274 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
275 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
276 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
277         (echo '#include "lib/dhparams.h"' &&                            \
278          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
279          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
280          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
281         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
282         mv lib/dhparams.c.tmp lib/dhparams.c
283 else
284 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
285 endif
286
287 EXTRA_DIST += \
288         lib/dh1024.pem \
289         lib/dh2048.pem \
290         lib/dh4096.pem \
291         lib/dirs.c.in
292
293 MAN_FRAGMENTS += \
294         lib/common.man \
295         lib/common-syn.man \
296         lib/coverage-unixctl.man \
297         lib/daemon.man \
298         lib/daemon-syn.man \
299         lib/memory-unixctl.man \
300         lib/ofp-version.man \
301         lib/ovs.tmac \
302         lib/ssl-bootstrap.man \
303         lib/ssl-bootstrap-syn.man \
304         lib/ssl-peer-ca-cert.man \
305         lib/ssl.man \
306         lib/ssl-syn.man \
307         lib/table.man \
308         lib/unixctl.man \
309         lib/unixctl-syn.man \
310         lib/vconn-active.man \
311         lib/vconn-passive.man \
312         lib/vlog-unixctl.man \
313         lib/vlog-syn.man \
314         lib/vlog.man
315
316 # vswitch IDL
317 OVSIDL_BUILT += \
318         $(srcdir)/lib/vswitch-idl.c \
319         $(srcdir)/lib/vswitch-idl.h \
320         $(srcdir)/lib/vswitch-idl.ovsidl
321
322 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
323 VSWITCH_IDL_FILES = \
324         $(srcdir)/vswitchd/vswitch.ovsschema \
325         $(srcdir)/lib/vswitch-idl.ann
326 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
327         $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
328         mv $@.tmp $@
329
330 lib/dirs.c: lib/dirs.c.in Makefile
331         ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
332                 -e 's,[@]srcdir[@],$(srcdir),g' \
333                 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
334                 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
335                 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
336                 -e 's,[@]bindir[@],"$(bindir)",g' \
337                 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
338                 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
339              > lib/dirs.c.tmp
340         mv lib/dirs.c.tmp lib/dirs.c
341
342 $(srcdir)/lib/ofp-errors.inc: \
343         lib/ofp-errors.h include/openflow/openflow-common.h \
344         $(srcdir)/build-aux/extract-ofp-errors
345         $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
346                 $(srcdir)/lib/ofp-errors.h \
347                 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
348         mv $@.tmp $@
349 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
350 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
351
352 $(srcdir)/lib/ofp-msgs.inc: \
353         lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
354         $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
355                 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
356 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
357 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
358
359 INSTALL_DATA_LOCAL += lib-install-data-local
360 lib-install-data-local:
361         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
362         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
363         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
364         $(MKDIR_P) $(DESTDIR)$(DBDIR)
365
366 if !USE_LINKER_SECTIONS
367 # All distributed sources, with names adjust properly for referencing
368 # from $(builddir).
369 all_sources = \
370         `for file in $(DIST_SOURCES); do \
371                 if test -f $$file; then \
372                         echo $$file; \
373                 else \
374                         echo $(VPATH)/$$file; \
375                 fi; \
376          done`
377
378 lib/coverage.$(OBJEXT): lib/coverage.def
379 lib/coverage.def: $(DIST_SOURCES)
380         sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
381 CLEANFILES += lib/coverage.def
382
383 lib/vlog.$(OBJEXT): lib/vlog-modules.def
384 lib/vlog-modules.def: $(DIST_SOURCES)
385         sed -n 's|^VLOG_DEFINE_\(THIS_\)\{0,1\}MODULE(\([_a-zA-Z0-9]\{1,\}\)).*$$|VLOG_MODULE(\2)|p' $(all_sources) | LC_ALL=C sort -u > $@
386 CLEANFILES += lib/vlog-modules.def
387 endif