]> git.ipfire.org Git - thirdparty/glibc.git/blob - nis/Makefile
Update.
[thirdparty/glibc.git] / nis / Makefile
1 # Copyright (C) 1996, 1997 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 Library General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # 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 # Library General Public License for more details.
13
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If not,
16 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
18
19 #
20 # Makefile for NIS part.
21 #
22 subdir := nis
23
24 headers := $(wildcard rpcsvc/*.[hx])
25 distribute := nss-nis.h nss-nisplus.h
26
27 # These are the databases available for the nis (and perhaps later nisplus)
28 # service. This must be a superset of the services in nss.
29 databases = proto service hosts network grp pwd rpc ethers \
30 spwd netgrp alias publickey
31
32 # Specify rules for the nss_* modules.
33 services := nis nisplus compat
34
35 extra-libs = libnsl $(services:%=libnss_%)
36 # These libraries will be built in the `others' pass rather than
37 # the `lib' pass, because they depend on libc.so being built already.
38 extra-libs-others = $(extra-libs)
39
40 # The sources are found in the appropriate subdir.
41 subdir-dirs = $(services:%=nss_%)
42 vpath %.c $(subdir-dirs)
43
44 libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
45 nis_subr nis_local_names nis_free nis_file \
46 nis_print nis_error nis_call nis_lookup nis_clone\
47 nis_table nis_xdr nis_intern nis_server nis_ping\
48 nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
49 nis_verifygroup nis_ismember nis_addmember \
50 nis_removemember nis_creategroup nis_destroygroup\
51 nis_print_group_entry nis_domain_of nis_domain_of_r\
52 nis_modify nis_remove nis_add nis_defaults
53 libnsl-map = libnsl.map
54
55 libnss_compat-routines := $(addprefix compat-,grp pwd spwd)
56 libnss_compat-inhibit-o = $(filter-out .so,$(object-suffixes))
57 libnss_compat-map := libnss_compat.map
58
59 libnss_nis-routines := $(addprefix nis-,$(databases))
60 libnss_nis-inhibit-o = $(filter-out .so,$(object-suffixes))
61 libnss_nis-map := libnss_nis.map
62
63 libnss_nisplus-routines := $(addprefix nisplus-,$(databases))
64 libnss_nisplus-inhibit-o = $(filter-out .so,$(object-suffixes))
65 libnss_nisplus-map := libnss_nisplus.map
66
67 include ../Rules
68
69
70 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version) \
71 $(common-objpfx)nss/libnss_files.so \
72 $(common-objpfx)nis/libnss_nisplus.so
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)
76
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
82
83 ifeq ($(build-shared),yes)
84 $(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
85 else
86 $(others:%=$(objpfx)%): $(objpfx)libnsl.a
87 endif