byteq: Move from extras/ezio into lib and export some private functions.
[sliver-openvswitch.git] / lib / automake.mk
1 # Copyright (C) 2009 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/cfg.c \
20         lib/cfg.h \
21         lib/classifier.c \
22         lib/classifier.h \
23         lib/command-line.c \
24         lib/command-line.h \
25         lib/compiler.h \
26         lib/coverage.c \
27         lib/coverage.h \
28         lib/coverage-counters.h \
29         lib/csum.c \
30         lib/csum.h \
31         lib/daemon.c \
32         lib/daemon.h \
33         lib/dhcp-client.c \
34         lib/dhcp-client.h \
35         lib/dhcp.c \
36         lib/dhcp.h \
37         lib/dhparams.h \
38         lib/dirs.h \
39         lib/dpif-linux.c \
40         lib/dpif-netdev.c \
41         lib/dpif-provider.h \
42         lib/dpif.c \
43         lib/dpif.h \
44         lib/dynamic-string.c \
45         lib/dynamic-string.h \
46         lib/fatal-signal.c \
47         lib/fatal-signal.h \
48         lib/fault.c \
49         lib/fault.h \
50         lib/flow.c \
51         lib/flow.h \
52         lib/hash.c \
53         lib/hash.h \
54         lib/hmap.c \
55         lib/hmap.h \
56         lib/json.c \
57         lib/json.h \
58         lib/leak-checker.c \
59         lib/leak-checker.h \
60         lib/learning-switch.c \
61         lib/learning-switch.h \
62         lib/list.c \
63         lib/list.h \
64         lib/lockfile.c \
65         lib/lockfile.h \
66         lib/mac-learning.c \
67         lib/mac-learning.h \
68         lib/netdev-linux.c \
69         lib/netdev-provider.h \
70         lib/netdev.c \
71         lib/netdev.h \
72         lib/odp-util.c \
73         lib/odp-util.h \
74         lib/ofp-print.c \
75         lib/ofp-print.h \
76         lib/ofpbuf.c \
77         lib/ofpbuf.h \
78         lib/packets.c \
79         lib/packets.h \
80         lib/pcap.c \
81         lib/pcap.h \
82         lib/poll-loop.c \
83         lib/poll-loop.h \
84         lib/port-array.c \
85         lib/port-array.h \
86         lib/process.c \
87         lib/process.h \
88         lib/queue.c \
89         lib/queue.h \
90         lib/random.c \
91         lib/random.h \
92         lib/rconn.c \
93         lib/rconn.h \
94         lib/rtnetlink.c \
95         lib/rtnetlink.h \
96         lib/sat-math.h \
97         lib/sha1.c \
98         lib/sha1.h \
99         lib/shash.c \
100         lib/shash.h \
101         lib/signals.c \
102         lib/signals.h \
103         lib/socket-util.c \
104         lib/socket-util.h \
105         lib/stp.c \
106         lib/stp.h \
107         lib/stream-fd.c \
108         lib/stream-fd.h \
109         lib/stream-provider.h \
110         lib/stream-tcp.c \
111         lib/stream-unix.c \
112         lib/stream.c \
113         lib/stream.h \
114         lib/svec.c \
115         lib/svec.h \
116         lib/tag.c \
117         lib/tag.h \
118         lib/timeval.c \
119         lib/timeval.h \
120         lib/type-props.h \
121         lib/uuid.c \
122         lib/uuid.h \
123         lib/unixctl.c \
124         lib/unixctl.h \
125         lib/unicode.c \
126         lib/unicode.h \
127         lib/util.c \
128         lib/util.h \
129         lib/valgrind.h \
130         lib/vconn-provider.h \
131         lib/vconn-ssl.h \
132         lib/vconn-stream.c \
133         lib/vconn-stream.h \
134         lib/vconn-tcp.c \
135         lib/vconn-unix.c \
136         lib/vconn.c \
137         lib/vconn.h \
138         lib/vlog-modules.def \
139         lib/vlog.c \
140         lib/vlog.h \
141         lib/xtoxll.h
142 nodist_lib_libopenvswitch_a_SOURCES = \
143         lib/coverage-counters.c \
144         lib/dirs.c
145 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
146
147 if HAVE_NETLINK
148 lib_libopenvswitch_a_SOURCES += \
149         lib/netlink-protocol.h \
150         lib/netlink.c \
151         lib/netlink.h
152 endif
153
154 if HAVE_OPENSSL
155 lib_libopenvswitch_a_SOURCES += \
156         lib/vconn-ssl.c 
157 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
158 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
159         (echo '#include "lib/dhparams.h"' &&                            \
160          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
161          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
162          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
163         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
164         mv lib/dhparams.c.tmp lib/dhparams.c
165 endif
166
167 EXTRA_DIST += \
168         lib/dh1024.pem \
169         lib/dh2048.pem \
170         lib/dh4096.pem \
171         lib/dhparams.h
172
173 EXTRA_DIST += \
174         lib/common.man \
175         lib/daemon.man \
176         lib/dpif.man \
177         lib/leak-checker.man \
178         lib/vlog-unixctl.man \
179         lib/vlog.man
180
181
182 lib/dirs.c: Makefile
183         ($(ro_c) && \
184          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
185          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
186          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
187          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
188         mv lib/dirs.c.tmp lib/dirs.c
189
190 install-data-local:
191         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
192         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
193         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
194
195 # All the source files that have coverage counters.
196 COVERAGE_FILES = \
197         lib/dpif.c \
198         lib/flow.c \
199         lib/lockfile.c \
200         lib/hmap.c \
201         lib/mac-learning.c \
202         lib/netdev.c \
203         lib/netdev-linux.c \
204         lib/netlink.c \
205         lib/odp-util.c \
206         lib/poll-loop.c \
207         lib/process.c \
208         lib/rconn.c \
209         lib/rtnetlink.c \
210         lib/stream.c \
211         lib/timeval.c \
212         lib/unixctl.c \
213         lib/util.c \
214         lib/vconn.c \
215         ofproto/ofproto.c \
216         ofproto/pktbuf.c \
217         vswitchd/bridge.c \
218         vswitchd/mgmt.c \
219         vswitchd/ovs-brcompatd.c
220 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
221         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
222         mv $@.tmp $@
223 EXTRA_DIST += lib/coverage-scan.pl