* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
[glibc.git] / nis / Makefile
blob89f229d8f8df00e1c9869108826d01b4748fba55
1 # Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
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.
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.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
20 # Makefile for NIS/NIS+ part.
22 subdir := nis
24 headers := $(wildcard rpcsvc/*.[hx])
25 distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
26 nisplus-parser.h nis_xdr.h
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.
30 databases = proto service hosts network grp pwd rpc ethers \
31 spwd netgrp alias publickey
33 # Specify rules for the nss_* modules.
34 services := nis nisplus compat
36 extra-libs = libnsl $(services:%=libnss_%)
37 # These libraries will be built in the `others' pass rather than
38 # the `lib' pass, because they depend on libc.so being built already.
39 extra-libs-others = $(extra-libs)
41 # The sources are found in the appropriate subdir.
42 subdir-dirs = $(services:%=nss_%)
43 vpath %.c $(subdir-dirs)
45 libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
46 nis_subr nis_local_names nis_free nis_file \
47 nis_print nis_error nis_call nis_lookup\
48 nis_table nis_xdr nis_server nis_ping \
49 nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
50 nis_verifygroup nis_ismember nis_addmember nis_util\
51 nis_removemember nis_creategroup nis_destroygroup\
52 nis_print_group_entry nis_domain_of nis_domain_of_r\
53 nis_modify nis_remove nis_add nis_defaults\
54 nis_findserv nis_callback nis_clone_dir nis_clone_obj\
55 nis_clone_res
57 libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) \
58 nisplus-parser nss-nis nss-nisplus
59 libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
61 libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
62 nss-nis
63 libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
65 libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
66 nss-nisplus
67 libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
69 include ../Rules
72 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
73 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
74 $(common-objpfx)nss/libnss_files.so
75 $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
77 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
78 # This ensures they will load libc.so for needed symbols if loaded by
79 # a statically-linked program that hasn't already loaded it.
80 $(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(common-objpfx)libc.so\
81 $(common-objpfx)libc_nonshared.a
84 ifeq ($(build-shared),yes)
85 $(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
86 else
87 $(others:%=$(objpfx)%): $(objpfx)libnsl.a
88 endif