autoconf: set version to 5.8.1 for interim builds
[jlayton/cifs-utils.git] / Makefile.am
1 AM_CFLAGS = -Wall -Wextra -D_FORTIFY_SOURCE=2 $(PIE_CFLAGS) $(RELRO_CFLAGS)
2 ACLOCAL_AMFLAGS = -I aclocal
3
4 root_sbindir = $(ROOTSBINDIR)
5 root_sbin_PROGRAMS = mount.cifs
6 mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
7 mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD)
8
9 man_MANS = mount.cifs.8
10
11 bin_PROGRAMS =
12 sbin_PROGRAMS =
13 clean-local: clean-local-upcall clean-local-idmap
14
15 if CONFIG_CIFSUPCALL
16 sbin_PROGRAMS += cifs.upcall
17 cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c
18 cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD)
19 man_MANS += cifs.upcall.8
20
21 #
22 # Fix the pathnames in manpages. To prevent @label@ being replaced by m4, we
23 # need to obfuscate the LHS of the regex (hence the trivial one character set).
24 #
25 cifs.upcall.8: cifs.upcall.8.in
26         $(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/$@.in > $@-t && mv $@-t $@
27 endif
28
29 clean-local-upcall:
30 if CONFIG_CIFSUPCALL
31         rm -f cifs.upcall.8 cifs.upcall.8-t
32 endif
33
34 if CONFIG_CIFSCREDS
35 bin_PROGRAMS += cifscreds
36 cifscreds_SOURCES = cifscreds.c resolve_host.c util.c
37 cifscreds_LDADD = -lkeyutils
38 man_MANS += cifscreds.1
39 endif
40
41 if CONFIG_CIFSIDMAP
42 sbin_PROGRAMS += cifs.idmap
43 cifs_idmap_SOURCES = cifs.idmap.c
44 cifs_idmap_LDADD = -lkeyutils $(WBCLIENT_LIBS)
45 cifs_idmap_CFLAGS = $(WBCLIENT_CFLAGS)
46 man_MANS += cifs.idmap.8
47
48 cifs.idmap.8: cifs.idmap.8.in
49         $(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/$@.in > $@-t && mv $@-t $@
50 endif
51
52 clean-local-idmap:
53 if CONFIG_CIFSIDMAP
54         rm -f cifs.idmap.8 cifs.idmap.8-t
55 endif
56
57 if CONFIG_CIFSACL
58 bin_PROGRAMS += getcifsacl
59 getcifsacl_SOURCES = getcifsacl.c
60 getcifsacl_LDADD = $(WBCLIENT_LIBS)
61 getcifsacl_CFLAGS = $(WBCLIENT_CFLAGS)
62 man_MANS += getcifsacl.1
63
64 bin_PROGRAMS += setcifsacl
65 setcifsacl_SOURCES = setcifsacl.c
66 setcifsacl_LDADD = $(WBCLIENT_LIBS)
67 setcifsacl_CFLAGS = $(WBCLIENT_CFLAGS)
68 man_MANS += setcifsacl.1
69 endif
70
71 SUBDIRS = contrib