]> git.proxmox.com Git - ovs.git/blame - lib/automake.mk
Initial OpenFlow 1.3 support
[ovs.git] / lib / automake.mk
CommitLineData
e0edde6f 1# Copyright (C) 2009, 2010, 2011, 2012 Nicira, Inc.
a14bc59f
BP
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
064af421
BP
8noinst_LIBRARIES += lib/libopenvswitch.a
9
10lib_libopenvswitch_a_SOURCES = \
d918d9d1
BP
11 lib/aes128.c \
12 lib/aes128.h \
3b6a2571
EJ
13 lib/autopath.c \
14 lib/autopath.h \
064af421
BP
15 lib/backtrace.c \
16 lib/backtrace.h \
17 lib/bitmap.c \
18 lib/bitmap.h \
f620b43a
BP
19 lib/bond.c \
20 lib/bond.h \
daff3353
EJ
21 lib/bundle.c \
22 lib/bundle.h \
10a24935 23 lib/byte-order.h \
1c617a49
BP
24 lib/byteq.c \
25 lib/byteq.h \
b31bcf60
EJ
26 lib/cfm.c \
27 lib/cfm.h \
064af421
BP
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 \
064af421
BP
35 lib/csum.c \
36 lib/csum.h \
37 lib/daemon.c \
38 lib/daemon.h \
195c8086 39 lib/dhcp.h \
614c4892
BP
40 lib/dummy.c \
41 lib/dummy.h \
064af421 42 lib/dhparams.h \
064af421 43 lib/dirs.h \
72865317 44 lib/dpif-netdev.c \
96fba48f
BP
45 lib/dpif-provider.h \
46 lib/dpif.c \
47 lib/dpif.h \
95974447
BP
48 lib/heap.c \
49 lib/heap.h \
064af421
BP
50 lib/dynamic-string.c \
51 lib/dynamic-string.h \
e251c8d0
BP
52 lib/entropy.c \
53 lib/entropy.h \
064af421
BP
54 lib/fatal-signal.c \
55 lib/fatal-signal.h \
064af421
BP
56 lib/flow.c \
57 lib/flow.h \
58 lib/hash.c \
59 lib/hash.h \
60 lib/hmap.c \
61 lib/hmap.h \
f4ac3fc1
BP
62 lib/hmapx.c \
63 lib/hmapx.h \
f38b84ea
BP
64 lib/json.c \
65 lib/json.h \
f2129093
BP
66 lib/jsonrpc.c \
67 lib/jsonrpc.h \
6aa74308
EJ
68 lib/lacp.c \
69 lib/lacp.h \
064af421
BP
70 lib/leak-checker.c \
71 lib/leak-checker.h \
75a75043
BP
72 lib/learn.c \
73 lib/learn.h \
064af421
BP
74 lib/learning-switch.c \
75 lib/learning-switch.h \
76 lib/list.c \
77 lib/list.h \
ac718c9d
BP
78 lib/lockfile.c \
79 lib/lockfile.h \
064af421
BP
80 lib/mac-learning.c \
81 lib/mac-learning.h \
81a76618
BP
82 lib/match.c \
83 lib/match.h \
0d085684
BP
84 lib/memory.c \
85 lib/memory.h \
6a885fd0
BP
86 lib/meta-flow.c \
87 lib/meta-flow.h \
53ddd40a
BP
88 lib/multipath.c \
89 lib/multipath.h \
614c4892 90 lib/netdev-dummy.c \
5146acb1 91 lib/netdev-provider.h \
064af421
BP
92 lib/netdev.c \
93 lib/netdev.h \
9c8e276e 94 lib/netflow.h \
2fe27d5a
BP
95 lib/netlink.c \
96 lib/netlink.h \
09246b99
BP
97 lib/nx-match.c \
98 lib/nx-match.h \
064af421
BP
99 lib/odp-util.c \
100 lib/odp-util.h \
f25d0cf3
BP
101 lib/ofp-actions.c \
102 lib/ofp-actions.h \
dc4762ed
BP
103 lib/ofp-errors.c \
104 lib/ofp-errors.h \
982697a4
BP
105 lib/ofp-msgs.c \
106 lib/ofp-msgs.h \
f22716dc
JP
107 lib/ofp-parse.c \
108 lib/ofp-parse.h \
064af421
BP
109 lib/ofp-print.c \
110 lib/ofp-print.h \
fa37b408 111 lib/ofp-util.c \
e23ae585 112 lib/ofp-util.def \
fa37b408 113 lib/ofp-util.h \
064af421
BP
114 lib/ofpbuf.c \
115 lib/ofpbuf.h \
f85f8ebb
BP
116 lib/ovsdb-data.c \
117 lib/ovsdb-data.h \
118 lib/ovsdb-error.c \
119 lib/ovsdb-error.h \
c3bb4bd7
BP
120 lib/ovsdb-idl-provider.h \
121 lib/ovsdb-idl.c \
122 lib/ovsdb-idl.h \
f85f8ebb
BP
123 lib/ovsdb-parser.c \
124 lib/ovsdb-parser.h \
125 lib/ovsdb-types.c \
126 lib/ovsdb-types.h \
b9e8b45a 127 lib/packets.c \
064af421
BP
128 lib/packets.h \
129 lib/pcap.c \
130 lib/pcap.h \
131 lib/poll-loop.c \
132 lib/poll-loop.h \
064af421
BP
133 lib/process.c \
134 lib/process.h \
064af421
BP
135 lib/random.c \
136 lib/random.h \
137 lib/rconn.c \
138 lib/rconn.h \
3ed497fc
BP
139 lib/reconnect.c \
140 lib/reconnect.h \
064af421
BP
141 lib/sat-math.h \
142 lib/sha1.c \
143 lib/sha1.h \
144 lib/shash.c \
145 lib/shash.h \
44bac24b
BP
146 lib/simap.c \
147 lib/simap.h \
064af421
BP
148 lib/signals.c \
149 lib/signals.h \
79f1cbe9
EJ
150 lib/smap.c \
151 lib/smap.h \
064af421
BP
152 lib/socket-util.c \
153 lib/socket-util.h \
f85f8ebb
BP
154 lib/sort.c \
155 lib/sort.h \
f391294f
BP
156 lib/sset.c \
157 lib/sset.h \
829a7d02
JP
158 lib/stp.c \
159 lib/stp.h \
c34b65c7
BP
160 lib/stream-fd.c \
161 lib/stream-fd.h \
162 lib/stream-provider.h \
9467fe62 163 lib/stream-ssl.h \
c34b65c7
BP
164 lib/stream-tcp.c \
165 lib/stream-unix.c \
166 lib/stream.c \
167 lib/stream.h \
cc01d0bb
BP
168 lib/stress.c \
169 lib/stress.h \
71d7c22f 170 lib/string.c \
59462465 171 lib/string.h \
064af421
BP
172 lib/svec.c \
173 lib/svec.h \
3a3eb9da
BP
174 lib/table.c \
175 lib/table.h \
064af421
BP
176 lib/tag.c \
177 lib/tag.h \
8650b075
EJ
178 lib/timer.c \
179 lib/timer.h \
064af421
BP
180 lib/timeval.c \
181 lib/timeval.h \
648f4f1f
BP
182 lib/token-bucket.c \
183 lib/token-bucket.h \
064af421 184 lib/type-props.h \
afa3a931 185 lib/unaligned.h \
f38b84ea
BP
186 lib/unicode.c \
187 lib/unicode.h \
fa0361b7
GG
188 lib/unixctl.c \
189 lib/unixctl.h \
064af421
BP
190 lib/util.c \
191 lib/util.h \
fa0361b7
GG
192 lib/uuid.c \
193 lib/uuid.h \
064af421
BP
194 lib/valgrind.h \
195 lib/vconn-provider.h \
064af421 196 lib/vconn-stream.c \
064af421
BP
197 lib/vconn.c \
198 lib/vconn.h \
0fb7b915
BP
199 lib/vlan-bitmap.c \
200 lib/vlan-bitmap.h \
025e874a
BP
201 lib/vlandev.c \
202 lib/vlandev.h \
064af421 203 lib/vlog.c \
6e037e3c
EJ
204 lib/vlog.h \
205 lib/vswitch-idl.c \
70e4e586
BP
206 lib/vswitch-idl.h \
207 lib/worker.c \
208 lib/worker.h
6e037e3c 209
424d1282
BP
210nodist_lib_libopenvswitch_a_SOURCES = \
211 lib/dirs.c
212CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
064af421 213
c72e245a
BP
214noinst_LIBRARIES += lib/libsflow.a
215lib_libsflow_a_SOURCES = \
216 lib/sflow_api.h \
217 lib/sflow.h \
218 lib/sflow_agent.c \
219 lib/sflow_sampler.c \
220 lib/sflow_poller.c \
221 lib/sflow_receiver.c
222lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
223if HAVE_WNO_UNUSED
224lib_libsflow_a_CFLAGS += -Wno-unused
225endif
52af5b99
BP
226if HAVE_WNO_UNUSED_PARAMETER
227lib_libsflow_a_CFLAGS += -Wno-unused-parameter
228endif
c72e245a 229
361906b1 230if LINUX_DATAPATH
064af421 231lib_libopenvswitch_a_SOURCES += \
c83cdd30 232 lib/dpif-linux.c \
9fe3b9a2 233 lib/dpif-linux.h \
c83cdd30 234 lib/netdev-linux.c \
d3980822 235 lib/netdev-linux.h \
c83cdd30
BP
236 lib/netdev-vport.c \
237 lib/netdev-vport.h \
45c8d3a1
EJ
238 lib/netlink-notifier.c \
239 lib/netlink-notifier.h \
064af421 240 lib/netlink-protocol.h \
2fe27d5a
BP
241 lib/netlink-socket.c \
242 lib/netlink-socket.h \
21d6e22e 243 lib/rtnetlink-link.c \
ea83a2fc 244 lib/rtnetlink-link.h \
a132aa96
EJ
245 lib/route-table.c \
246 lib/route-table.h
064af421
BP
247endif
248
361906b1
EJ
249if ESX
250lib_libopenvswitch_a_SOURCES += \
251 lib/route-table-stub.c
252endif
253
9360d9b7
EM
254if HAVE_IF_DL
255lib_libopenvswitch_a_SOURCES += \
f6eb6b20
GL
256 lib/netdev-bsd.c \
257 lib/rtbsd.c \
258 lib/rtbsd.h \
9360d9b7
EM
259 lib/route-table-bsd.c
260endif
261
064af421 262if HAVE_OPENSSL
fe55ad15 263lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
424d1282 264nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
064af421
BP
265lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
266 (echo '#include "lib/dhparams.h"' && \
267 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
268 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
269 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
270 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
271 mv lib/dhparams.c.tmp lib/dhparams.c
bf8f2167
BP
272else
273lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
064af421
BP
274endif
275
276EXTRA_DIST += \
277 lib/dh1024.pem \
278 lib/dh2048.pem \
b43c6fe2
BP
279 lib/dh4096.pem \
280 lib/dirs.c.in
064af421 281
0027492d 282MAN_FRAGMENTS += \
064af421 283 lib/common.man \
f7f62235 284 lib/common-syn.man \
a5f607bc 285 lib/coverage-unixctl.man \
064af421 286 lib/daemon.man \
f7f62235 287 lib/daemon-syn.man \
064af421 288 lib/leak-checker.man \
149ff68a 289 lib/memory-unixctl.man \
23edef9e 290 lib/ovs.tmac \
84ee7bcf 291 lib/ssl-bootstrap.man \
9467fe62 292 lib/ssl-bootstrap-syn.man \
84ee7bcf
BP
293 lib/ssl-peer-ca-cert.man \
294 lib/ssl.man \
9467fe62 295 lib/ssl-syn.man \
cc01d0bb 296 lib/stress-unixctl.man \
3a3eb9da 297 lib/table.man \
7b38bdc8
BP
298 lib/unixctl.man \
299 lib/unixctl-syn.man \
84ee7bcf
BP
300 lib/vconn-active.man \
301 lib/vconn-passive.man \
b16fdafe 302 lib/vlog-unixctl.man \
f7f62235 303 lib/vlog-syn.man \
064af421
BP
304 lib/vlog.man
305
6e037e3c
EJ
306# vswitch IDL
307OVSIDL_BUILT += \
e3a88027
EJ
308 $(srcdir)/lib/vswitch-idl.c \
309 $(srcdir)/lib/vswitch-idl.h \
310 $(srcdir)/lib/vswitch-idl.ovsidl
6e037e3c 311
e3a88027 312EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
8c8c0f3a
BP
313VSWITCH_IDL_FILES = \
314 $(srcdir)/vswitchd/vswitch.ovsschema \
315 $(srcdir)/lib/vswitch-idl.ann
e3a88027 316$(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
8c8c0f3a 317 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
6e037e3c
EJ
318 mv $@.tmp $@
319
b43c6fe2
BP
320lib/dirs.c: lib/dirs.c.in Makefile
321 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
322 -e 's,[@]srcdir[@],$(srcdir),g' \
323 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
324 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
f973f2af 325 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
b43c6fe2 326 -e 's,[@]bindir[@],"$(bindir)",g' \
2fad9ebd 327 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
b43c6fe2
BP
328 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
329 > lib/dirs.c.tmp
064af421
BP
330 mv lib/dirs.c.tmp lib/dirs.c
331
90bf1e07
BP
332$(srcdir)/lib/ofp-errors.inc: \
333 lib/ofp-errors.h $(srcdir)/build-aux/extract-ofp-errors
853d1083 334 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
90bf1e07 335 $(srcdir)/lib/ofp-errors.h > $@.tmp && mv $@.tmp $@
a082dd9b 336$(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
90bf1e07 337EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
dc4762ed 338
982697a4
BP
339$(srcdir)/lib/ofp-msgs.inc: \
340 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
341 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
342 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
343$(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
344EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
345
b2df0225 346INSTALL_DATA_LOCAL += lib-install-data-local
99155935 347lib-install-data-local:
064af421
BP
348 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
349 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
350 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
f973f2af 351 $(MKDIR_P) $(DESTDIR)$(DBDIR)
064af421 352
d76f09ea 353if !USE_LINKER_SECTIONS
611d30ce
BP
354# All distributed sources, with names adjust properly for referencing
355# from $(builddir).
356all_sources = \
357 `for file in $(DIST_SOURCES); do \
358 if test -f $$file; then \
359 echo $$file; \
360 else \
361 echo $(VPATH)/$$file; \
362 fi; \
363 done`
364
d76f09ea
BP
365lib/coverage.$(OBJEXT): lib/coverage.def
366lib/coverage.def: $(DIST_SOURCES)
367 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
368CLEANFILES += lib/coverage.def
22c79496 369
cc01d0bb
BP
370lib/stress.$(OBJEXT): lib/stress.def
371lib/stress.def: $(DIST_SOURCES)
372 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
373CLEANFILES += lib/stress.def
374
611d30ce
BP
375lib/vlog.$(OBJEXT): lib/vlog-modules.def
376lib/vlog-modules.def: $(DIST_SOURCES)
377 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 > $@
378CLEANFILES += lib/vlog-modules.def
379endif