aboutsummaryrefslogtreecommitdiff
path: root/lib/libpam/libpam
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-04-14 01:17:03 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-04-14 01:17:03 +0000
commit7cbd0a2953a27e74f8b1b261808068719c1f5260 (patch)
tree71e89abc8204df2fa8e108073d7c39eecd2f59ca /lib/libpam/libpam
parent2d57dc7e6e01f3e8166db91ab1be0cd8f19ef0f2 (diff)
downloadsrc-7cbd0a2953a27e74f8b1b261808068719c1f5260.tar.gz
src-7cbd0a2953a27e74f8b1b261808068719c1f5260.zip
Simplify building libpam and fix libpam.a not containing the modules since r284345.
The change in r284345 moved the creation of openpam_static_modules.o to lib/libpam/static_modules but never managed to get them into libpam.a. Move this logic to lib/libpam/static_libpam and have it create a static library for libpam.a The main lib/libpam/libpam will only create a shared library. No redundancy in compilation or installation exists in this solution. This avoids requiring a pass with -D_NO_LIBPAM_SO_YET. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=297946
Diffstat (limited to 'lib/libpam/libpam')
-rw-r--r--lib/libpam/libpam/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile
index 1dc977f610d3..f428a7fc26cf 100644
--- a/lib/libpam/libpam/Makefile
+++ b/lib/libpam/libpam/Makefile
@@ -38,7 +38,11 @@
OPENPAM= ${.CURDIR}/../../../contrib/openpam
.PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man
-LIB= pam
+# static_libpam will build libpam.a
+.if !defined(LIB)
+SHLIB= pam
+.endif
+
MK_PROFILE=no
SRCS= openpam_asprintf.c \
@@ -98,7 +102,7 @@ SRCS= openpam_asprintf.c \
# Local additions
SRCS+= pam_debug_log.c
-MAN= openpam.3 \
+MAN?= openpam.3 \
openpam_borrow_cred.3 \
openpam_free_data.3 \
openpam_free_envlist.3 \
@@ -150,10 +154,10 @@ MAN= openpam.3 \
pam_vprompt.3 \
pam.conf.5
-MLINKS= pam.conf.5 pam.d.5
+MLINKS?= pam.conf.5 pam.d.5
CSTD?= c99
-CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include
+CFLAGS+= -I${OPENPAM}/include
CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR}
CFLAGS+= -DHAVE_DLFUNC=1
CFLAGS+= -DHAVE_FDLOPEN=1
@@ -172,7 +176,7 @@ HEADERS= security/openpam.h \
ADD_HEADERS= security/pam_mod_misc.h
# Headers
-INCS= ${HEADERS} ${ADD_HEADERS}
+INCS?= ${HEADERS} ${ADD_HEADERS}
INCSDIR= ${INCLUDEDIR}/security
.include <src.opts.mk>