]> git.ipfire.org Git - thirdparty/glibc.git/blame - nis/Makefile
libnsl: Turn remaining symbols into compat symbols [BZ #22701]
[thirdparty/glibc.git] / nis / Makefile
CommitLineData
688903eb 1# Copyright (C) 1996-2018 Free Software Foundation, Inc.
6259ec0d
UD
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
6259ec0d
UD
8
9# The GNU C Library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12# Lesser General Public License for more details.
6259ec0d 13
41bdb6e2 14# You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15# License along with the GNU C Library; if not, see
16# <http://www.gnu.org/licenses/>.
6259ec0d
UD
17
18#
2d7da676 19# Makefile for NIS/NIS+ part.
6259ec0d
UD
20#
21subdir := nis
22
021db4be
AJ
23include ../Makeconfig
24
1e4d83f6 25ifeq ($(build-obsolete-nsl),yes)
021db4be 26headers := $(wildcard rpcsvc/*.[hx])
021db4be 27
6259ec0d
UD
28# These are the databases available for the nis (and perhaps later nisplus)
29# service. This must be a superset of the services in nss.
30databases = proto service hosts network grp pwd rpc ethers \
26dee9c4 31 spwd netgrp alias publickey
6259ec0d 32
e61abf83 33# Specify rules for the nss_* modules.
64d1e08e 34services := nis nisplus
1e4d83f6 35endif
6259ec0d 36
1e4d83f6
TK
37extra-libs = libnsl
38ifeq ($(build-obsolete-nsl),yes)
39extra-libs += $(services:%=libnss_%)
40endif
6259ec0d
UD
41# These libraries will be built in the `others' pass rather than
42# the `lib' pass, because they depend on libc.so being built already.
43extra-libs-others = $(extra-libs)
44
1e4d83f6 45ifeq ($(build-obsolete-nsl),yes)
6259ec0d 46# The sources are found in the appropriate subdir.
f8b87ef0 47subdir-dirs = $(services:%=nss_%)
6259ec0d 48vpath %.c $(subdir-dirs)
1e4d83f6 49endif
6259ec0d 50
e61abf83 51libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
7b57bfe5
UD
52 nis_subr nis_local_names nis_free nis_file \
53 nis_print nis_error nis_call nis_lookup\
54 nis_table nis_xdr nis_server nis_ping \
51702635 55 nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
2d7da676 56 nis_verifygroup nis_ismember nis_addmember nis_util\
51702635
UD
57 nis_removemember nis_creategroup nis_destroygroup\
58 nis_print_group_entry nis_domain_of nis_domain_of_r\
dfd2257a
UD
59 nis_modify nis_remove nis_add nis_defaults\
60 nis_findserv nis_callback nis_clone_dir nis_clone_obj\
cdd14619 61 nis_clone_res
6259ec0d 62
1e4d83f6 63ifeq ($(build-obsolete-nsl),yes)
cdd14619 64libnsl-routines += nss-default
48a92e9d
UD
65libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
66 nss-nis
40a55d20 67libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
6259ec0d 68
9d4f43ae 69libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
68361572 70 nss-nisplus nisplus-initgroups
40a55d20 71libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
9a08a366
FW
72
73else # not $(build-obsolete-nsl)
74# Pretend that libnsl.so is a linker script, so that the symbolic link
75# is not installed.
76install-lib-ldscripts = libnsl.so
77$(inst_libdir)/libnsl.so:
5503f413
AS
78# Build only shared libnsl.
79libnsl-inhibit-o = $(filter-out .os,$(object-suffixes))
9a08a366
FW
80
81endif # not $(build-obsolete-nsl)
6259ec0d 82
6259ec0d
UD
83include ../Rules
84
85
1e4d83f6 86ifeq ($(build-obsolete-nsl),yes)
6259ec0d
UD
87$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
88 $(common-objpfx)nss/libnss_files.so
e61abf83 89$(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
1e4d83f6 90endif
6259ec0d 91
7b57bfe5 92libnsl-libc = $(common-objpfx)linkobj/libc.so
fab7ce3f
JM
93# Target-specific variable setting to link objects using deprecated
94# RPC interfaces with the version of libc.so that makes them available
95# for new links:
96$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
97 libc-for-link = $(libnsl-libc)
6259ec0d
UD
98
99
100ifeq ($(build-shared),yes)
101$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
102else
1e4d83f6 103ifeq ($(build-obsolete-nsl),yes)
6259ec0d
UD
104$(others:%=$(objpfx)%): $(objpfx)libnsl.a
105endif
1e4d83f6 106endif