]> git.proxmox.com Git - mirror_ovs.git/blob - lib/automake.mk
netdev-vport: Merge in netdev-patch and netdev-tunnel.
[mirror_ovs.git] / lib / automake.mk
1 # Copyright (C) 2009, 2010 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/byteq.c \
18 lib/byteq.h \
19 lib/classifier.c \
20 lib/classifier.h \
21 lib/command-line.c \
22 lib/command-line.h \
23 lib/compiler.h \
24 lib/coverage.c \
25 lib/coverage.h \
26 lib/coverage-counters.h \
27 lib/csum.c \
28 lib/csum.h \
29 lib/daemon.c \
30 lib/daemon.h \
31 lib/dhcp-client.c \
32 lib/dhcp-client.h \
33 lib/dhcp.c \
34 lib/dhcp.h \
35 lib/dhparams.h \
36 lib/dirs.h \
37 lib/dpif-netdev.c \
38 lib/dpif-provider.h \
39 lib/dpif.c \
40 lib/dpif.h \
41 lib/dynamic-string.c \
42 lib/dynamic-string.h \
43 lib/entropy.c \
44 lib/entropy.h \
45 lib/fatal-signal.c \
46 lib/fatal-signal.h \
47 lib/flow.c \
48 lib/flow.h \
49 lib/hash.c \
50 lib/hash.h \
51 lib/hmap.c \
52 lib/hmap.h \
53 lib/json.c \
54 lib/json.h \
55 lib/jsonrpc.c \
56 lib/jsonrpc.h \
57 lib/leak-checker.c \
58 lib/leak-checker.h \
59 lib/learning-switch.c \
60 lib/learning-switch.h \
61 lib/list.c \
62 lib/list.h \
63 lib/lockfile.c \
64 lib/lockfile.h \
65 lib/mac-learning.c \
66 lib/mac-learning.h \
67 lib/netdev-provider.h \
68 lib/netdev.c \
69 lib/netdev.h \
70 lib/odp-util.c \
71 lib/odp-util.h \
72 lib/ofp-parse.c \
73 lib/ofp-parse.h \
74 lib/ofp-print.c \
75 lib/ofp-print.h \
76 lib/ofp-util.c \
77 lib/ofp-util.h \
78 lib/ofpbuf.c \
79 lib/ofpbuf.h \
80 lib/ovsdb-data.c \
81 lib/ovsdb-data.h \
82 lib/ovsdb-error.c \
83 lib/ovsdb-error.h \
84 lib/ovsdb-idl-provider.h \
85 lib/ovsdb-idl.c \
86 lib/ovsdb-idl.h \
87 lib/ovsdb-parser.c \
88 lib/ovsdb-parser.h \
89 lib/ovsdb-types.c \
90 lib/ovsdb-types.h \
91 lib/packets.c \
92 lib/packets.h \
93 lib/pcap.c \
94 lib/pcap.h \
95 lib/poll-loop.c \
96 lib/poll-loop.h \
97 lib/port-array.c \
98 lib/port-array.h \
99 lib/process.c \
100 lib/process.h \
101 lib/queue.c \
102 lib/queue.h \
103 lib/random.c \
104 lib/random.h \
105 lib/rconn.c \
106 lib/rconn.h \
107 lib/reconnect.c \
108 lib/reconnect.h \
109 lib/sat-math.h \
110 lib/sha1.c \
111 lib/sha1.h \
112 lib/shash.c \
113 lib/shash.h \
114 lib/signals.c \
115 lib/signals.h \
116 lib/socket-util.c \
117 lib/socket-util.h \
118 lib/sort.c \
119 lib/sort.h \
120 lib/stream-fd.c \
121 lib/stream-fd.h \
122 lib/stream-provider.h \
123 lib/stream-ssl.h \
124 lib/stream-tcp.c \
125 lib/stream-unix.c \
126 lib/stream.c \
127 lib/stream.h \
128 lib/string.h \
129 lib/svec.c \
130 lib/svec.h \
131 lib/tag.c \
132 lib/tag.h \
133 lib/timeval.c \
134 lib/timeval.h \
135 lib/type-props.h \
136 lib/unaligned.h \
137 lib/unicode.c \
138 lib/unicode.h \
139 lib/unixctl.c \
140 lib/unixctl.h \
141 lib/util.c \
142 lib/util.h \
143 lib/uuid.c \
144 lib/uuid.h \
145 lib/valgrind.h \
146 lib/vconn-provider.h \
147 lib/vconn-stream.c \
148 lib/vconn.c \
149 lib/vconn.h \
150 lib/vlog-modules.def \
151 lib/vlog.c \
152 lib/vlog.h \
153 lib/xtoxll.h
154 nodist_lib_libopenvswitch_a_SOURCES = \
155 lib/coverage-counters.c \
156 lib/dirs.c
157 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
158
159 noinst_LIBRARIES += lib/libsflow.a
160 lib_libsflow_a_SOURCES = \
161 lib/sflow_api.h \
162 lib/sflow.h \
163 lib/sflow_agent.c \
164 lib/sflow_sampler.c \
165 lib/sflow_poller.c \
166 lib/sflow_receiver.c
167 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
168 if HAVE_WNO_UNUSED
169 lib_libsflow_a_CFLAGS += -Wno-unused
170 endif
171 if HAVE_WNO_UNUSED_PARAMETER
172 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
173 endif
174
175 if HAVE_NETLINK
176 lib_libopenvswitch_a_SOURCES += \
177 lib/dpif-linux.c \
178 lib/netdev-linux.c \
179 lib/netdev-vport.c \
180 lib/netdev-vport.h \
181 lib/netlink-protocol.h \
182 lib/netlink.c \
183 lib/netlink.h \
184 lib/rtnetlink.c \
185 lib/rtnetlink.h
186 endif
187
188 if HAVE_OPENSSL
189 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
190 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
191 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
192 (echo '#include "lib/dhparams.h"' && \
193 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
194 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
195 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
196 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
197 mv lib/dhparams.c.tmp lib/dhparams.c
198 endif
199
200 EXTRA_DIST += \
201 lib/dh1024.pem \
202 lib/dh2048.pem \
203 lib/dh4096.pem \
204 lib/dhparams.h
205
206 EXTRA_DIST += \
207 lib/common.man \
208 lib/common-syn.man \
209 lib/daemon.man \
210 lib/daemon-syn.man \
211 lib/dpif.man \
212 lib/leak-checker.man \
213 lib/ssl-bootstrap.man \
214 lib/ssl-bootstrap-syn.man \
215 lib/ssl-peer-ca-cert.man \
216 lib/ssl.man \
217 lib/ssl-syn.man \
218 lib/unixctl.man \
219 lib/unixctl-syn.man \
220 lib/vconn-active.man \
221 lib/vconn-passive.man \
222 lib/vlog-unixctl.man \
223 lib/vlog-syn.man \
224 lib/vlog.man
225
226
227 lib/dirs.c: Makefile
228 ($(ro_c) && \
229 echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
230 echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
231 echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
232 echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
233 mv lib/dirs.c.tmp lib/dirs.c
234
235 install-data-local: lib-install-data-local
236 lib-install-data-local:
237 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
238 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
239 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
240
241 # All the source files that have coverage counters.
242 COVERAGE_FILES = \
243 lib/dpif.c \
244 lib/flow.c \
245 lib/lockfile.c \
246 lib/hmap.c \
247 lib/mac-learning.c \
248 lib/netdev.c \
249 lib/netdev-linux.c \
250 lib/netlink.c \
251 lib/odp-util.c \
252 lib/poll-loop.c \
253 lib/process.c \
254 lib/rconn.c \
255 lib/rtnetlink.c \
256 lib/stream.c \
257 lib/stream-ssl.c \
258 lib/timeval.c \
259 lib/unixctl.c \
260 lib/util.c \
261 lib/vconn.c \
262 ofproto/ofproto.c \
263 ofproto/pktbuf.c \
264 vswitchd/bridge.c \
265 vswitchd/ovs-brcompatd.c
266 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
267 (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
268 mv $@.tmp $@
269 EXTRA_DIST += lib/coverage-scan.pl
270
271 ALL_LOCAL += check-vlog-modules
272 check-vlog-modules:
273 cd $(srcdir) && build-aux/check-vlog-modules
274 .PHONY: check-vlog-modules
275 EXTRA_DIST += build-aux/check-vlog-modules