2.3.3-80
[glibc.git] / glibc-compat / Makefile
blob8c60483524ba386b428ac1bfa93df27d68a540c6
1 # Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
3 # This is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Library General Public License as
5 # published by the Free Software Foundation; either version 2 of the
6 # License, or (at your option) any later version.
8 # The GNU C Library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Library General Public License for more details.
13 # You should have received a copy of the GNU Library General Public
14 # License along with the GNU C Library; see the file COPYING.LIB. If not,
15 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 # Boston, MA 02111-1307, USA.
18 # $Id$
20 subdir := glibc-compat
22 distribute := nss-nis.h
24 # This is the trivial part which goes into libc itself.
25 routines =
27 # These are the databases that go through nss dispatch.
28 # Caution: if you add a database here, you must add its real name
29 # in databases.def, too.
30 databases = proto service hosts network grp pwd rpc ethers \
31 spwd netgrp alias
33 # Specify rules for the nss_* modules. We have some services.
34 services := files nis compat dns
36 extra-libs := $(services:%=libnss1_%) libNoVersion
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 libnss1_files-routines := $(addprefix files-,$(databases))
46 libnss1_compat-routines := $(addprefix compat-,grp pwd spwd)
47 libnss1_nis-routines := $(addprefix nis-,$(databases))
48 libnss1_dns-routines := $(addprefix dns-, host network)
50 libcompat-routines := $(addprefix old, fileops iofdopen iopopen stdfiles \
51 iofclose iofopen pclose tmpfile)
52 libNoVersion-routines := stubs
54 libnss1_files-inhibit-o = $(filter-out .os,$(object-suffixes))
55 libnss1_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
56 libnss1_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
57 libnss1_dns-inhibit-o = $(filter-out .os,$(object-suffixes))
59 -include ../Rules
61 # Force the soname to be libnss_*.so.1 for compatibility.
62 LDFLAGS-nss1_files.so = -Wl,-soname=lib$(libprefix)nss_files.so$($(@F)-version)
63 LDFLAGS-nss1_nis.so = -Wl,-soname=lib$(libprefix)nss_nis.so$($(@F)-version)
64 LDFLAGS-nss1_compat.so = -Wl,-soname=lib$(libprefix)nss_compat.so$($(@F)-version)
65 LDFLAGS-nss1_dns.so = -Wl,-soname=lib$(libprefix)nss_dns.so$($(@F)-version)
67 -include ../Makeconfig
69 ifeq (yes,$(build-shared))
70 install-others += $(inst_slibdir)/libnss_files.so$(libnss1_files.so-version) \
71 $(inst_slibdir)/libnss_nis.so$(libnss1_nis.so-version) \
72 $(inst_slibdir)/libnss_compat.so$(libnss1_compat.so-version) \
73 $(inst_slibdir)/libnss_dns.so$(libnss1_dns.so-version)
74 endif
76 $(inst_slibdir)/libnss_files.so$(libnss1_files.so-version): $(inst_slibdir)/libnss1_files-$(version).so $(+force)
77 rm -f $@
78 $(LN_S) $(<F) $@
80 $(inst_slibdir)/libnss_nis.so$(libnss1_nis.so-version): $(inst_slibdir)/libnss1_nis-$(version).so $(+force)
81 rm -f $@
82 $(LN_S) $(<F) $@
84 $(inst_slibdir)/libnss_compat.so$(libnss1_compat.so-version): $(inst_slibdir)/libnss1_compat-$(version).so $(+force)
85 rm -f $@
86 $(LN_S) $(<F) $@
88 $(inst_slibdir)/libnss_dns.so$(libnss1_dns.so-version): $(inst_slibdir)/libnss1_dns-$(version).so $(+force)
89 rm -f $@
90 $(LN_S) $(<F) $@
93 $(objpfx)libnss1_compat.so: $(common-objpfx)nis/libnsl.so$(libnsl.so-version) \
94 $(objpfx)libnss1_files.so
95 $(objpfx)libnss1_nis.so: $(common-objpfx)nis/libnsl.so$(libnsl.so-version) \
96 $(objpfx)libnss1_files.so
98 # The DNS NSS modules needs the resolver.
99 #$(objpfx)libnss1_dns.so: $(filter-out $(common-objpfx)resolv/stamp.os, \
100 # $(wildcard $(common-objpfx)resolv/*.os)) \
101 # $(common-objpfx)libc.so
102 $(objpfx)libnss1_dns.so: $(common-objpfx)resolv/libresolv.so $(common-objpfx)libc.so
104 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
105 # This ensures they will load libc.so for needed symbols if loaded by
106 # a statically-linked program that hasn't already loaded it.
107 $(objpfx)libnss1_compat.so: $(common-objpfx)nis/libnsl.so$(libnsl.so-version) \
108 $(objpfx)libnss1_files.so $(common-objpfx)libc.so
109 $(objpfx)libnss1_dns.so: $(common-objpfx)resolv/libresolv.so \
110 $(common-objpfx)libc.so
111 $(objpfs)libnss1_files.so: $(common-objpfx)libc.so
112 $(objpfx)libnss1_nis.so: $(common-objpfx)nis/libnsl.so$(libnsl.so-version) \
113 $(objpfx)libnss1_files.so $(common-objpfx)libc.so
115 check-abi-libNoVersion: $(..)scripts/extract-abilist.awk
117 update-abi-libNoVersion: $(..)scripts/merge-abilist.awk
119 check-abi-libnss1_compat: $(..)scripts/extract-abilist.awk
121 update-abi-libnss1_compat: $(..)scripts/merge-abilist.awk
123 check-abi-libnss1_dns: $(..)scripts/extract-abilist.awk
125 update-abi-libnss1_dns: $(..)scripts/merge-abilist.awk
127 check-abi-libnss1_files: $(..)scripts/extract-abilist.awk
129 update-abi-libnss1_files: $(..)scripts/merge-abilist.awk
131 check-abi-libnss1_nis: $(..)scripts/extract-abilist.awk
133 update-abi-libnss1_nis: $(..)scripts/merge-abilist.awk
137 # This is needed to build the separate tarball
139 pkgNAME = $(subdir)
140 pkgVERSION = 2.1.3
141 pkgCVSTAG = $(pkgNAME)_$(subst .,-,$(pkgVERSION))
143 archive:
144 @rm -f *.tar.gz *~
145 cvs tag -F $(pkgCVSTAG) .
146 @rm -rf /tmp/$(pkgNAME)-$(pkgVERSION) /tmp/$(pkgNAME) $(pkgNAME)-$(pkgVERSION).tar.gz
147 @cd /tmp; cvs export -r$(pkgCVSTAG) $(pkgNAME)
148 @pkgDIR=$$PWD; cd /tmp; tar cvzf $$pkgDIR/$(pkgNAME)-$(pkgVERSION).tar.gz $(pkgNAME)
149 @rm -rf /tmp/$(pkgNAME)
150 @echo "The archive is in $(pkgNAME)-$(pkgVERSION).tar.gz"