mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Simplify the libpam build by removing the shared modules' dependency
on the shared library. The modules are loaded by the library, so we know it'll be there when we need it. MFC after: 3 weeks
This commit is contained in:
parent
2ba2959320
commit
e03e3b699e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227798
@ -1230,12 +1230,13 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \
|
||||
${_lib_libgssapi} ${_lib_libipx} \
|
||||
lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
|
||||
lib/ncurses/ncurses lib/ncurses/ncursesw \
|
||||
lib/libopie lib/libpam ${_lib_libthr} \
|
||||
lib/libopie ${_lib_libthr} \
|
||||
lib/libradius lib/libsbuf lib/libtacplus \
|
||||
${_cddl_lib_libumem} \
|
||||
lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
|
||||
${_secure_lib_libcrypto} ${_secure_lib_libssh} \
|
||||
${_secure_lib_libssl}
|
||||
${_secure_lib_libssl} \
|
||||
lib/libpam
|
||||
|
||||
.if ${MK_LIBTHR} != "no"
|
||||
_lib_libthr= lib/libthr
|
||||
@ -1323,7 +1324,7 @@ ${_lib}__PL: .PHONY
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
|
||||
.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
|
||||
${_lib}__L: .PHONY
|
||||
.if exists(${.CURDIR}/${_lib})
|
||||
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
|
||||
@ -1335,17 +1336,6 @@ ${_lib}__L: .PHONY
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
# libpam is special: we need to build static PAM modules before
|
||||
# static PAM library, and dynamic PAM library before dynamic PAM
|
||||
# modules.
|
||||
lib/libpam__L: .PHONY
|
||||
${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
|
||||
cd ${.CURDIR}/lib/libpam; \
|
||||
${MAKE} DIRPRFX=lib/libpam/ obj; \
|
||||
${MAKE} DIRPRFX=lib/libpam/ depend; \
|
||||
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
|
||||
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
|
||||
|
||||
_prereq_libs: ${_prereq_libs:S/$/__PL/}
|
||||
_startup_libs: ${_startup_libs:S/$/__L/}
|
||||
_prebuild_libs: ${_prebuild_libs:S/$/__L/}
|
||||
|
@ -31,4 +31,6 @@ DEBUG_FLAGS+= -DDEBUG
|
||||
SHLIB_MAJOR= 5
|
||||
PAM_MOD_DIR= ${LIBDIR}
|
||||
|
||||
STATIC_CFLAGS+= -DOPENPAM_STATIC_MODULES
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
@ -5,20 +5,8 @@ PAMDIR= ${.CURDIR}/../../../../contrib/openpam
|
||||
NO_INSTALLLIB=
|
||||
NO_PROFILE=
|
||||
|
||||
CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
|
||||
CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
|
||||
|
||||
# This is nasty.
|
||||
# For the static case, libpam.a depends on the modules.
|
||||
# For the dynamic case, the modules depend on libpam.so.N
|
||||
.if defined(_NO_LIBPAM_SO_YET)
|
||||
NO_PIC=
|
||||
.else
|
||||
SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR}
|
||||
DPADD+= ${LIBPAM}
|
||||
LDADD+= -lpam
|
||||
.endif
|
||||
|
||||
.c.o:
|
||||
${CC} ${CFLAGS} -DOPENPAM_STATIC_MODULES -c ${.IMPSRC}
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
Loading…
Reference in New Issue
Block a user