]> git.ipfire.org Git - thirdparty/glibc.git/blob - nis/Makefile
Merge branch 'master' into bug13658-branch
[thirdparty/glibc.git] / nis / Makefile
1 # Copyright (C) 1996-1998,2001,2004,2006,2011,2012
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <http://www.gnu.org/licenses/>.
18
19 #
20 # Makefile for NIS/NIS+ part.
21 #
22 subdir := nis
23
24 aux := nis_hash
25
26 # These are the databases available for the nis (and perhaps later nisplus)
27 # service. This must be a superset of the services in nss.
28 databases = proto service hosts network grp pwd rpc ethers \
29 spwd netgrp alias publickey
30
31 # Specify rules for the nss_* modules.
32 services := nis nisplus compat
33
34 extra-libs = libnsl $(services:%=libnss_%)
35 # These libraries will be built in the `others' pass rather than
36 # the `lib' pass, because they depend on libc.so being built already.
37 extra-libs-others = $(extra-libs)
38
39 # The sources are found in the appropriate subdir.
40 subdir-dirs = $(services:%=nss_%)
41 vpath %.c $(subdir-dirs)
42
43 libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
44 nis_subr nis_local_names nis_free nis_file \
45 nis_print nis_error nis_call nis_lookup\
46 nis_table nis_xdr nis_server nis_ping \
47 nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
48 nis_verifygroup nis_ismember nis_addmember nis_util\
49 nis_removemember nis_creategroup nis_destroygroup\
50 nis_print_group_entry nis_domain_of nis_domain_of_r\
51 nis_modify nis_remove nis_add nis_defaults\
52 nis_findserv nis_callback nis_clone_dir nis_clone_obj\
53 nis_clone_res nss-default
54
55 libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups)
56 libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
57
58 libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
59 nss-nis
60 libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
61
62 libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
63 nss-nisplus nisplus-initgroups
64 libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
65
66 include ../Rules
67
68
69 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
70 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
71 $(common-objpfx)nss/libnss_files.so
72 $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
73
74 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
75 # This ensures they will load libc.so for needed symbols if loaded by
76 # a statically-linked program that hasn't already loaded it.
77 libnsl-libc = $(common-objpfx)linkobj/libc.so
78 $(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(libnsl-libc) \
79 $(common-objpfx)libc_nonshared.a
80
81
82 ifeq ($(build-shared),yes)
83 $(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
84 else
85 $(others:%=$(objpfx)%): $(objpfx)libnsl.a
86 endif