]> arthur.barton.de Git - netatalk.git/blob - etc/uams/Makefile.am
f344064372d585ec387adec214dd3d8cad438b4f
[netatalk.git] / etc / uams / Makefile.am
1 # Makefile.am for etc/uams/
2
3 if USE_DHX
4 DHX_UAMS = uams_dhx_pam.so uams_dhx_passwd.so uams_dhx.so uams_pgp.so
5 endif
6
7 uamsdir = $(CONFIG_DIR)/uams
8 uams_DATA = $(DHX_UAMS) uams_guest.so \
9         uams_pam.so uams_passwd.so \
10         uams_randnum.so uams_clrtxt.so
11
12 EXTRA_DIST = uams_dhx_pam.c uams_dhx_passwd.c uams_pgp.c \
13         uams_guest.c uams_pam.c uams_passwd.c uams_randnum.c
14
15 #
16 # standard library compilation:
17 #
18
19 SUFFIXES = .c .so
20 .c.so:
21         $(COMPILE) -DHAVE_CONFIG_H -fPIC -DPIC \
22           -I$(top_srcdir) -fomit-frame-pointer -c $< ; \
23         $(LD) -shared -o $@ $*.o $(LIBS)
24
25 #
26 # create symbolic links (conditionally, depending on when PAM is used):
27 #
28
29 if USE_PAM
30
31 uams_clrtxt.so:
32         $(LN_S) uams_pam.so uams_clrtxt.so
33
34 uams_dhx.so:
35         $(LN_S) uams_dhx_pam.so uams_dhx.so
36
37 else
38
39 uams_clrtxt.so:
40         $(LN_S) uams_passwd.so uams_clrtxt.so
41
42 uams_dhx.so:
43         $(LN_S) uams_dhx_passwd.so uams_dhx.so
44
45 endif
46
47 #
48 # install/install-strip:
49 #
50
51 install:
52         mkdir -p $(DESTDIR)$(UAMS_PATH); \
53         rm -f $(DESTDIR)$(UAMS_PATH)/uams_{clrtxt,dhx}.so; \
54         cp -dpf $(uams_DATA) $(DESTDIR)$(UAMS_PATH)/
55
56 install-strip:
57         strip $(uams_DATA); \
58         $(MAKE) $(AM_MAKEFLAGS) install
59
60 #
61 # cleanup
62 #
63
64 clean distclean clean-recursive distclean-recursive:
65         $(RM) $(uams_DATA) *.o core