Update required Autoconf version in INSTALL.
[sliver-openvswitch.git] / lib / automake.mk
1 noinst_LIBRARIES += lib/libopenflow.a
2
3 lib_libopenflow_a_SOURCES = \
4         lib/command-line.c \
5         lib/command-line.h \
6         lib/compiler.h \
7         lib/csum.c \
8         lib/csum.h \
9         lib/daemon.c \
10         lib/daemon.h \
11         lib/dhcp-client.c \
12         lib/dhcp-client.h \
13         lib/dhcp.c \
14         lib/dhcp.h \
15         lib/dhparams.h \
16         lib/dirs.c \
17         lib/dirs.h \
18         lib/dynamic-string.c \
19         lib/dynamic-string.h \
20         lib/fatal-signal.c \
21         lib/fatal-signal.h \
22         lib/fault.c \
23         lib/fault.h \
24         lib/flow.c \
25         lib/flow.h \
26         lib/hash.c \
27         lib/hash.h \
28         lib/learning-switch.c \
29         lib/learning-switch.h \
30         lib/list.c \
31         lib/list.h \
32         lib/mac-learning.c \
33         lib/mac-learning.h \
34         lib/netdev.c \
35         lib/netdev.h \
36         lib/ofp-print.c \
37         lib/ofp-print.h \
38         lib/ofpbuf.c \
39         lib/ofpbuf.h \
40         lib/packets.h \
41         lib/poll-loop.c \
42         lib/poll-loop.h \
43         lib/port-array.c \
44         lib/port-array.h \
45         lib/queue.c \
46         lib/queue.h \
47         lib/random.c \
48         lib/random.h \
49         lib/rconn.c \
50         lib/rconn.h \
51         lib/sat-math.h \
52         lib/socket-util.c \
53         lib/socket-util.h \
54         lib/stp.c \
55         lib/stp.h \
56         lib/timeval.c \
57         lib/timeval.h \
58         lib/type-props.h \
59         lib/util.c \
60         lib/util.h \
61         lib/vconn-provider.h \
62         lib/vconn-ssl.h \
63         lib/vconn-stream.c \
64         lib/vconn-stream.h \
65         lib/vconn-tcp.c \
66         lib/vconn-unix.c \
67         lib/vconn.c \
68         lib/vconn.h \
69         lib/vlog-modules.def \
70         lib/vlog-socket.c \
71         lib/vlog-socket.h \
72         lib/vlog.c \
73         lib/vlog.h \
74         lib/xtoxll.h
75
76 if HAVE_NETLINK
77 lib_libopenflow_a_SOURCES += \
78         lib/dpif.c \
79         lib/dpif.h \
80         lib/netlink-protocol.h \
81         lib/netlink.c \
82         lib/netlink.h \
83         lib/vconn-netlink.c
84 endif
85
86 if HAVE_OPENSSL
87 lib_libopenflow_a_SOURCES += \
88         lib/vconn-ssl.c 
89 nodist_lib_libopenflow_a_SOURCES = lib/dhparams.c
90 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
91         (echo '#include "lib/dhparams.h"' &&                            \
92          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
93          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
94          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
95         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
96         mv lib/dhparams.c.tmp lib/dhparams.c
97 endif
98
99 EXTRA_DIST += \
100         lib/dh1024.pem \
101         lib/dh2048.pem \
102         lib/dh4096.pem \
103         lib/dhparams.h
104
105 CLEANFILES += lib/dirs.c
106 lib/dirs.c: Makefile
107         ($(ro_c) && \
108          echo 'const char ofp_pkgdatadir[] = "$(pkgdatadir$)";' && \
109          echo 'const char ofp_rundir[] = "@RUNDIR@";' && \
110          echo 'const char ofp_logdir[] = "@LOGDIR@";') > lib/dirs.c.tmp
111         mv lib/dirs.c.tmp lib/dirs.c
112
113 install-data-local:
114         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
115         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
116         $(MKDIR_P) $(DESTDIR)$(LOGDIR)