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