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