vswitchd: Initial conversion to database-based configuration.
[openvswitch] / 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-data.c \
81         lib/ovsdb-data.h \
82         lib/ovsdb-error.c \
83         lib/ovsdb-error.h \
84         lib/ovsdb-idl-provider.h \
85         lib/ovsdb-idl.c \
86         lib/ovsdb-idl.h \
87         lib/ovsdb-parser.c \
88         lib/ovsdb-parser.h \
89         lib/ovsdb-types.c \
90         lib/ovsdb-types.h \
91         lib/packets.c \
92         lib/packets.h \
93         lib/pcap.c \
94         lib/pcap.h \
95         lib/poll-loop.c \
96         lib/poll-loop.h \
97         lib/port-array.c \
98         lib/port-array.h \
99         lib/process.c \
100         lib/process.h \
101         lib/queue.c \
102         lib/queue.h \
103         lib/random.c \
104         lib/random.h \
105         lib/rconn.c \
106         lib/rconn.h \
107         lib/reconnect.c \
108         lib/reconnect.h \
109         lib/rtnetlink.c \
110         lib/rtnetlink.h \
111         lib/sat-math.h \
112         lib/sha1.c \
113         lib/sha1.h \
114         lib/shash.c \
115         lib/shash.h \
116         lib/signals.c \
117         lib/signals.h \
118         lib/socket-util.c \
119         lib/socket-util.h \
120         lib/sort.c \
121         lib/sort.h \
122         lib/stp.c \
123         lib/stp.h \
124         lib/stream-fd.c \
125         lib/stream-fd.h \
126         lib/stream-provider.h \
127         lib/stream-tcp.c \
128         lib/stream-unix.c \
129         lib/stream.c \
130         lib/stream.h \
131         lib/svec.c \
132         lib/svec.h \
133         lib/tag.c \
134         lib/tag.h \
135         lib/timeval.c \
136         lib/timeval.h \
137         lib/type-props.h \
138         lib/uuid.c \
139         lib/uuid.h \
140         lib/unixctl.c \
141         lib/unixctl.h \
142         lib/unicode.c \
143         lib/unicode.h \
144         lib/util.c \
145         lib/util.h \
146         lib/valgrind.h \
147         lib/vconn-provider.h \
148         lib/vconn-ssl.h \
149         lib/vconn-stream.c \
150         lib/vconn-stream.h \
151         lib/vconn-tcp.c \
152         lib/vconn-unix.c \
153         lib/vconn.c \
154         lib/vconn.h \
155         lib/vlog-modules.def \
156         lib/vlog.c \
157         lib/vlog.h \
158         lib/xtoxll.h
159 nodist_lib_libopenvswitch_a_SOURCES = \
160         lib/coverage-counters.c \
161         lib/dirs.c
162 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
163
164 if HAVE_NETLINK
165 lib_libopenvswitch_a_SOURCES += \
166         lib/netlink-protocol.h \
167         lib/netlink.c \
168         lib/netlink.h
169 endif
170
171 if HAVE_OPENSSL
172 lib_libopenvswitch_a_SOURCES += \
173         lib/vconn-ssl.c 
174 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
175 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
176         (echo '#include "lib/dhparams.h"' &&                            \
177          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
178          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
179          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
180         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
181         mv lib/dhparams.c.tmp lib/dhparams.c
182 endif
183
184 EXTRA_DIST += \
185         lib/dh1024.pem \
186         lib/dh2048.pem \
187         lib/dh4096.pem \
188         lib/dhparams.h
189
190 EXTRA_DIST += \
191         lib/common.man \
192         lib/common-syn.man \
193         lib/daemon.man \
194         lib/daemon-syn.man \
195         lib/dpif.man \
196         lib/leak-checker.man \
197         lib/vlog-unixctl.man \
198         lib/vlog-syn.man \
199         lib/vlog.man
200
201
202 lib/dirs.c: Makefile
203         ($(ro_c) && \
204          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
205          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
206          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
207          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
208         mv lib/dirs.c.tmp lib/dirs.c
209
210 install-data-local:
211         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
212         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
213         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
214
215 # All the source files that have coverage counters.
216 COVERAGE_FILES = \
217         lib/dpif.c \
218         lib/flow.c \
219         lib/lockfile.c \
220         lib/hmap.c \
221         lib/mac-learning.c \
222         lib/netdev.c \
223         lib/netdev-linux.c \
224         lib/netlink.c \
225         lib/odp-util.c \
226         lib/poll-loop.c \
227         lib/process.c \
228         lib/rconn.c \
229         lib/rtnetlink.c \
230         lib/stream.c \
231         lib/timeval.c \
232         lib/unixctl.c \
233         lib/util.c \
234         lib/vconn.c \
235         ofproto/ofproto.c \
236         ofproto/pktbuf.c \
237         vswitchd/bridge.c \
238         vswitchd/ovs-brcompatd.c
239 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
240         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
241         mv $@.tmp $@
242 EXTRA_DIST += lib/coverage-scan.pl