]> git.ipfire.org Git - thirdparty/glibc.git/blame - nis/Makefile
Fix memory leak in TLS of loaded objects.
[thirdparty/glibc.git] / nis / Makefile
CommitLineData
433f49c4 1# Copyright (C) 1996,1997,1998,2001,2004,2006 Free Software Foundation, Inc.
6259ec0d
UD
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
41bdb6e2
AJ
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.
6259ec0d
UD
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
41bdb6e2 12# Lesser General Public License for more details.
6259ec0d 13
41bdb6e2
AJ
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.
6259ec0d
UD
18
19#
2d7da676 20# Makefile for NIS/NIS+ part.
6259ec0d
UD
21#
22subdir := nis
23
c207f23b
UD
24aux := nis_hash
25
0413b54c 26headers := $(wildcard rpcsvc/*.[hx])
2d7da676 27distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
e98fb1a6 28 nisplus-parser.h nis_xdr.h nss
6259ec0d
UD
29
30# These are the databases available for the nis (and perhaps later nisplus)
31# service. This must be a superset of the services in nss.
32databases = proto service hosts network grp pwd rpc ethers \
26dee9c4 33 spwd netgrp alias publickey
6259ec0d 34
e61abf83 35# Specify rules for the nss_* modules.
7799b7b3 36services := nis nisplus compat
6259ec0d
UD
37
38extra-libs = libnsl $(services:%=libnss_%)
39# These libraries will be built in the `others' pass rather than
40# the `lib' pass, because they depend on libc.so being built already.
41extra-libs-others = $(extra-libs)
42
6259ec0d 43# The sources are found in the appropriate subdir.
f8b87ef0 44subdir-dirs = $(services:%=nss_%)
6259ec0d
UD
45vpath %.c $(subdir-dirs)
46
e61abf83
UD
47libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
48 nis_subr nis_local_names nis_free nis_file \
e852e889
UD
49 nis_print nis_error nis_call nis_lookup\
50 nis_table nis_xdr nis_server nis_ping \
51702635 51 nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
2d7da676 52 nis_verifygroup nis_ismember nis_addmember nis_util\
51702635
UD
53 nis_removemember nis_creategroup nis_destroygroup\
54 nis_print_group_entry nis_domain_of nis_domain_of_r\
dfd2257a
UD
55 nis_modify nis_remove nis_add nis_defaults\
56 nis_findserv nis_callback nis_clone_dir nis_clone_obj\
433f49c4 57 nis_clone_res nss-default
6259ec0d 58
1e2e27fd 59libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups)
40a55d20 60libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
6259ec0d 61
48a92e9d
UD
62libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
63 nss-nis
40a55d20 64libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
6259ec0d 65
9d4f43ae 66libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
68361572 67 nss-nisplus nisplus-initgroups
40a55d20 68libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
6259ec0d 69
6259ec0d
UD
70include ../Rules
71
72
2d7da676 73$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
6259ec0d
UD
74$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
75 $(common-objpfx)nss/libnss_files.so
e61abf83 76$(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
6259ec0d
UD
77
78# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
79# This ensures they will load libc.so for needed symbols if loaded by
80# a statically-linked program that hasn't already loaded it.
639c3248
UD
81$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(common-objpfx)libc.so\
82 $(common-objpfx)libc_nonshared.a
6259ec0d
UD
83
84
85ifeq ($(build-shared),yes)
86$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
87else
88$(others:%=$(objpfx)%): $(objpfx)libnsl.a
89endif