]> git.proxmox.com Git - mirror_ovs.git/blob - lib/automake.mk
lib/automake.mk: Fix dependency typos.
[mirror_ovs.git] / lib / automake.mk
1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 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 lib_LTLIBRARIES += lib/libopenvswitch.la
9
10 lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
11
12 if WIN32
13 lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
14 endif
15
16 lib_libopenvswitch_la_LDFLAGS = \
17 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
18 -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
19 $(AM_LDFLAGS)
20
21 lib_libopenvswitch_la_SOURCES = \
22 lib/aes128.c \
23 lib/aes128.h \
24 lib/async-append.h \
25 lib/backtrace.c \
26 lib/backtrace.h \
27 lib/bfd.c \
28 lib/bfd.h \
29 lib/bitmap.h \
30 lib/bundle.c \
31 lib/bundle.h \
32 lib/byte-order.h \
33 lib/byteq.c \
34 lib/byteq.h \
35 lib/cfm.c \
36 lib/cfm.h \
37 lib/classifier.c \
38 lib/classifier.h \
39 lib/classifier-private.h \
40 lib/cmap.c \
41 lib/cmap.h \
42 lib/command-line.c \
43 lib/command-line.h \
44 lib/compiler.h \
45 lib/connectivity.c \
46 lib/connectivity.h \
47 lib/coverage.c \
48 lib/coverage.h \
49 lib/crc32c.c \
50 lib/crc32c.h \
51 lib/csum.c \
52 lib/csum.h \
53 lib/daemon.c \
54 lib/daemon.h \
55 lib/daemon-private.h \
56 lib/db-ctl-base.c \
57 lib/db-ctl-base.h \
58 lib/dhcp.h \
59 lib/dummy.c \
60 lib/dummy.h \
61 lib/dhparams.h \
62 lib/dirs.h \
63 lib/dpctl.c \
64 lib/dpctl.h \
65 lib/dp-packet.h \
66 lib/dp-packet.c \
67 lib/dpif-netdev.c \
68 lib/dpif-netdev.h \
69 lib/dpif-provider.h \
70 lib/dpif.c \
71 lib/dpif.h \
72 lib/heap.c \
73 lib/heap.h \
74 lib/dynamic-string.c \
75 lib/dynamic-string.h \
76 lib/entropy.c \
77 lib/entropy.h \
78 lib/fat-rwlock.c \
79 lib/fat-rwlock.h \
80 lib/fatal-signal.c \
81 lib/fatal-signal.h \
82 lib/flow.c \
83 lib/flow.h \
84 lib/guarded-list.c \
85 lib/guarded-list.h \
86 lib/hash.c \
87 lib/hash.h \
88 lib/hindex.c \
89 lib/hindex.h \
90 lib/hmap.c \
91 lib/hmap.h \
92 lib/hmapx.c \
93 lib/hmapx.h \
94 lib/id-pool.c \
95 lib/id-pool.h \
96 lib/jhash.c \
97 lib/jhash.h \
98 lib/json.c \
99 lib/json.h \
100 lib/jsonrpc.c \
101 lib/jsonrpc.h \
102 lib/lacp.c \
103 lib/lacp.h \
104 lib/latch.h \
105 lib/learn.c \
106 lib/learn.h \
107 lib/learning-switch.c \
108 lib/learning-switch.h \
109 lib/list.h \
110 lib/lockfile.c \
111 lib/lockfile.h \
112 lib/mac-learning.c \
113 lib/mac-learning.h \
114 lib/match.c \
115 lib/match.h \
116 lib/mcast-snooping.c \
117 lib/mcast-snooping.h \
118 lib/memory.c \
119 lib/memory.h \
120 lib/meta-flow.c \
121 lib/meta-flow.h \
122 lib/multipath.c \
123 lib/multipath.h \
124 lib/netdev-dummy.c \
125 lib/netdev-provider.h \
126 lib/netdev-vport.c \
127 lib/netdev-vport.h \
128 lib/netdev.c \
129 lib/netdev.h \
130 lib/netflow.h \
131 lib/netlink.c \
132 lib/netlink.h \
133 lib/nx-match.c \
134 lib/nx-match.h \
135 lib/odp-execute.c \
136 lib/odp-execute.h \
137 lib/odp-util.c \
138 lib/odp-util.h \
139 lib/ofp-actions.c \
140 lib/ofp-actions.h \
141 lib/ofp-errors.c \
142 lib/ofp-errors.h \
143 lib/ofp-msgs.c \
144 lib/ofp-msgs.h \
145 lib/ofp-parse.c \
146 lib/ofp-parse.h \
147 lib/ofp-print.c \
148 lib/ofp-print.h \
149 lib/ofp-util.c \
150 lib/ofp-util.h \
151 lib/ofp-version-opt.h \
152 lib/ofp-version-opt.c \
153 lib/ofpbuf.c \
154 lib/ofpbuf.h \
155 lib/ovs-atomic-c11.h \
156 lib/ovs-atomic-clang.h \
157 lib/ovs-atomic-flag-gcc4.7+.h \
158 lib/ovs-atomic-gcc4+.h \
159 lib/ovs-atomic-gcc4.7+.h \
160 lib/ovs-atomic-i586.h \
161 lib/ovs-atomic-locked.c \
162 lib/ovs-atomic-locked.h \
163 lib/ovs-atomic-msvc.h \
164 lib/ovs-atomic-pthreads.h \
165 lib/ovs-atomic-x86_64.h \
166 lib/ovs-atomic.h \
167 lib/ovs-lldp.c \
168 lib/ovs-lldp.h \
169 lib/ovs-rcu.c \
170 lib/ovs-rcu.h \
171 lib/ovs-router.h \
172 lib/ovs-router.c \
173 lib/ovs-thread.c \
174 lib/ovs-thread.h \
175 lib/ovsdb-data.c \
176 lib/ovsdb-data.h \
177 lib/ovsdb-error.c \
178 lib/ovsdb-error.h \
179 lib/ovsdb-idl-provider.h \
180 lib/ovsdb-idl.c \
181 lib/ovsdb-idl.h \
182 lib/ovsdb-parser.c \
183 lib/ovsdb-parser.h \
184 lib/ovsdb-types.c \
185 lib/ovsdb-types.h \
186 lib/packets.c \
187 lib/packets.h \
188 lib/pcap-file.c \
189 lib/pcap-file.h \
190 lib/perf-counter.h \
191 lib/perf-counter.c \
192 lib/poll-loop.c \
193 lib/poll-loop.h \
194 lib/process.c \
195 lib/process.h \
196 lib/pvector.c \
197 lib/pvector.h \
198 lib/random.c \
199 lib/random.h \
200 lib/rconn.c \
201 lib/rconn.h \
202 lib/rculist.h \
203 lib/reconnect.c \
204 lib/reconnect.h \
205 lib/rstp.c \
206 lib/rstp.h \
207 lib/rstp-common.h \
208 lib/rstp-state-machines.c \
209 lib/rstp-state-machines.h \
210 lib/sat-math.h \
211 lib/seq.c \
212 lib/seq.h \
213 lib/sha1.c \
214 lib/sha1.h \
215 lib/shash.c \
216 lib/shash.h \
217 lib/simap.c \
218 lib/simap.h \
219 lib/smap.c \
220 lib/smap.h \
221 lib/socket-util.c \
222 lib/socket-util.h \
223 lib/sort.c \
224 lib/sort.h \
225 lib/sset.c \
226 lib/sset.h \
227 lib/stp.c \
228 lib/stp.h \
229 lib/stream-fd.c \
230 lib/stream-fd.h \
231 lib/stream-provider.h \
232 lib/stream-ssl.h \
233 lib/stream-tcp.c \
234 lib/stream.c \
235 lib/stream.h \
236 lib/stdio.c \
237 lib/string.c \
238 lib/svec.c \
239 lib/svec.h \
240 lib/syslog-direct.c \
241 lib/syslog-direct.h \
242 lib/syslog-libc.c \
243 lib/syslog-libc.h \
244 lib/syslog-provider.h \
245 lib/table.c \
246 lib/table.h \
247 lib/tag.c \
248 lib/tag.h \
249 lib/timer.c \
250 lib/timer.h \
251 lib/timeval.c \
252 lib/timeval.h \
253 lib/tnl-arp-cache.c \
254 lib/tnl-arp-cache.h \
255 lib/tnl-ports.c \
256 lib/tnl-ports.h \
257 lib/token-bucket.c \
258 lib/tun-metadata.c \
259 lib/tun-metadata.h \
260 lib/type-props.h \
261 lib/unaligned.h \
262 lib/unicode.c \
263 lib/unicode.h \
264 lib/unixctl.c \
265 lib/unixctl.h \
266 lib/util.c \
267 lib/util.h \
268 lib/uuid.c \
269 lib/uuid.h \
270 lib/valgrind.h \
271 lib/vconn-provider.h \
272 lib/vconn-stream.c \
273 lib/vconn.c \
274 lib/vlan-bitmap.c \
275 lib/vlan-bitmap.h \
276 lib/vlandev.c \
277 lib/vlandev.h \
278 lib/vlog.c \
279 lib/vswitch-idl.c \
280 lib/vswitch-idl.h \
281 lib/lldp/aa-structs.h \
282 lib/lldp/lldp.c \
283 lib/lldp/lldp-const.h \
284 lib/lldp/lldp-tlv.h \
285 lib/lldp/lldpd.c \
286 lib/lldp/lldpd.h \
287 lib/lldp/lldpd-structs.c \
288 lib/lldp/lldpd-structs.h
289
290 if WIN32
291 lib_libopenvswitch_la_SOURCES += \
292 lib/daemon-windows.c \
293 lib/getopt_long.c \
294 lib/getrusage-windows.c \
295 lib/latch-windows.c \
296 lib/route-table-stub.c \
297 lib/strsep.c
298 else
299 lib_libopenvswitch_la_SOURCES += \
300 lib/daemon-unix.c \
301 lib/latch-unix.c \
302 lib/signals.c \
303 lib/signals.h \
304 lib/socket-util-unix.c \
305 lib/stream-unix.c
306 endif
307
308 EXTRA_DIST += \
309 lib/stdio.h.in \
310 lib/string.h.in
311
312 nodist_lib_libopenvswitch_la_SOURCES = \
313 lib/dirs.c
314 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
315
316 lib_LTLIBRARIES += lib/libsflow.la
317 lib_libsflow_la_LDFLAGS = \
318 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
319 -Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
320 $(AM_LDFLAGS)
321 lib_libsflow_la_SOURCES = \
322 lib/sflow_api.h \
323 lib/sflow.h \
324 lib/sflow_agent.c \
325 lib/sflow_sampler.c \
326 lib/sflow_poller.c \
327 lib/sflow_receiver.c
328 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
329 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
330 if HAVE_WNO_UNUSED
331 lib_libsflow_la_CFLAGS += -Wno-unused
332 endif
333 if HAVE_WNO_UNUSED_PARAMETER
334 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
335 endif
336
337 if LINUX
338 lib_libopenvswitch_la_SOURCES += \
339 lib/dpif-netlink.c \
340 lib/dpif-netlink.h \
341 lib/netdev-linux.c \
342 lib/netdev-linux.h \
343 lib/netlink-notifier.c \
344 lib/netlink-notifier.h \
345 lib/netlink-protocol.h \
346 lib/netlink-socket.c \
347 lib/netlink-socket.h \
348 lib/ovs-numa.c \
349 lib/ovs-numa.h \
350 lib/rtnetlink-link.c \
351 lib/rtnetlink-link.h \
352 lib/route-table.c \
353 lib/route-table.h
354 endif
355
356 if DPDK_NETDEV
357 lib_libopenvswitch_la_SOURCES += \
358 lib/netdev-dpdk.c \
359 lib/netdev-dpdk.h
360 endif
361
362 if WIN32
363 lib_libopenvswitch_la_SOURCES += \
364 lib/dpif-netlink.c \
365 lib/dpif-netlink.h \
366 lib/netdev-windows.c \
367 lib/netlink-notifier.c \
368 lib/netlink-notifier.h \
369 lib/netlink-protocol.h \
370 lib/netlink-socket.c \
371 lib/netlink-socket.h
372 endif
373
374 if HAVE_POSIX_AIO
375 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
376 else
377 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
378 endif
379
380 if ESX
381 lib_libopenvswitch_la_SOURCES += \
382 lib/route-table-stub.c
383 endif
384
385 if HAVE_IF_DL
386 lib_libopenvswitch_la_SOURCES += \
387 lib/netdev-bsd.c \
388 lib/rtbsd.c \
389 lib/rtbsd.h \
390 lib/route-table-bsd.c
391 endif
392
393 if HAVE_OPENSSL
394 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
395 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
396 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
397 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
398 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
399 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
400 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
401 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
402 mv lib/dhparams.c.tmp lib/dhparams.c
403 else
404 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
405 endif
406
407 pkgconfig_DATA += \
408 $(srcdir)/lib/libopenvswitch.pc \
409 $(srcdir)/lib/libsflow.pc
410
411 EXTRA_DIST += \
412 lib/dh1024.pem \
413 lib/dh2048.pem \
414 lib/dh4096.pem \
415 lib/dirs.c.in
416
417 MAN_FRAGMENTS += \
418 lib/common.man \
419 lib/common-syn.man \
420 lib/coverage-unixctl.man \
421 lib/daemon.man \
422 lib/daemon-syn.man \
423 lib/db-ctl-base.man \
424 lib/dpctl.man \
425 lib/memory-unixctl.man \
426 lib/ofp-version.man \
427 lib/ovs.tmac \
428 lib/service.man \
429 lib/service-syn.man \
430 lib/ssl-bootstrap.man \
431 lib/ssl-bootstrap-syn.man \
432 lib/ssl-peer-ca-cert.man \
433 lib/ssl.man \
434 lib/ssl-syn.man \
435 lib/table.man \
436 lib/unixctl.man \
437 lib/unixctl-syn.man \
438 lib/vconn-active.man \
439 lib/vconn-passive.man \
440 lib/vlog-unixctl.man \
441 lib/vlog-syn.man \
442 lib/vlog.man
443
444 # vswitch IDL
445 OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl
446
447 EXTRA_DIST += lib/vswitch-idl.ann
448 $(srcdir)/lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
449 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema $(srcdir)/lib/vswitch-idl.ann > $@.tmp && mv $@.tmp $@
450
451 lib/dirs.c: lib/dirs.c.in Makefile
452 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
453 -e 's,[@]srcdir[@],$(srcdir),g' \
454 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
455 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
456 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
457 -e 's,[@]bindir[@],"$(bindir)",g' \
458 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
459 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
460 > lib/dirs.c.tmp && \
461 mv lib/dirs.c.tmp lib/dirs.c
462
463 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
464 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
465 lib/meta-flow.lo: lib/meta-flow.inc
466 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
467 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
468 lib/nx-match.lo: lib/nx-match.inc
469 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
470 EXTRA_DIST += build-aux/extract-ofp-fields
471
472 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
473 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
474 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
475 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
476 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
477 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
478 EXTRA_DIST += build-aux/extract-ofp-actions
479
480 lib/ofp-errors.inc: lib/ofp-errors.h include/openflow/openflow-common.h \
481 $(srcdir)/build-aux/extract-ofp-errors
482 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
483 $(srcdir)/lib/ofp-errors.h \
484 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
485 mv $@.tmp $@
486 lib/ofp-errors.lo: lib/ofp-errors.inc
487 EXTRA_DIST += build-aux/extract-ofp-errors
488
489 lib/ofp-msgs.inc: lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
490 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
491 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
492 lib/ofp-msgs.lo: lib/ofp-msgs.inc
493 EXTRA_DIST += build-aux/extract-ofp-msgs
494
495 INSTALL_DATA_LOCAL += lib-install-data-local
496 lib-install-data-local:
497 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
498 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
499 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
500 $(MKDIR_P) $(DESTDIR)$(DBDIR)
501