191714Sdes#- 2284345Ssjg# Copyright (c) 1998-2015 Juniper Networks, Inc. 341227Sjdp# All rights reserved. 492297Sdes# Copyright (c) 2002 Networks Associates Technology, Inc. 591714Sdes# All rights reserved. 641227Sjdp# 791714Sdes# Portions of this software was developed for the FreeBSD Project by 891714Sdes# ThinkSec AS and NAI Labs, the Security Research Division of Network 991714Sdes# Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 1091714Sdes# ("CBOSS"), as part of the DARPA CHATS research program. 1191714Sdes# 1241227Sjdp# Redistribution and use in source and binary forms, with or without 1341227Sjdp# modification, are permitted provided that the following conditions 1441227Sjdp# are met: 1541227Sjdp# 1. Redistributions of source code must retain the above copyright 1641227Sjdp# notice, this list of conditions and the following disclaimer. 1741227Sjdp# 2. Redistributions in binary form must reproduce the above copyright 1841227Sjdp# notice, this list of conditions and the following disclaimer in the 1941227Sjdp# documentation and/or other materials provided with the distribution. 2091714Sdes# 3. The name of the author may not be used to endorse or promote 2191714Sdes# products derived from this software without specific prior written 2291714Sdes# permission. 2341227Sjdp# 2441227Sjdp# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2541227Sjdp# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2641227Sjdp# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2741227Sjdp# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2841227Sjdp# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2941227Sjdp# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3041227Sjdp# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3141227Sjdp# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3241227Sjdp# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3341227Sjdp# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3441227Sjdp# SUCH DAMAGE. 3541227Sjdp# 3691714Sdes# $FreeBSD: stable/11/lib/libpam/static_libpam/Makefile 337477 2018-08-08 18:05:14Z bdrewery $ 3741227Sjdp 38313538Sngie.PATH: ${SRCTOP}/lib/libpam 3976242Smarkm 40297946Sbdrewery# Only build the static library. 41297946SbdreweryLIB= pam 42297946SbdreweryNO_PIC= 4341227Sjdp 44297946Sbdrewery# Avoid redundancy with the master Makefile. 45284345SsjgMAN= 46297946SbdreweryINCS= 47297946SbdreweryMLINKS= 48297946SbdreweryMK_TESTS= no 4941227Sjdp 50226632Sdes# 5191714Sdes# Static modules 52226632Sdes# 53226632Sdes# We build static versions of all modules and of openpam_static.o, 54226632Sdes# then link them all together into openpam_static_modules.o. None of 55226632Sdes# the modules export any symbols, but they store structures with 56226632Sdes# pointers to their service functions in a linker set which the code 57226632Sdes# in openpam_static.c traverses to locate the individual modules. 58226632Sdes# 59112044SobrienMODULE_DIR= ../modules 6091714Sdes.include "${.CURDIR}/${MODULE_DIR}/modules.inc" 61112044SobrienSTATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/} 62112044SobrienSTATICOBJS+= openpam_static_modules.o 63226632SdesCLEANFILES+= openpam_static.o \ 64226632Sdes openpam_static_modules.o 6542917Sjdp 6691714Sdesopenpam_static_modules.o: openpam_static.o ${STATIC_MODULES} 67337477Sbdrewery ${CC:N${CCACHE_BIN}} -nostdlib ${LDFLAGS} -o ${.TARGET} \ 68337477Sbdrewery -r -Wl,--whole-archive ${.ALLSRC} 6942917Sjdp 70313538Sngie.include "${.CURDIR:H}/libpam/Makefile" 71