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