Merge dhcpcd-8.0.4 from branch 'vendor/DHCPCD'
[dragonfly.git] / lib / libpam / static_libpam / Makefile
1 # $FreeBSD: head/lib/libpam/static_libpam/Makefile 314901 2017-03-08 08:25:26Z brooks $
2
3 # Build only the static library here.
4 LIB=    pam
5 NOPIC=  yes
6
7 # Already handled by libpam shared version.
8 NOMAN=  noman
9 INCS=
10
11 #
12 # Static modules support
13 #
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.
19 #
20 MODULESDIR=     ../modules
21 MODULES=        pam_chroot \
22                 pam_deny \
23                 pam_echo \
24                 pam_exec \
25                 pam_ftpusers \
26                 pam_group \
27                 pam_guest \
28                 pam_lastlog \
29                 pam_login_access \
30                 pam_nologin \
31                 pam_passwdqc \
32                 pam_permit \
33                 pam_radius \
34                 pam_rhosts \
35                 pam_rootok \
36                 pam_securetty \
37                 pam_self \
38                 pam_ssh \
39                 pam_tacplus \
40                 pam_unix
41
42 STATIC_MODULES= ${MODULES:C/.*/${MODULESDIR}\/&\/lib&.a/}
43 STATICOBJS+=    openpam_static_modules.o
44 CLEANFILES+=    openpam_static.o openpam_static.po \
45                 openpam_static_modules.o
46
47 openpam_static_modules.o: openpam_static.o ${STATIC_MODULES}
48         ${CC} -nostdlib ${LDFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC}
49
50 openpam_static_modules.po: openpam_static.po ${STATIC_MODULES}
51         ${CC} -nostdlib ${LDFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC}
52
53 .PATH: ${.CURDIR}/../libpam
54
55 .include "${.CURDIR}/../libpam/Makefile"