Move build of openpam_static_modules.o to its own subdir
to avoid circular dependency b/w libpam and modules. Reviewed by: obrien
This commit is contained in:
parent
63478911d0
commit
6579d1464d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bmake/; revision=245892
@ -26,6 +26,6 @@
|
||||
|
||||
# The modules must be built first, because they are built into the
|
||||
# static version of libpam.
|
||||
SUBDIR+= modules libpam
|
||||
SUBDIR+= modules libpam static_modules
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
@ -166,29 +166,6 @@ HEADERS= security/openpam.h \
|
||||
|
||||
ADD_HEADERS= security/pam_mod_misc.h
|
||||
|
||||
#
|
||||
# Static modules
|
||||
#
|
||||
# We build static versions of all modules and of openpam_static.o,
|
||||
# then link them all together into openpam_static_modules.o. None of
|
||||
# the modules export any symbols, but they store structures with
|
||||
# pointers to their service functions in a linker set which the code
|
||||
# in openpam_static.c traverses to locate the individual modules.
|
||||
#
|
||||
MODULE_DIR= ../modules
|
||||
.include "${.CURDIR}/${MODULE_DIR}/modules.inc"
|
||||
STATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/}
|
||||
STATICOBJS+= openpam_static_modules.o
|
||||
CLEANFILES+= openpam_static.o \
|
||||
openpam_static_modules.o
|
||||
|
||||
openpam_static_modules.o: openpam_static.o ${STATIC_MODULES}
|
||||
${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
|
||||
|
||||
# We can't put openpam_static.c in SRCS, but we still want to scan it
|
||||
# for dependencies.
|
||||
DPSRCS= openpam_static.c
|
||||
|
||||
# Headers
|
||||
INCS= ${HEADERS} ${ADD_HEADERS}
|
||||
INCSDIR= ${INCLUDEDIR}/security
|
||||
|
@ -10,30 +10,6 @@ DIRDEPS = \
|
||||
include/xlocale \
|
||||
lib/${CSU_DIR} \
|
||||
lib/libc \
|
||||
lib/libpam/modules/pam_chroot \
|
||||
lib/libpam/modules/pam_deny \
|
||||
lib/libpam/modules/pam_echo \
|
||||
lib/libpam/modules/pam_exec \
|
||||
lib/libpam/modules/pam_ftpusers \
|
||||
lib/libpam/modules/pam_group \
|
||||
lib/libpam/modules/pam_guest \
|
||||
lib/libpam/modules/pam_krb5 \
|
||||
lib/libpam/modules/pam_ksu \
|
||||
lib/libpam/modules/pam_lastlog \
|
||||
lib/libpam/modules/pam_login_access \
|
||||
lib/libpam/modules/pam_nologin \
|
||||
lib/libpam/modules/pam_opie \
|
||||
lib/libpam/modules/pam_opieaccess \
|
||||
lib/libpam/modules/pam_passwdqc \
|
||||
lib/libpam/modules/pam_permit \
|
||||
lib/libpam/modules/pam_radius \
|
||||
lib/libpam/modules/pam_rhosts \
|
||||
lib/libpam/modules/pam_rootok \
|
||||
lib/libpam/modules/pam_securetty \
|
||||
lib/libpam/modules/pam_self \
|
||||
lib/libpam/modules/pam_ssh \
|
||||
lib/libpam/modules/pam_tacplus \
|
||||
lib/libpam/modules/pam_unix \
|
||||
|
||||
|
||||
.include <dirdeps.mk>
|
||||
|
71
lib/libpam/static_modules/Makefile
Normal file
71
lib/libpam/static_modules/Makefile
Normal file
@ -0,0 +1,71 @@
|
||||
#-
|
||||
# Copyright (c) 1998, 2013 Juniper Networks, Inc.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2002 Networks Associates Technology, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Portions of this software was developed for the FreeBSD Project by
|
||||
# ThinkSec AS and NAI Labs, the Security Research Division of Network
|
||||
# Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
|
||||
# ("CBOSS"), as part of the DARPA CHATS research program.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
OPENPAM= ${.CURDIR:H:H:H}/contrib/openpam
|
||||
.PATH: ${OPENPAM}/lib
|
||||
|
||||
all:
|
||||
|
||||
SRCS = openpam_static.c
|
||||
|
||||
NO_PROFILE=
|
||||
NO_MAN=
|
||||
|
||||
#
|
||||
# Static modules
|
||||
#
|
||||
# We build static versions of all modules and of openpam_static.o,
|
||||
# then link them all together into openpam_static_modules.o. None of
|
||||
# the modules export any symbols, but they store structures with
|
||||
# pointers to their service functions in a linker set which the code
|
||||
# in openpam_static.c traverses to locate the individual modules.
|
||||
#
|
||||
MODULE_DIR= ../modules
|
||||
.include "${.CURDIR}/${MODULE_DIR}/modules.inc"
|
||||
STATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/}
|
||||
STATICOBJS+= openpam_static_modules.o
|
||||
CLEANFILES+= openpam_static.o \
|
||||
openpam_static_modules.o
|
||||
|
||||
openpam_static_modules.o: openpam_static.o ${STATIC_MODULES}
|
||||
${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
.if empty(_SKIP_BUILD)
|
||||
all: ${STATICOBJS}
|
||||
.endif
|
41
lib/libpam/static_modules/Makefile.depend
Normal file
41
lib/libpam/static_modules/Makefile.depend
Normal file
@ -0,0 +1,41 @@
|
||||
# Autogenerated - do NOT edit!
|
||||
|
||||
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
|
||||
|
||||
DEP_MACHINE := ${.PARSEFILE:E}
|
||||
|
||||
DIRDEPS = \
|
||||
include \
|
||||
include/xlocale \
|
||||
lib/libpam/libpam \
|
||||
lib/libpam/modules/pam_chroot \
|
||||
lib/libpam/modules/pam_deny \
|
||||
lib/libpam/modules/pam_echo \
|
||||
lib/libpam/modules/pam_exec \
|
||||
lib/libpam/modules/pam_ftpusers \
|
||||
lib/libpam/modules/pam_group \
|
||||
lib/libpam/modules/pam_guest \
|
||||
lib/libpam/modules/pam_krb5 \
|
||||
lib/libpam/modules/pam_ksu \
|
||||
lib/libpam/modules/pam_lastlog \
|
||||
lib/libpam/modules/pam_login_access \
|
||||
lib/libpam/modules/pam_nologin \
|
||||
lib/libpam/modules/pam_opie \
|
||||
lib/libpam/modules/pam_opieaccess \
|
||||
lib/libpam/modules/pam_passwdqc \
|
||||
lib/libpam/modules/pam_permit \
|
||||
lib/libpam/modules/pam_radius \
|
||||
lib/libpam/modules/pam_rhosts \
|
||||
lib/libpam/modules/pam_rootok \
|
||||
lib/libpam/modules/pam_securetty \
|
||||
lib/libpam/modules/pam_self \
|
||||
lib/libpam/modules/pam_ssh \
|
||||
lib/libpam/modules/pam_tacplus \
|
||||
lib/libpam/modules/pam_unix \
|
||||
|
||||
|
||||
.include <dirdeps.mk>
|
||||
|
||||
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
|
||||
# local dependencies - needed for -jN in clean tree
|
||||
.endif
|
Loading…
Reference in New Issue
Block a user