38f58e5fec2ce193bf0fa10431076121f2c2b4c6
[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/csum.c \
6         lib/daemon.c \
7         lib/dhcp-client.c \
8         lib/dhcp.c \
9         lib/dynamic-string.c \
10         lib/fatal-signal.c \
11         lib/fault.c \
12         lib/flow.c \
13         lib/hash.c \
14         lib/learning-switch.c \
15         lib/list.c \
16         lib/mac-learning.c \
17         lib/netdev.c \
18         lib/ofpbuf.c \
19         lib/ofp-print.c \
20         lib/poll-loop.c \
21         lib/port-array.c \
22         lib/queue.c \
23         lib/random.c \
24         lib/rconn.c \
25         lib/socket-util.c \
26         lib/timeval.c \
27         lib/stp.c \
28         lib/util.c \
29         lib/vconn-tcp.c \
30         lib/vconn-unix.c \
31         lib/vconn-stream.c \
32         lib/vconn.c \
33         lib/vlog-socket.c \
34         lib/dirs.c \
35         lib/vlog.c
36
37 if HAVE_NETLINK
38 lib_libopenflow_a_SOURCES += \
39         lib/dpif.c \
40         lib/netlink.c \
41         lib/vconn-netlink.c
42 endif
43
44 if HAVE_OPENSSL
45 lib_libopenflow_a_SOURCES += \
46         lib/vconn-ssl.c 
47 nodist_lib_libopenflow_a_SOURCES = lib/dhparams.c
48 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
49         (echo '#include "lib/dhparams.h"' &&                            \
50          openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&      \
51          openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&      \
52          openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)        \
53         | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
54         mv lib/dhparams.c.tmp lib/dhparams.c
55 endif
56
57 EXTRA_DIST += \
58         lib/dh1024.pem \
59         lib/dh2048.pem \
60         lib/dh4096.pem \
61         lib/dhparams.h
62
63 CLEANFILES += lib/dirs.c
64 lib/dirs.c: Makefile
65         ($(ro_c) && \
66          echo 'const char ofp_pkgdatadir[] = "$(pkgdatadir$)";' && \
67          echo 'const char ofp_rundir[] = "@RUNDIR@";' && \
68          echo 'const char ofp_logdir[] = "@LOGDIR@";') > lib/dirs.c.tmp
69         mv lib/dirs.c.tmp lib/dirs.c
70
71 install-data-local:
72         $(MKDIR_P) $(DESTDIR)$(RUNDIR)
73         $(MKDIR_P) $(DESTDIR)$(PKIDIR)
74         $(MKDIR_P) $(DESTDIR)$(LOGDIR)