Blame nis/Makefile

Packit 6c4009
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit 6c4009
# This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
# The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
# modify it under the terms of the GNU Lesser General Public
Packit 6c4009
# License as published by the Free Software Foundation; either
Packit 6c4009
# version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
# The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
# Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
# You should have received a copy of the GNU Lesser General Public
Packit 6c4009
# License along with the GNU C Library; if not, see
Packit 6c4009
# <http://www.gnu.org/licenses/>.
Packit 6c4009
Packit 6c4009
#
Packit 6c4009
#	Makefile for NIS/NIS+ part.
Packit 6c4009
#
Packit 6c4009
subdir	:= nis
Packit 6c4009
Packit 6c4009
include ../Makeconfig
Packit 6c4009
Packit 6c4009
ifeq ($(build-obsolete-nsl),yes)
Packit 6c4009
headers			:= $(wildcard rpcsvc/*.[hx])
Packit 6c4009
Packit 6c4009
# These are the databases available for the nis (and perhaps later nisplus)
Packit 6c4009
# service.  This must be a superset of the services in nss.
Packit 6c4009
databases		= proto service hosts network grp pwd rpc ethers \
Packit 6c4009
			  spwd netgrp alias publickey
Packit 6c4009
Packit 6c4009
# Specify rules for the nss_* modules.
Packit 6c4009
services		:= nis nisplus
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
extra-libs		= libnsl
Packit 6c4009
ifeq ($(build-obsolete-nsl),yes)
Packit 6c4009
extra-libs += $(services:%=libnss_%)
Packit 6c4009
endif
Packit 6c4009
# These libraries will be built in the `others' pass rather than
Packit 6c4009
# the `lib' pass, because they depend on libc.so being built already.
Packit 6c4009
extra-libs-others	= $(extra-libs)
Packit 6c4009
Packit 6c4009
ifeq ($(build-obsolete-nsl),yes)
Packit 6c4009
# The sources are found in the appropriate subdir.
Packit 6c4009
subdir-dirs = $(services:%=nss_%)
Packit 6c4009
vpath %.c $(subdir-dirs)
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
Packit 6c4009
		  nis_subr nis_local_names nis_free nis_file \
Packit 6c4009
		  nis_print nis_error nis_call nis_lookup\
Packit 6c4009
		  nis_table nis_xdr nis_server nis_ping \
Packit 6c4009
		  nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
Packit 6c4009
		  nis_verifygroup nis_ismember nis_addmember nis_util\
Packit 6c4009
		  nis_removemember nis_creategroup nis_destroygroup\
Packit 6c4009
		  nis_print_group_entry nis_domain_of nis_domain_of_r\
Packit 6c4009
		  nis_modify nis_remove nis_add nis_defaults\
Packit 6c4009
		  nis_findserv nis_callback nis_clone_dir nis_clone_obj\
Packit 6c4009
		  nis_clone_res
Packit 6c4009
Packit 6c4009
ifeq ($(build-obsolete-nsl),yes)
Packit 6c4009
libnsl-routines += nss-default
Packit 6c4009
libnss_nis-routines	:= $(addprefix nis-,$(databases)) nis-initgroups \
Packit 6c4009
			   nss-nis
Packit 6c4009
libnss_nis-inhibit-o	= $(filter-out .os,$(object-suffixes))
Packit 6c4009
Packit 6c4009
libnss_nisplus-routines	:= $(addprefix nisplus-,$(databases)) nisplus-parser \
Packit 6c4009
			   nss-nisplus nisplus-initgroups
Packit 6c4009
libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
Packit 6c4009
Packit 6c4009
else # not $(build-obsolete-nsl)
Packit 6c4009
# Pretend that libnsl.so is a linker script, so that the symbolic link
Packit 6c4009
# is not installed.
Packit 6c4009
install-lib-ldscripts = libnsl.so
Packit 6c4009
$(inst_libdir)/libnsl.so:
Packit 6c4009
# Build only shared libnsl.
Packit 6c4009
libnsl-inhibit-o = $(filter-out .os,$(object-suffixes))
Packit 6c4009
Packit 6c4009
endif # not $(build-obsolete-nsl)
Packit 6c4009
Packit 6c4009
include ../Rules
Packit 6c4009
Packit 6c4009
Packit 6c4009
ifeq ($(build-obsolete-nsl),yes)
Packit 6c4009
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
Packit 6c4009
			$(common-objpfx)nss/libnss_files.so
Packit 6c4009
$(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
libnsl-libc = $(common-objpfx)linkobj/libc.so
Packit 6c4009
# Target-specific variable setting to link objects using deprecated
Packit 6c4009
# RPC interfaces with the version of libc.so that makes them available
Packit 6c4009
# for new links:
Packit 6c4009
$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
Packit 6c4009
  libc-for-link = $(libnsl-libc)
Packit 6c4009
Packit 6c4009
Packit 6c4009
ifeq ($(build-shared),yes)
Packit 6c4009
$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
Packit 6c4009
else
Packit 6c4009
ifeq ($(build-obsolete-nsl),yes)
Packit 6c4009
$(others:%=$(objpfx)%): $(objpfx)libnsl.a
Packit 6c4009
endif
Packit 6c4009
endif