1 # $FreeBSD: head/lib/libpam/static_libpam/Makefile 314901 2017-03-08 08:25:26Z brooks $
3 # Build only the static library here.
7 # Already handled by libpam shared version.
12 # Static modules support
14 # We build static versions of all modules and of openpam_static.o,
15 # then link them all together into openpam_static_modules.o. None of
16 # the modules export any symbols, but they store structures with
17 # pointers to their service functions in a linker set which the code
18 # in openpam_static.c traverses to locate the individual modules.
20 MODULESDIR= ../modules
43 .if !defined(NO_CRYPT)
47 STATIC_MODULES= ${MODULES:C/.*/${MODULESDIR}\/&\/lib&.a/}
48 STATICOBJS+= openpam_static_modules.o
49 CLEANFILES+= openpam_static.o openpam_static.po \
50 openpam_static_modules.o
52 openpam_static_modules.o: openpam_static.o ${STATIC_MODULES}
53 ${CC} -nostdlib ${LDFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC}
55 openpam_static_modules.po: openpam_static.po ${STATIC_MODULES}
56 ${CC} -nostdlib ${LDFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC}
58 .PATH: ${.CURDIR}/../libpam
60 .include "${.CURDIR}/../libpam/Makefile"