1 AM_CFLAGS = -Wall -Wextra -D_FORTIFY_SOURCE=2 $(PIE_CFLAGS) $(RELRO_CFLAGS)
2 ACLOCAL_AMFLAGS = -I aclocal
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) $(RT_LDADD)
8 include_HEADERS = cifsidmap.h
9 rst_man_pages = mount.cifs.8
12 # Generate man pages troff source from POD format
19 RST2MAN = $(have_rst2man) --syntax-highlight=none $< $@
31 sbin_PROGRAMS += cifs.upcall
32 cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c
33 cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD) $(CAPNG_LDADD)
34 rst_man_pages += cifs.upcall.8
36 # Fix the pathnames in manpages. To prevent @label@ being replaced by m4, we
37 # need to obfuscate the LHS of the regex (hence the trivial one character set).
39 cifs.upcall.rst: cifs.upcall.rst.in
40 $(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/$@.in > $@-t && mv $@-t $@
44 bin_PROGRAMS += cifscreds
45 cifscreds_SOURCES = cifscreds.c cifskey.c resolve_host.c util.c
46 cifscreds_LDADD = -lkeyutils
48 rst_man_pages += cifscreds.1
53 sbin_PROGRAMS += cifs.idmap
54 cifs_idmap_SOURCES = cifs.idmap.c idmap_plugin.c
55 cifs_idmap_LDADD = -lkeyutils -ldl
56 rst_man_pages += cifs.idmap.8
57 CLEANFILES += cifs.idmap.rst
58 cifs.idmap.rst: cifs.idmap.rst.in
59 $(SED) -e 's,[@]sbindir@,$(sbindir),' -e 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
63 bin_PROGRAMS += getcifsacl
64 getcifsacl_SOURCES = getcifsacl.c idmap_plugin.c
65 getcifsacl_LDADD = -ldl
67 rst_man_pages += getcifsacl.1
68 CLEANFILES += getcifsacl.rst
69 getcifsacl.rst: getcifsacl.rst.in
70 $(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
72 bin_PROGRAMS += setcifsacl
73 setcifsacl_SOURCES = setcifsacl.c idmap_plugin.c
74 setcifsacl_LDADD = -ldl
76 rst_man_pages += setcifsacl.1
77 CLEANFILES += setcifsacl.rst
78 setcifsacl.rst: setcifsacl.rst.in
79 $(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
83 bin_PROGRAMS += smbinfo
84 smbinfo_SOURCES = smbinfo.c
85 rst_man_pages += smbinfo.1
89 plugindir = $(pkglibdir)
90 plugin_PROGRAMS = idmapwb.so
92 $(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(WBCLIENT_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ $(WBCLIENT_LIBS)
94 rst_man_pages += idmapwb.8
95 CLEANFILES += idmapwb.rst
96 idmapwb.rst: idmapwb.rst.in
97 $(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
101 pam_PROGRAMS = pam_cifscreds.so
102 rst_man_pages += pam_cifscreds.8
103 pam_cifscreds.so: pam_cifscreds.c cifskey.c resolve_host.c util.c
104 $(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ -lpam -lkeyutils
109 man_MANS += $(rst_man_pages)
110 CLEANFILES += $(rst_man_pages)