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