Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.
[sliver-openvswitch.git] / lib / automake.mk
1 noinst_LIBRARIES += lib/libopenvswitch.a
2
3 lib_libopenvswitch_a_SOURCES = \
4         lib/backtrace.c \
5         lib/backtrace.h \
6         lib/bitmap.c \
7         lib/bitmap.h \
8         lib/cfg.c \
9         lib/cfg.h \
10         lib/classifier.c \
11         lib/classifier.h \
12         lib/command-line.c \
13         lib/command-line.h \
14         lib/compiler.h \
15         lib/coverage.c \
16         lib/coverage.h \
17         lib/coverage-counters.c \
18         lib/coverage-counters.h \
19         lib/csum.c \
20         lib/csum.h \
21         lib/daemon.c \
22         lib/daemon.h \
23         lib/dhcp-client.c \
24         lib/dhcp-client.h \
25         lib/dhcp.c \
26         lib/dhcp.h \
27         lib/dhparams.h \
28         lib/dirs.c \
29         lib/dirs.h \
30         lib/dynamic-string.c \
31         lib/dynamic-string.h \
32         lib/fatal-signal.c \
33         lib/fatal-signal.h \
34         lib/fault.c \
35         lib/fault.h \
36         lib/flow.c \
37         lib/flow.h \
38         lib/hash.c \
39         lib/hash.h \
40         lib/hmap.c \
41         lib/hmap.h \
42         lib/leak-checker.c \
43         lib/leak-checker.h \
44         lib/learning-switch.c \
45         lib/learning-switch.h \
46         lib/list.c \
47         lib/list.h \
48         lib/mac-learning.c \
49         lib/mac-learning.h \
50         lib/netdev.c \
51         lib/netdev.h \
52         lib/odp-util.c \
53         lib/odp-util.h \
54         lib/ofp-print.c \
55         lib/ofp-print.h \
56         lib/ofpbuf.c \
57         lib/ofpbuf.h \
58         lib/packets.h \
59         lib/pcap.c \
60         lib/pcap.h \
61         lib/poll-loop.c \
62         lib/poll-loop.h \
63         lib/port-array.c \
64         lib/port-array.h \
65         lib/process.c \
66         lib/process.h \
67         lib/queue.c \
68         lib/queue.h \
69         lib/random.c \
70         lib/random.h \
71         lib/rconn.c \
72         lib/rconn.h \
73         lib/sat-math.h \
74         lib/sha1.c \
75         lib/sha1.h \
76         lib/shash.c \
77         lib/shash.h \
78         lib/signals.c \
79         lib/signals.h \
80         lib/socket-util.c \
81         lib/socket-util.h \
82         lib/stp.c \
83         lib/stp.h \
84         lib/svec.c \
85         lib/svec.h \
86         lib/tag.c \
87         lib/tag.h \
88         lib/timeval.c \
89         lib/timeval.h \
90         lib/type-props.h \
91         lib/unixctl.c \
92         lib/unixctl.h \
93         lib/util.c \
94         lib/util.h \
95         lib/valgrind.h \
96         lib/vconn-provider.h \
97         lib/vconn-ssl.h \
98         lib/vconn-stream.c \
99         lib/vconn-stream.h \
100         lib/vconn-tcp.c \
101         lib/vconn-unix.c \
102         lib/vconn.c \
103         lib/vconn.h \
104         lib/vlog-modules.def \
105         lib/vlog.c \
106         lib/vlog.h \
107         lib/xtoxll.h
108
109 if HAVE_NETLINK
110 lib_libopenvswitch_a_SOURCES += \
111         lib/dpif.c \
112         lib/dpif.h \
113         lib/netlink-protocol.h \
114         lib/netlink.c \
115         lib/netlink.h
116 endif
117
118 if HAVE_OPENSSL
119 lib_libopenvswitch_a_SOURCES += \
120         lib/vconn-ssl.c 
121 nodist_lib_libopenvswitch_a_SOURCES = lib/dhparams.c
122 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
123         (echo '#include "lib/dhparams.h"' &&                            \
124          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
125          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
126          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
127         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
128         mv lib/dhparams.c.tmp lib/dhparams.c
129 endif
130
131 EXTRA_DIST += \
132         lib/dh1024.pem \
133         lib/dh2048.pem \
134         lib/dh4096.pem \
135         lib/dhparams.h
136
137 EXTRA_DIST += \
138         lib/common.man \
139         lib/daemon.man \
140         lib/dpif.man \
141         lib/leak-checker.man \
142         lib/vlog.man
143
144
145 CLEANFILES += lib/dirs.c
146 lib/dirs.c: Makefile
147         ($(ro_c) && \
148          echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
149          echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
150          echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
151          echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
152         mv lib/dirs.c.tmp lib/dirs.c
153
154 install-data-local:
155         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
156         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
157         $(MKDIR_P) $(DESTDIR)$(LOGDIR)
158
159 # All the source files that have coverage counters.
160 COVERAGE_FILES = \
161         lib/cfg.c \
162         lib/dpif.c \
163         lib/flow.c \
164         lib/hmap.c \
165         lib/mac-learning.c \
166         lib/netdev.c \
167         lib/netlink.c \
168         lib/odp-util.c \
169         lib/poll-loop.c \
170         lib/process.c \
171         lib/rconn.c \
172         lib/timeval.c \
173         lib/unixctl.c \
174         lib/util.c \
175         lib/vconn.c \
176         secchan/ofproto.c \
177         secchan/pktbuf.c \
178         vswitchd/bridge.c \
179         vswitchd/mgmt.c \
180         vswitchd/ovs-brcompatd.c
181 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
182         (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
183         mv $@.tmp $@
184 EXTRA_DIST += lib/coverage-scan.pl