]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libpam/libpam/Makefile
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libpam / libpam / Makefile
1 #-
2 # Copyright (c) 1998 Juniper Networks, Inc.
3 # All rights reserved.
4 # Copyright (c) 2002 Networks Associates Technology, Inc.
5 # All rights reserved.
6 #
7 # Portions of this software was developed for the FreeBSD Project by
8 # ThinkSec AS and NAI Labs, the Security Research Division of Network
9 # Associates, Inc.  under DARPA/SPAWAR contract N66001-01-C-8035
10 # ("CBOSS"), as part of the DARPA CHATS research program.
11 #
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
14 # are met:
15 # 1. Redistributions of source code must retain the above copyright
16 #    notice, this list of conditions and the following disclaimer.
17 # 2. Redistributions in binary form must reproduce the above copyright
18 #    notice, this list of conditions and the following disclaimer in the
19 #    documentation and/or other materials provided with the distribution.
20 # 3. The name of the author may not be used to endorse or promote
21 #    products derived from this software without specific prior written
22 #    permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
25 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 # SUCH DAMAGE.
35 #
36 # $FreeBSD$
37
38 OPENPAM=        ${.CURDIR}/../../../contrib/openpam
39 .PATH: ${OPENPAM}/include ${OPENPAM}/lib ${OPENPAM}/doc/man
40
41 LIB=    pam
42 NO_PROFILE=
43
44 SRCS=   openpam_borrow_cred.c \
45         openpam_configure.c \
46         openpam_dispatch.c \
47         openpam_dynamic.c \
48         openpam_findenv.c \
49         openpam_free_data.c \
50         openpam_free_envlist.c \
51         openpam_get_option.c \
52         openpam_load.c \
53         openpam_log.c \
54         openpam_nullconv.c \
55         openpam_readline.c \
56         openpam_restore_cred.c \
57         openpam_set_option.c \
58         openpam_ttyconv.c \
59         pam_acct_mgmt.c \
60         pam_authenticate.c \
61         pam_chauthtok.c \
62         pam_close_session.c \
63         pam_end.c \
64         pam_error.c \
65         pam_get_authtok.c \
66         pam_get_data.c \
67         pam_get_item.c \
68         pam_get_user.c \
69         pam_getenv.c \
70         pam_getenvlist.c \
71         pam_info.c \
72         pam_open_session.c \
73         pam_prompt.c \
74         pam_putenv.c \
75         pam_set_data.c \
76         pam_set_item.c \
77         pam_setcred.c \
78         pam_setenv.c \
79         pam_start.c \
80         pam_strerror.c \
81         pam_verror.c \
82         pam_vinfo.c \
83         pam_vprompt.c
84 # Local additions
85 SRCS+=  pam_debug_log.c
86
87 MAN=    openpam.3 \
88         openpam_borrow_cred.3 \
89         openpam_free_data.3 \
90         openpam_free_envlist.3 \
91         openpam_get_option.3 \
92         openpam_log.3 \
93         openpam_nullconv.3 \
94         openpam_readline.3 \
95         openpam_restore_cred.3 \
96         openpam_set_option.3 \
97         openpam_ttyconv.3 \
98         pam.3 \
99         pam_acct_mgmt.3 \
100         pam_authenticate.3 \
101         pam_chauthtok.3 \
102         pam_close_session.3 \
103         pam_conv.3 \
104         pam_end.3 \
105         pam_error.3 \
106         pam_get_authtok.3 \
107         pam_get_data.3 \
108         pam_get_item.3 \
109         pam_get_user.3 \
110         pam_getenv.3 \
111         pam_getenvlist.3 \
112         pam_info.3 \
113         pam_open_session.3 \
114         pam_prompt.3 \
115         pam_putenv.3 \
116         pam_set_data.3 \
117         pam_set_item.3 \
118         pam_setcred.3 \
119         pam_setenv.3 \
120         pam_sm_acct_mgmt.3 \
121         pam_sm_authenticate.3 \
122         pam_sm_chauthtok.3 \
123         pam_sm_close_session.3 \
124         pam_sm_open_session.3 \
125         pam_sm_setcred.3 \
126         pam_start.3 \
127         pam_strerror.3 \
128         pam_verror.3 \
129         pam_vinfo.3 \
130         pam_vprompt.3 \
131         pam.conf.5
132
133 MLINKS= pam.conf.5 pam.d.5
134
135 CSTD?= c99
136 WARNS?= 3
137 CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include
138 CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR}
139 CFLAGS+= -DOPENPAM_MODULES_DIR='"${PAM_MOD_DIR:C/\/*$//}/"'
140
141 HEADERS=        security/openpam.h \
142                 security/openpam_attr.h \
143                 security/openpam_version.h \
144                 security/pam_appl.h \
145                 security/pam_constants.h \
146                 security/pam_modules.h \
147                 security/pam_types.h \
148
149 ADD_HEADERS=    security/pam_mod_misc.h
150
151 # Static modules
152 MODULE_DIR=     ../modules
153 .include "${.CURDIR}/${MODULE_DIR}/modules.inc"
154 STATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/}
155 STATICOBJS+=    openpam_static_modules.o
156 CLEANFILES+=    openpam_static.o \
157                 openpam_static_modules.o
158
159 openpam_static_modules.o: openpam_static.o ${STATIC_MODULES}
160         ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
161
162 # Can't put openpam_static.c in SRCS but want .o in .depend.
163 DPSRCS=         openpam_static.c
164
165 # Headers
166 INCS=           ${HEADERS} ${ADD_HEADERS}
167 INCSDIR=        ${INCLUDEDIR}/security
168
169 .include <bsd.lib.mk>