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