tests: Fix bug in ovsdb-server test suite.
[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-linux.c \
38         lib/dpif-netdev.c \
39         lib/dpif-provider.h \
40         lib/dpif.c \
41         lib/dpif.h \
42         lib/dynamic-string.c \
43         lib/dynamic-string.h \
44         lib/fatal-signal.c \
45         lib/fatal-signal.h \
46         lib/flow.c \
47         lib/flow.h \
48         lib/hash.c \
49         lib/hash.h \
50         lib/hmap.c \
51         lib/hmap.h \
52         lib/json.c \
53         lib/json.h \
54         lib/jsonrpc.c \
55         lib/jsonrpc.h \
56         lib/leak-checker.c \
57         lib/leak-checker.h \
58         lib/learning-switch.c \
59         lib/learning-switch.h \
60         lib/list.c \
61         lib/list.h \
62         lib/lockfile.c \
63         lib/lockfile.h \
64         lib/mac-learning.c \
65         lib/mac-learning.h \
66         lib/netdev-gre.c \
67         lib/netdev-linux.c \
68         lib/netdev-provider.h \
69         lib/netdev.c \
70         lib/netdev.h \
71         lib/odp-util.c \
72         lib/odp-util.h \
73         lib/ofp-print.c \
74         lib/ofp-print.h \
75         lib/ofpbuf.c \
76         lib/ofpbuf.h \
77         lib/ovsdb-data.c \
78         lib/ovsdb-data.h \
79         lib/ovsdb-error.c \
80         lib/ovsdb-error.h \
81         lib/ovsdb-idl-provider.h \
82         lib/ovsdb-idl.c \
83         lib/ovsdb-idl.h \
84         lib/ovsdb-parser.c \
85         lib/ovsdb-parser.h \
86         lib/ovsdb-types.c \
87         lib/ovsdb-types.h \
88         lib/packets.c \
89         lib/packets.h \
90         lib/pcap.c \
91         lib/pcap.h \
92         lib/poll-loop.c \
93         lib/poll-loop.h \
94         lib/port-array.c \
95         lib/port-array.h \
96         lib/process.c \
97         lib/process.h \
98         lib/queue.c \
99         lib/queue.h \
100         lib/random.c \
101         lib/random.h \
102         lib/rconn.c \
103         lib/rconn.h \
104         lib/reconnect.c \
105         lib/reconnect.h \
106         lib/rtnetlink.c \
107         lib/rtnetlink.h \
108         lib/sat-math.h \
109         lib/sha1.c \
110         lib/sha1.h \
111         lib/shash.c \
112         lib/shash.h \
113         lib/signals.c \
114         lib/signals.h \
115         lib/socket-util.c \
116         lib/socket-util.h \
117         lib/sort.c \
118         lib/sort.h \
119         lib/stp.c \
120         lib/stp.h \
121         lib/stream-fd.c \
122         lib/stream-fd.h \
123         lib/stream-provider.h \
124         lib/stream-ssl.h \
125         lib/stream-tcp.c \
126         lib/stream-unix.c \
127         lib/stream.c \
128         lib/stream.h \
129         lib/string.h \
130         lib/svec.c \
131         lib/svec.h \
132         lib/tag.c \
133         lib/tag.h \
134         lib/timeval.c \
135         lib/timeval.h \
136         lib/type-props.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
172 if HAVE_NETLINK
173 lib_libopenvswitch_a_SOURCES += \
174         lib/netlink-protocol.h \
175         lib/netlink.c \
176         lib/netlink.h
177 endif
178
179 if HAVE_OPENSSL
180 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
181 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
182 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
183         (echo '#include "lib/dhparams.h"' &&                            \
184          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
185          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
186          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
187         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
188         mv lib/dhparams.c.tmp lib/dhparams.c
189 endif
190
191 EXTRA_DIST += \
192         lib/dh1024.pem \
193         lib/dh2048.pem \
194         lib/dh4096.pem \
195         lib/dhparams.h
196
197 EXTRA_DIST += \
198         lib/common.man \
199         lib/common-syn.man \
200         lib/daemon.man \
201         lib/daemon-syn.man \
202         lib/dpif.man \
203         lib/leak-checker.man \
204         lib/ssl-bootstrap.man \
205         lib/ssl-bootstrap-syn.man \
206         lib/ssl-peer-ca-cert.man \
207         lib/ssl.man \
208         lib/ssl-syn.man \
209         lib/unixctl.man \
210         lib/unixctl-syn.man \
211         lib/vconn-active.man \
212         lib/vconn-passive.man \
213         lib/vlog-unixctl.man \
214         lib/vlog-syn.man \
215         lib/vlog.man
216
217
218 lib/dirs.c: Makefile
219         ($(ro_c) && \
220          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
221          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
222          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
223          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
224         mv lib/dirs.c.tmp lib/dirs.c
225
226 install-data-local:
227         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
228         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
229         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
230
231 # All the source files that have coverage counters.
232 COVERAGE_FILES = \
233         lib/dpif.c \
234         lib/flow.c \
235         lib/lockfile.c \
236         lib/hmap.c \
237         lib/mac-learning.c \
238         lib/netdev.c \
239         lib/netdev-linux.c \
240         lib/netlink.c \
241         lib/odp-util.c \
242         lib/poll-loop.c \
243         lib/process.c \
244         lib/rconn.c \
245         lib/rtnetlink.c \
246         lib/stream.c \
247         lib/timeval.c \
248         lib/unixctl.c \
249         lib/util.c \
250         lib/vconn.c \
251         ofproto/ofproto.c \
252         ofproto/pktbuf.c \
253         vswitchd/bridge.c \
254         vswitchd/ovs-brcompatd.c
255 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
256         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
257         mv $@.tmp $@
258 EXTRA_DIST += lib/coverage-scan.pl