]> git.ipfire.org Git - thirdparty/glibc.git/blob - nis/Makefile
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / nis / Makefile
1 # Copyright (C) 1996-2019 Free Software Foundation, Inc.
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
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.
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
12 # Lesser General Public License for more details.
13
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
17
18 #
19 # Makefile for NIS/NIS+ part.
20 #
21 subdir := nis
22
23 include ../Makeconfig
24
25 ifndef have-GLIBC_2.28
26
27 ifeq ($(build-obsolete-nsl),yes)
28 $(error --enabe-obsolete-nsl is not available)
29 endif
30
31 else
32
33 ifeq ($(build-obsolete-nsl),yes)
34 headers := $(wildcard rpcsvc/*.[hx])
35
36 # These are the databases available for the nis (and perhaps later nisplus)
37 # service. This must be a superset of the services in nss.
38 databases = proto service hosts network grp pwd rpc ethers \
39 spwd netgrp alias publickey
40
41 # Specify rules for the nss_* modules.
42 services := nis nisplus
43 endif
44
45 extra-libs = libnsl
46 ifeq ($(build-obsolete-nsl),yes)
47 extra-libs += $(services:%=libnss_%)
48 endif
49 # These libraries will be built in the `others' pass rather than
50 # the `lib' pass, because they depend on libc.so being built already.
51 extra-libs-others = $(extra-libs)
52
53 ifeq ($(build-obsolete-nsl),yes)
54 # The sources are found in the appropriate subdir.
55 subdir-dirs = $(services:%=nss_%)
56 vpath %.c $(subdir-dirs)
57 endif
58
59 libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
60 nis_subr nis_local_names nis_free nis_file \
61 nis_print nis_error nis_call nis_lookup\
62 nis_table nis_xdr nis_server nis_ping \
63 nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
64 nis_verifygroup nis_ismember nis_addmember nis_util\
65 nis_removemember nis_creategroup nis_destroygroup\
66 nis_print_group_entry nis_domain_of nis_domain_of_r\
67 nis_modify nis_remove nis_add nis_defaults\
68 nis_findserv nis_callback nis_clone_dir nis_clone_obj\
69 nis_clone_res
70
71 ifeq ($(build-obsolete-nsl),yes)
72 libnsl-routines += nss-default
73 libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
74 nss-nis
75 libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
76
77 libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
78 nss-nisplus nisplus-initgroups
79 libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
80
81 else # not $(build-obsolete-nsl)
82 # Pretend that libnsl.so is a linker script, so that the symbolic link
83 # is not installed.
84 install-lib-ldscripts = libnsl.so
85 $(inst_libdir)/libnsl.so:
86 # Build only shared libnsl.
87 libnsl-inhibit-o = $(filter-out .os,$(object-suffixes))
88
89 endif # not $(build-obsolete-nsl)
90
91 endif # have-GLIBC_2.28
92
93 include ../Rules
94
95
96 ifeq ($(build-obsolete-nsl),yes)
97 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
98 $(common-objpfx)nss/libnss_files.so
99 $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
100 endif
101
102 libnsl-libc = $(common-objpfx)linkobj/libc.so
103 # Target-specific variable setting to link objects using deprecated
104 # RPC interfaces with the version of libc.so that makes them available
105 # for new links:
106 $(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
107 libc-for-link = $(libnsl-libc)
108
109
110 ifeq ($(build-shared),yes)
111 $(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
112 else
113 ifeq ($(build-obsolete-nsl),yes)
114 $(others:%=$(objpfx)%): $(objpfx)libnsl.a
115 endif
116 endif