Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / pam / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3 #
4 # This software has been released under the terms of the IBM Public
5 # License. For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
11 include @TOP_OBJDIR@/src/config/Makefile.libtool
12
13 LT_objs = afs_account.lo afs_session.lo afs_password.lo \
14 afs_pam_msg.lo afs_message.lo \
15 $(top_builddir)/src/opr/libopr_pic.la \
16 $(top_builddir)/src/comerr/libcomerr_pic.la \
17 $(top_builddir)/src/rx/librx_pic.la \
18 $(top_builddir)/src/rxkad/librxkad_pic.la \
19 $(top_builddir)/src/audit/libaudit_pic.la \
20 $(top_builddir)/src/util/libafsutil_pic.la \
21 $(top_builddir)/src/sys/libsys_pic.la \
22 $(top_builddir)/src/ubik/libauthent_ubik.la \
23 $(top_builddir)/src/ptserver/libprot_pic.la \
24 $(top_builddir)/src/kauth/libkauth_pic.la \
25 $(top_builddir)/src/auth/libpam_auth.la \
26 $(top_builddir)/src/crypto/rfc3961/librfc3961_pic.la
27 LT_deps =
28 LT_libs = \
29 $(PAM_LIBS) $(LDFLAGS_hcrypto) $(LDFLAGS_roken) \
30 $(LIB_hcrypto) $(LIB_roken) $(LIB_crypt) $(LIB_AFSDB)
31
32 INSTALL_KAUTH = @INSTALL_KAUTH@
33
34 MODULE_CFLAGS=${PAM_CFLAGS}
35
36 all: test_pam pam_afs.la pam_afs.krb.la
37
38 CFLAGS_afs_setcred_krb.lo = -DAFS_KERBEROS_ENV
39 CFLAGS_afs_auth_krb.lo = -DAFS_KERBEROS_ENV
40 CFLAGS_afs_util_krb.lo = -DAFS_KERBEROS_ENV
41 CFLAGS_ktc_krb.lo = -DAFS_KERBEROS_ENV -I../auth
42 CFLAGS_ktc.lo = -I../auth
43
44 afs_setcred.lo: afs_setcred.c afs_pam_msg.h afs_message.h afs_util.h
45 afs_setcred_krb.lo: afs_setcred.c afs_pam_msg.h afs_message.h afs_util.h
46 $(LT_CCRULE) ${srcdir}/afs_setcred.c
47
48 afs_auth.lo: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
49 afs_auth_krb.lo: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
50 $(LT_CCRULE) ${srcdir}/afs_auth.c
51
52 afs_util.lo: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
53 afs_util_krb.lo: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
54 $(LT_CCRULE) ${srcdir}/afs_util.c
55
56 ktc.lo: ${srcdir}/../auth/ktc.c ${TOP_INCDIR}/afs/cellconfig.h \
57 ${TOP_INCDIR}/afs/auth.h ${srcdir}/../auth/keys.h \
58 ${TOP_INCDIR}/afs/vice.h
59 $(LT_CCRULE) $(srcdir)/../auth/ktc.c
60 ktc_krb.lo: ${srcdir}/../auth/ktc.c ${TOP_INCDIR}/afs/cellconfig.h \
61 ${TOP_INCDIR}/afs/auth.h ${srcdir}/../auth/keys.h \
62 ${TOP_INCDIR}/afs/vice.h
63 $(LT_CCRULE) $(srcdir)/../auth/ktc.c
64
65 pam_afs.la: $(LT_objs) $(LT_deps) \
66 afs_setcred.lo afs_auth.lo afs_util.lo ktc.lo \
67 pam_afs.map
68 $(LIBTOOL) --quiet --mode=link --tag=CC $(MT_CC) $(XLDFLAGS) -rpath $(libdir) \
69 -module -no-undefined -o pam_afs.la \
70 afs_setcred.lo afs_auth.lo afs_util.lo ktc.lo \
71 $(LT_objs) $(LT_deps) $(LT_libs)
72
73 pam_afs.krb.la: $(LT_objs) $(LT_deps) \
74 afs_setcred_krb.lo afs_auth_krb.lo afs_util_krb.lo \
75 ktc_krb.lo pam_afs.map
76 $(LIBTOOL) --quiet --mode=link --tag=CC $(MT_CC) $(XLDFLAGS) -rpath $(libdir) \
77 -module -no-undefined -o pam_afs.krb.la \
78 afs_setcred_krb.lo afs_auth_krb.lo afs_util_krb.lo ktc_krb.lo \
79 $(LT_objs) $(LT_deps) $(LT_libs)
80
81 test_pam: test_pam.o
82 $(Q)set -x; \
83 case "$(SYS_NAME)" in \
84 hp_ux* | ia64_hpux*) \
85 $(AFS_LDRULE_NOQ) test_pam.o ${PAM_LIBS};; \
86 sun*_5*) \
87 $(AFS_LDRULE_NOQ) test_pam.o ${PAM_LIBS};; \
88 *linux*) \
89 $(AFS_LDRULE_NOQ) -rdynamic test_pam.o -lpam -ldl;; \
90 *fbsd*| *nbsd*) \
91 $(AFS_LDRULE_NOQ) -rdynamic test_pam.o -lpam ;; \
92 *) \
93 echo No link line for system $(SYS_NAME). ;; \
94 esac
95
96 install: pam_afs.la pam_afs.krb.la
97 if [ "x${INSTALL_KAUTH}" = "xyes" ]; then \
98 ${INSTALL} -d ${DESTDIR}${libdir}; \
99 $(INSTALL_DATA) .libs/pam_afs.so ${DESTDIR}${libdir}; \
100 $(INSTALL_DATA) .libs/pam_afs.krb.so ${DESTDIR}${libdir}; \
101 fi
102
103 dest: pam_afs.la pam_afs.krb.la
104 if [ "x${INSTALL_KAUTH}" = "xyes" ]; then \
105 ${INSTALL} -d ${DEST}/lib; \
106 $(INSTALL_DATA) .libs/pam_afs.so ${DEST}/lib; \
107 $(INSTALL_DATA) .libs/pam_afs.krb.so ${DEST}/lib; \
108 fi
109
110 afs_pam_msg.o: afs_pam_msg.c afs_pam_msg.h afs_message.h
111 afs_message.o: afs_message.c afs_message.h
112
113 #
114 # Misc. targets
115 #
116 clean:
117 $(LT_CLEAN)
118 $(RM) -f *.a *.o *.so.1 test_pam core *~ \
119 AFS_component_version_number.c pam_afs.exp
120
121 include ../config/Makefile.version