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