Start removing the old build infrastructure for the a.out
[dragonfly.git] / lib / libpam / libpam / Makefile
CommitLineData
984263bc
MD
1# Copyright 1998 Juniper Networks, Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1. Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# 2. Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
12#
13# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23# SUCH DAMAGE.
24#
25# $FreeBSD: src/lib/libpam/libpam/Makefile,v 1.12.2.12 2002/07/22 14:21:49 ru Exp $
aa8d5dcb 26# $DragonFly: src/lib/libpam/libpam/Attic/Makefile,v 1.5 2004/03/20 16:27:40 drhodus Exp $
984263bc
MD
27
28PAMDIR= ${.CURDIR}/../../../contrib/libpam
29MODOBJDIR= ../modules
30
31.PATH: ${PAMDIR}/libpam ${PAMDIR}/libpam_misc ${PAMDIR}/doc/man
32
33LIB= pam
34CFLAGS+= -I${PAMDIR}/libpam/include -I${.CURDIR}
35CFLAGS+= -DDEFAULT_MODULE_PATH=\"${SHLIBDIR}/\"
36NOPROFILE= yes
37
38# Files from ${PAMDIR}/libpam:
39SRCS= pam_account.c pam_auth.c pam_data.c pam_delay.c \
40 pam_dispatch.c pam_end.c pam_env.c pam_handlers.c \
41 pam_item.c pam_log.c pam_misc.c pam_password.c \
42 pam_second.c pam_session.c pam_start.c \
43 pam_strerror.c
44HDRS1= _pam_compat.h _pam_macros.h _pam_types.h \
45 pam_appl.h pam_malloc.h pam_modules.h
46MAN+= pam_authenticate.3 pam_chauthtok.3 pam_fail_delay.3 \
47 pam_open_session.3 pam_setcred.3 pam_start.3 \
48 pam_strerror.3
49MLINKS+= pam_open_session.3 pam_close_session.3 \
50 pam_start.3 pam_end.3
51MAN+= pam.8
52MLINKS+= pam.8 pam.conf.5 pam.8 pam.d.5
53
54# Files from ${PAMDIR}/libpam_misc:
55SRCS+= help_env.c misc_conv.c xstrdup.c
56HDRS2= pam_misc.h
57
58# Files from ${.CURDIR}:
59SRCS+= pam_debug_log.c pam_get_pass.c pam_prompt.c pam_std_option.c
60SRCS+= openpam_borrow_cred.c openpam_restore_cred.c
61HDRS3= security/pam_mod_misc.h
62MAN+= pam_set_item.3
63MLINKS+= pam_set_item.3 pam_get_item.3
64
65# Static PAM modules:
66STATIC_MODULES+= ${MODOBJDIR}/pam_cleartext_pass_ok/libpam_cleartext_pass_ok.a
67STATIC_MODULES+= ${MODOBJDIR}/pam_deny/libpam_deny.a
984263bc
MD
68.if defined(MAKE_KERBEROS5__) && !defined(NOCRYPT) && !defined(NO_OPENSSL)
69STATIC_MODULES+= ${MODOBJDIR}/pam_kerberos5/libpam_kerberos5.a
70.endif
71STATIC_MODULES+= ${MODOBJDIR}/pam_opie/libpam_opie.a
72STATIC_MODULES+= ${MODOBJDIR}/pam_permit/libpam_permit.a
73STATIC_MODULES+= ${MODOBJDIR}/pam_radius/libpam_radius.a
74STATIC_MODULES+= ${MODOBJDIR}/pam_skey/libpam_skey.a
75STATIC_MODULES+= ${MODOBJDIR}/pam_tacplus/libpam_tacplus.a
76STATIC_MODULES+= ${MODOBJDIR}/pam_unix/libpam_unix.a
77
78STATICOBJS+= pam_static_modules.o
79CLEANFILES+= pam_static.o
80
81_EXTRADEPEND: pam_static.c
82 ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
83 ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*} \
84 ${.ALLSRC}
85
6af3b87d 86CLEANFILES+= _pam_static_modules.o
984263bc 87
6af3b87d 88pam_static_modules.o: pam_static.o _pam_static_modules.o
984263bc
MD
89 ${LD} -o ${.TARGET} -r ${.ALLSRC}
90
984263bc
MD
91_pam_static_modules.o: ${STATIC_MODULES}
92 ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
984263bc
MD
93
94# Headers
95INCS= ${HDRS1:S;^;${PAMDIR}/libpam/include/security/;} \
96 ${HDRS2} ${HDRS3}
97INCSDIR= ${INCLUDEDIR}/security
98
99.include <bsd.lib.mk>