ofproto: Remove controller discovery support.
[sliver-openvswitch.git] / lib / automake.mk
1 # Copyright (C) 2009, 2010, 2011 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/byte-order.h \
18         lib/byteq.c \
19         lib/byteq.h \
20         lib/cfm.c \
21         lib/cfm.h \
22         lib/classifier.c \
23         lib/classifier.h \
24         lib/command-line.c \
25         lib/command-line.h \
26         lib/compiler.h \
27         lib/coverage.c \
28         lib/coverage.h \
29         lib/csum.c \
30         lib/csum.h \
31         lib/daemon.c \
32         lib/daemon.h \
33         lib/dhcp.h \
34         lib/dummy.c \
35         lib/dummy.h \
36         lib/dhparams.h \
37         lib/dirs.h \
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/entropy.c \
45         lib/entropy.h \
46         lib/fatal-signal.c \
47         lib/fatal-signal.h \
48         lib/flow.c \
49         lib/flow.h \
50         lib/hash.c \
51         lib/hash.h \
52         lib/hmap.c \
53         lib/hmap.h \
54         lib/json.c \
55         lib/json.h \
56         lib/jsonrpc.c \
57         lib/jsonrpc.h \
58         lib/leak-checker.c \
59         lib/leak-checker.h \
60         lib/learning-switch.c \
61         lib/learning-switch.h \
62         lib/list.c \
63         lib/list.h \
64         lib/lockfile.c \
65         lib/lockfile.h \
66         lib/mac-learning.c \
67         lib/mac-learning.h \
68         lib/multipath.c \
69         lib/multipath.h \
70         lib/netdev-dummy.c \
71         lib/netdev-provider.h \
72         lib/netdev.c \
73         lib/netdev.h \
74         lib/netlink.c \
75         lib/netlink.h \
76         lib/nx-match.c \
77         lib/nx-match.def \
78         lib/nx-match.h \
79         lib/odp-util.c \
80         lib/odp-util.h \
81         lib/ofp-errors.c \
82         lib/ofp-errors.h \
83         lib/ofp-parse.c \
84         lib/ofp-parse.h \
85         lib/ofp-print.c \
86         lib/ofp-print.h \
87         lib/ofp-util.c \
88         lib/ofp-util.h \
89         lib/ofpbuf.c \
90         lib/ofpbuf.h \
91         lib/ovsdb-data.c \
92         lib/ovsdb-data.h \
93         lib/ovsdb-error.c \
94         lib/ovsdb-error.h \
95         lib/ovsdb-idl-provider.h \
96         lib/ovsdb-idl.c \
97         lib/ovsdb-idl.h \
98         lib/ovsdb-parser.c \
99         lib/ovsdb-parser.h \
100         lib/ovsdb-types.c \
101         lib/ovsdb-types.h \
102         lib/packets.c \
103         lib/packets.h \
104         lib/pcap.c \
105         lib/pcap.h \
106         lib/poll-loop.c \
107         lib/poll-loop.h \
108         lib/process.c \
109         lib/process.h \
110         lib/random.c \
111         lib/random.h \
112         lib/rconn.c \
113         lib/rconn.h \
114         lib/reconnect.c \
115         lib/reconnect.h \
116         lib/sat-math.h \
117         lib/sha1.c \
118         lib/sha1.h \
119         lib/shash.c \
120         lib/shash.h \
121         lib/signals.c \
122         lib/signals.h \
123         lib/socket-util.c \
124         lib/socket-util.h \
125         lib/sort.c \
126         lib/sort.h \
127         lib/stream-fd.c \
128         lib/stream-fd.h \
129         lib/stream-provider.h \
130         lib/stream-ssl.h \
131         lib/stream-tcp.c \
132         lib/stream-unix.c \
133         lib/stream.c \
134         lib/stream.h \
135         lib/stress.c \
136         lib/stress.h \
137         lib/string.c \
138         lib/string.h \
139         lib/svec.c \
140         lib/svec.h \
141         lib/table.c \
142         lib/table.h \
143         lib/tag.c \
144         lib/tag.h \
145         lib/timeval.c \
146         lib/timeval.h \
147         lib/type-props.h \
148         lib/unaligned.h \
149         lib/unicode.c \
150         lib/unicode.h \
151         lib/unixctl.c \
152         lib/unixctl.h \
153         lib/util.c \
154         lib/util.h \
155         lib/uuid.c \
156         lib/uuid.h \
157         lib/valgrind.h \
158         lib/vconn-provider.h \
159         lib/vconn-stream.c \
160         lib/vconn.c \
161         lib/vconn.h \
162         lib/vlog.c \
163         lib/vlog.h
164 nodist_lib_libopenvswitch_a_SOURCES = \
165         lib/dirs.c
166 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
167
168 noinst_LIBRARIES += lib/libsflow.a
169 lib_libsflow_a_SOURCES = \
170         lib/sflow_api.h \
171         lib/sflow.h \
172         lib/sflow_agent.c \
173         lib/sflow_sampler.c \
174         lib/sflow_poller.c \
175         lib/sflow_receiver.c
176 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
177 if HAVE_WNO_UNUSED
178 lib_libsflow_a_CFLAGS += -Wno-unused
179 endif
180 if HAVE_WNO_UNUSED_PARAMETER
181 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
182 endif
183
184 if HAVE_NETLINK
185 lib_libopenvswitch_a_SOURCES += \
186         lib/dpif-linux.c \
187         lib/dpif-linux.h \
188         lib/netdev-linux.c \
189         lib/netdev-vport.c \
190         lib/netdev-vport.h \
191         lib/netlink-protocol.h \
192         lib/netlink-socket.c \
193         lib/netlink-socket.h \
194         lib/rtnetlink.c \
195         lib/rtnetlink.h \
196         lib/rtnetlink-link.c \
197         lib/rtnetlink-link.h \
198         lib/route-table.c \
199         lib/route-table.h
200 endif
201
202 if HAVE_OPENSSL
203 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
204 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
205 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
206         (echo '#include "lib/dhparams.h"' &&                            \
207          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
208          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
209          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
210         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
211         mv lib/dhparams.c.tmp lib/dhparams.c
212 endif
213
214 EXTRA_DIST += \
215         lib/dh1024.pem \
216         lib/dh2048.pem \
217         lib/dh4096.pem \
218         lib/dirs.c.in
219
220 EXTRA_DIST += \
221         lib/common.man \
222         lib/common-syn.man \
223         lib/daemon.man \
224         lib/daemon-syn.man \
225         lib/leak-checker.man \
226         lib/ssl-bootstrap.man \
227         lib/ssl-bootstrap-syn.man \
228         lib/ssl-peer-ca-cert.man \
229         lib/ssl.man \
230         lib/ssl-syn.man \
231         lib/stress-unixctl.man \
232         lib/table.man \
233         lib/unixctl.man \
234         lib/unixctl-syn.man \
235         lib/vconn-active.man \
236         lib/vconn-passive.man \
237         lib/vlog-unixctl.man \
238         lib/vlog-syn.man \
239         lib/vlog.man
240
241 lib/dirs.c: lib/dirs.c.in Makefile
242         ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
243                 -e 's,[@]srcdir[@],$(srcdir),g' \
244                 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
245                 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
246                 -e 's,[@]bindir[@],"$(bindir)",g' \
247                 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
248              > lib/dirs.c.tmp
249         mv lib/dirs.c.tmp lib/dirs.c
250
251 $(srcdir)/lib/ofp-errors.c: \
252         include/openflow/openflow.h include/openflow/nicira-ext.h \
253         build-aux/extract-ofp-errors
254         cd $(srcdir)/include && \
255         $(PYTHON) ../build-aux/extract-ofp-errors \
256                 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
257 EXTRA_DIST += build-aux/extract-ofp-errors
258
259 install-data-local: lib-install-data-local
260 lib-install-data-local:
261         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
262         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
263         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
264
265 if !USE_LINKER_SECTIONS
266 # All distributed sources, with names adjust properly for referencing
267 # from $(builddir).
268 all_sources = \
269         `for file in $(DIST_SOURCES); do \
270                 if test -f $$file; then \
271                         echo $$file; \
272                 else \
273                         echo $(VPATH)/$$file; \
274                 fi; \
275          done`
276
277 lib/coverage.$(OBJEXT): lib/coverage.def
278 lib/coverage.def: $(DIST_SOURCES)
279         sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
280 CLEANFILES += lib/coverage.def
281
282 lib/stress.$(OBJEXT): lib/stress.def
283 lib/stress.def: $(DIST_SOURCES)
284         sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
285 CLEANFILES += lib/stress.def
286
287 lib/vlog.$(OBJEXT): lib/vlog-modules.def
288 lib/vlog-modules.def: $(DIST_SOURCES)
289         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 > $@
290 CLEANFILES += lib/vlog-modules.def
291 endif