Initial implementation of OVSDB.
[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/jsonrpc.c \
59         lib/jsonrpc.h \
60         lib/leak-checker.c \
61         lib/leak-checker.h \
62         lib/learning-switch.c \
63         lib/learning-switch.h \
64         lib/list.c \
65         lib/list.h \
66         lib/lockfile.c \
67         lib/lockfile.h \
68         lib/mac-learning.c \
69         lib/mac-learning.h \
70         lib/netdev-linux.c \
71         lib/netdev-provider.h \
72         lib/netdev.c \
73         lib/netdev.h \
74         lib/odp-util.c \
75         lib/odp-util.h \
76         lib/ofp-print.c \
77         lib/ofp-print.h \
78         lib/ofpbuf.c \
79         lib/ofpbuf.h \
80         lib/ovsdb-client.h \
81         lib/ovsdb-data.c \
82         lib/ovsdb-data.h \
83         lib/ovsdb-error.c \
84         lib/ovsdb-error.h \
85         lib/ovsdb-parser.c \
86         lib/ovsdb-parser.h \
87         lib/ovsdb-types.c \
88         lib/ovsdb-types.h \
89         lib/packets.c \
90         lib/packets.h \
91         lib/pcap.c \
92         lib/pcap.h \
93         lib/poll-loop.c \
94         lib/poll-loop.h \
95         lib/port-array.c \
96         lib/port-array.h \
97         lib/process.c \
98         lib/process.h \
99         lib/queue.c \
100         lib/queue.h \
101         lib/random.c \
102         lib/random.h \
103         lib/rconn.c \
104         lib/rconn.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-tcp.c \
124         lib/stream-unix.c \
125         lib/stream.c \
126         lib/stream.h \
127         lib/svec.c \
128         lib/svec.h \
129         lib/tag.c \
130         lib/tag.h \
131         lib/timeval.c \
132         lib/timeval.h \
133         lib/type-props.h \
134         lib/uuid.c \
135         lib/uuid.h \
136         lib/unixctl.c \
137         lib/unixctl.h \
138         lib/unicode.c \
139         lib/unicode.h \
140         lib/util.c \
141         lib/util.h \
142         lib/valgrind.h \
143         lib/vconn-provider.h \
144         lib/vconn-ssl.h \
145         lib/vconn-stream.c \
146         lib/vconn-stream.h \
147         lib/vconn-tcp.c \
148         lib/vconn-unix.c \
149         lib/vconn.c \
150         lib/vconn.h \
151         lib/vlog-modules.def \
152         lib/vlog.c \
153         lib/vlog.h \
154         lib/xtoxll.h
155 nodist_lib_libopenvswitch_a_SOURCES = \
156         lib/coverage-counters.c \
157         lib/dirs.c
158 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
159
160 if HAVE_NETLINK
161 lib_libopenvswitch_a_SOURCES += \
162         lib/netlink-protocol.h \
163         lib/netlink.c \
164         lib/netlink.h
165 endif
166
167 if HAVE_OPENSSL
168 lib_libopenvswitch_a_SOURCES += \
169         lib/vconn-ssl.c 
170 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
171 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
172         (echo '#include "lib/dhparams.h"' &&                            \
173          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
174          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
175          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
176         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
177         mv lib/dhparams.c.tmp lib/dhparams.c
178 endif
179
180 EXTRA_DIST += \
181         lib/dh1024.pem \
182         lib/dh2048.pem \
183         lib/dh4096.pem \
184         lib/dhparams.h
185
186 EXTRA_DIST += \
187         lib/common.man \
188         lib/daemon.man \
189         lib/dpif.man \
190         lib/leak-checker.man \
191         lib/vlog-unixctl.man \
192         lib/vlog.man
193
194
195 lib/dirs.c: Makefile
196         ($(ro_c) && \
197          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
198          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
199          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
200          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
201         mv lib/dirs.c.tmp lib/dirs.c
202
203 install-data-local:
204         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
205         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
206         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
207
208 # All the source files that have coverage counters.
209 COVERAGE_FILES = \
210         lib/dpif.c \
211         lib/flow.c \
212         lib/lockfile.c \
213         lib/hmap.c \
214         lib/mac-learning.c \
215         lib/netdev.c \
216         lib/netdev-linux.c \
217         lib/netlink.c \
218         lib/odp-util.c \
219         lib/poll-loop.c \
220         lib/process.c \
221         lib/rconn.c \
222         lib/rtnetlink.c \
223         lib/stream.c \
224         lib/timeval.c \
225         lib/unixctl.c \
226         lib/util.c \
227         lib/vconn.c \
228         ofproto/ofproto.c \
229         ofproto/pktbuf.c \
230         vswitchd/bridge.c \
231         vswitchd/mgmt.c \
232         vswitchd/ovs-brcompatd.c
233 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
234         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
235         mv $@.tmp $@
236 EXTRA_DIST += lib/coverage-scan.pl