diff options
author | des <des@FreeBSD.org> | 2011-10-22 14:08:21 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2011-10-22 14:08:21 +0000 |
commit | b0b57d16dd893710df5dcb76a8bf9356899e463c (patch) | |
tree | 4c8db2989a188eef0c78ef569e63f642526ebf7b /lib/libpam | |
parent | bf25cd5b36c8a2ef33eebb695d778e10a951edb7 (diff) | |
download | FreeBSD-src-b0b57d16dd893710df5dcb76a8bf9356899e463c.zip FreeBSD-src-b0b57d16dd893710df5dcb76a8bf9356899e463c.tar.gz |
Revert the previous commit and add a comment explaining why it was wrong.
Diffstat (limited to 'lib/libpam')
-rw-r--r-- | lib/libpam/libpam/Makefile | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index 4af9c1f..12cd96a 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -55,7 +55,6 @@ SRCS= openpam_borrow_cred.c \ openpam_readline.c \ openpam_restore_cred.c \ openpam_set_option.c \ - openpam_static.c \ openpam_ttyconv.c \ pam_acct_mgmt.c \ pam_authenticate.c \ @@ -149,16 +148,29 @@ 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_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 |