Refactor the negotiate() and connected functions
[nbd.git] / Makefile.am
blobb32ec8119ea6a3dd8a4a80e10391df40f3659cf1
1 ACLOCAL_AMFLAGS = -I support
2 SUBDIRS = . man doc tests systemd
3 bin_PROGRAMS = nbd-server nbd-trdump nbd-trplay
4 EXTRA_PROGRAMS = nbd-client make-integrityhuge
5 noinst_LTLIBRARIES = libnbdsrv.la libcliserv.la libnbdclt.la
6 libcliserv_la_SOURCES = cliserv.h cliserv.c
7 libcliserv_la_CFLAGS = @CFLAGS@
8 client_srcs = nbd-client.c cliserv.h nbd-netlink.h
9 nbd_server_SOURCES = nbd-server.c cliserv.h lfs.h nbd.h nbdsrv.h backend.h \
10         netdb-compat.h nbd-helper.h
11 nbd_trdump_SOURCES = nbd-trdump.c cliserv.h nbd.h
12 nbd_trplay_SOURCES = nbd-trplay.c cliserv.h nbd.h
13 client_flags = @CFLAGS@
14 nbd_server_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
15 nbd_trdump_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
16 nbd_trplay_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
17 libnbdsrv_la_SOURCES = nbdsrv.c nbdsrv.h treefiles.c treefiles.h
18 libnbdsrv_la_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
19 client_libs = libcliserv.la libnbdclt.la
20 nbd_server_LDADD = @GLIB_LIBS@ libnbdsrv.la libcliserv.la
21 nbd_trdump_LDADD = libcliserv.la
22 nbd_trplay_LDADD = libcliserv.la
23 make_integrityhuge_SOURCES = make-integrityhuge.c cliserv.h nbd.h nbd-debug.h
24 EXTRA_DIST = maketr CodingStyle autogen.sh README.md support/genver.sh
25 if GNUTLS
26 nbd_server_CFLAGS += @GnuTLS_CFLAGS@
27 nbd_server_LDADD += @GnuTLS_LIBS@
28 endif
29 if CLIENT
30 sbin_PROGRAMS = nbd-client
31 if GNUTLS
32 sbin_PROGRAMS += min-nbd-client
33 min_nbd_client_SOURCES = $(client_srcs)
34 min_nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"min-nbd-client"'
35 min_nbd_client_LDADD = $(client_libs)
36 nbd_client_SOURCES = $(client_srcs) crypto-gnutls.c crypto-gnutls.h buffer.c buffer.h
37 nbd_client_CFLAGS = $(client_flags) @GnuTLS_CFLAGS@ -DPROG_NAME='"nbd-client"'
38 nbd_client_LDADD = $(client_libs) @GnuTLS_LIBS@
39 else
40 nbd_client_SOURCES = $(client_srcs)
41 nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"nbd-client"'
42 nbd_client_LDADD = $(client_libs)
43 endif
44 endif
46 libnbdclt_la_SOURCES = nbdtab_parser.tab.h nbdtab_parser.y nbdtab_lexer.l nbdclt.h
47 BUILT_SOURCES = nbdtab_parser.tab.h
49 nbd-client.c: $(builddir)/nbdtab_parser.tab.h
50 nbdtab_parser.tab.h: $(srcdir)/nbdtab_parser.y
51         bison -d $^ > $@
53 AM_DISTCHECK_CONFIGURE_FLAGS=--enable-syslog
55 if NETLINK
56 bin_PROGRAMS += nbd-get-status
57 nbd_get_status_SOURCES = nbd-get-status.c cliserv.c
58 nbd_get_status_CFLAGS = @CFLAGS@
59 endif