ofproto: Match on IP ToS/DSCP bits (OpenFlow 1.0)
[openvswitch] / 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-linux.c \
38         lib/dpif-netdev.c \
39         lib/dpif-provider.h \
40         lib/dpif.c \
41         lib/dpif.h \
42         lib/dynamic-string.c \
43         lib/dynamic-string.h \
44         lib/fatal-signal.c \
45         lib/fatal-signal.h \
46         lib/flow.c \
47         lib/flow.h \
48         lib/hash.c \
49         lib/hash.h \
50         lib/hmap.c \
51         lib/hmap.h \
52         lib/json.c \
53         lib/json.h \
54         lib/jsonrpc.c \
55         lib/jsonrpc.h \
56         lib/leak-checker.c \
57         lib/leak-checker.h \
58         lib/learning-switch.c \
59         lib/learning-switch.h \
60         lib/list.c \
61         lib/list.h \
62         lib/lockfile.c \
63         lib/lockfile.h \
64         lib/mac-learning.c \
65         lib/mac-learning.h \
66         lib/netdev-linux.c \
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-print.c \
73         lib/ofp-print.h \
74         lib/ofpbuf.c \
75         lib/ofpbuf.h \
76         lib/ovsdb-data.c \
77         lib/ovsdb-data.h \
78         lib/ovsdb-error.c \
79         lib/ovsdb-error.h \
80         lib/ovsdb-idl-provider.h \
81         lib/ovsdb-idl.c \
82         lib/ovsdb-idl.h \
83         lib/ovsdb-parser.c \
84         lib/ovsdb-parser.h \
85         lib/ovsdb-types.c \
86         lib/ovsdb-types.h \
87         lib/packets.c \
88         lib/packets.h \
89         lib/pcap.c \
90         lib/pcap.h \
91         lib/poll-loop.c \
92         lib/poll-loop.h \
93         lib/port-array.c \
94         lib/port-array.h \
95         lib/process.c \
96         lib/process.h \
97         lib/queue.c \
98         lib/queue.h \
99         lib/random.c \
100         lib/random.h \
101         lib/rconn.c \
102         lib/rconn.h \
103         lib/reconnect.c \
104         lib/reconnect.h \
105         lib/rtnetlink.c \
106         lib/rtnetlink.h \
107         lib/sat-math.h \
108         lib/sha1.c \
109         lib/sha1.h \
110         lib/shash.c \
111         lib/shash.h \
112         lib/signals.c \
113         lib/signals.h \
114         lib/socket-util.c \
115         lib/socket-util.h \
116         lib/sort.c \
117         lib/sort.h \
118         lib/stp.c \
119         lib/stp.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/unicode.c \
137         lib/unicode.h \
138         lib/unixctl.c \
139         lib/unixctl.h \
140         lib/util.c \
141         lib/util.h \
142         lib/uuid.c \
143         lib/uuid.h \
144         lib/valgrind.h \
145         lib/vconn-provider.h \
146         lib/vconn-stream.c \
147         lib/vconn.c \
148         lib/vconn.h \
149         lib/vlog-modules.def \
150         lib/vlog.c \
151         lib/vlog.h \
152         lib/xtoxll.h
153 nodist_lib_libopenvswitch_a_SOURCES = \
154         lib/coverage-counters.c \
155         lib/dirs.c
156 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
157
158 noinst_LIBRARIES += lib/libsflow.a
159 lib_libsflow_a_SOURCES = \
160         lib/sflow_api.h \
161         lib/sflow.h \
162         lib/sflow_agent.c \
163         lib/sflow_sampler.c \
164         lib/sflow_poller.c \
165         lib/sflow_receiver.c
166 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
167 if HAVE_WNO_UNUSED
168 lib_libsflow_a_CFLAGS += -Wno-unused
169 endif
170
171 if HAVE_NETLINK
172 lib_libopenvswitch_a_SOURCES += \
173         lib/netlink-protocol.h \
174         lib/netlink.c \
175         lib/netlink.h
176 endif
177
178 if HAVE_OPENSSL
179 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
180 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
181 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
182         (echo '#include "lib/dhparams.h"' &&                            \
183          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
184          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
185          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
186         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
187         mv lib/dhparams.c.tmp lib/dhparams.c
188 endif
189
190 EXTRA_DIST += \
191         lib/dh1024.pem \
192         lib/dh2048.pem \
193         lib/dh4096.pem \
194         lib/dhparams.h
195
196 EXTRA_DIST += \
197         lib/common.man \
198         lib/common-syn.man \
199         lib/daemon.man \
200         lib/daemon-syn.man \
201         lib/dpif.man \
202         lib/leak-checker.man \
203         lib/ssl-bootstrap.man \
204         lib/ssl-bootstrap-syn.man \
205         lib/ssl-peer-ca-cert.man \
206         lib/ssl.man \
207         lib/ssl-syn.man \
208         lib/vconn-active.man \
209         lib/vconn-passive.man \
210         lib/vlog-unixctl.man \
211         lib/vlog-syn.man \
212         lib/vlog.man
213
214
215 lib/dirs.c: Makefile
216         ($(ro_c) && \
217          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
218          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
219          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
220          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
221         mv lib/dirs.c.tmp lib/dirs.c
222
223 install-data-local:
224         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
225         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
226         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
227
228 # All the source files that have coverage counters.
229 COVERAGE_FILES = \
230         lib/dpif.c \
231         lib/flow.c \
232         lib/lockfile.c \
233         lib/hmap.c \
234         lib/mac-learning.c \
235         lib/netdev.c \
236         lib/netdev-linux.c \
237         lib/netlink.c \
238         lib/odp-util.c \
239         lib/poll-loop.c \
240         lib/process.c \
241         lib/rconn.c \
242         lib/rtnetlink.c \
243         lib/stream.c \
244         lib/timeval.c \
245         lib/unixctl.c \
246         lib/util.c \
247         lib/vconn.c \
248         ofproto/ofproto.c \
249         ofproto/pktbuf.c \
250         vswitchd/bridge.c \
251         vswitchd/ovs-brcompatd.c
252 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
253         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
254         mv $@.tmp $@
255 EXTRA_DIST += lib/coverage-scan.pl