]> git.ipfire.org Git - thirdparty/glibc.git/blame - nis/Makefile
update from main archive 970121
[thirdparty/glibc.git] / nis / Makefile
CommitLineData
1ef32c3d 1# Copyright (C) 1996, 1997 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
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#
22subdir := nis
23
24headers := $(wildcard rpcsvc/*.[hx])
1ef32c3d 25distribute := nss-nis.h
6259ec0d
UD
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.
29databases = proto service hosts network grp pwd rpc ethers \
30 spwd netgrp alias
31
32# Specify rules for the nss_* modules. Later we may have nisplus as well.
33services := nis compat
34
35extra-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.
38extra-libs-others = $(extra-libs)
39
6259ec0d 40# The sources are found in the appropriate subdir.
f8b87ef0 41subdir-dirs = $(services:%=nss_%)
6259ec0d
UD
42vpath %.c $(subdir-dirs)
43
44libnsl-routines = yp_xdr ypclnt ypupdate_xdr
45
46libnss_compat-routines := $(addprefix compat-,grp pwd spwd)
47libnss_compat-inhibit-o = $(filter-out .so,$(object-suffixes))
48
49libnss_nis-routines := $(addprefix nis-,$(databases))
50libnss_nis-inhibit-o = $(filter-out .so,$(object-suffixes))
51
52
53# Sun's header files are not too clean.
54CFLAGS-compat-pwd.c = -Wno-strict-prototypes
55CFLAGS-compat-spwd.c = -Wno-strict-prototypes
56CFLAGS-compat-grp.c = -Wno-strict-prototypes
57CFLAGS-nis-alias.c = -Wno-strict-prototypes
58CFLAGS-nis-ethers.c = -Wno-strict-prototypes
59CFLAGS-nis-grp.c = -Wno-strict-prototypes
60CFLAGS-nis-hosts.c = -Wno-strict-prototypes
61CFLAGS-nis-netgrp.c = -Wno-strict-prototypes
62CFLAGS-nis-network.c = -Wno-strict-prototypes
63CFLAGS-nis-proto.c = -Wno-strict-prototypes
64CFLAGS-nis-publickey.c = -Wno-strict-prototypes
65CFLAGS-nis-pwd.c = -Wno-strict-prototypes
66CFLAGS-nis-rpc.c = -Wno-strict-prototypes
67CFLAGS-nis-service.c = -Wno-strict-prototypes
68CFLAGS-nis-spwd.c = -Wno-strict-prototypes
f8b87ef0
UD
69CFLAGS-ypclnt.c = -Wno-strict-prototypes -Wno-write-strings -Irpcsvc
70CFLAGS-yp_xdr.c = -Wno-strict-prototypes -Irpcsvc
71CFLAGS-ypupdate_xdr.c = -Wno-strict-prototypes -Irpcsvc
6259ec0d
UD
72
73include ../Rules
74
75
76$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version) \
77 $(common-objpfx)nss/libnss_files.so
78$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
79 $(common-objpfx)nss/libnss_files.so
80
81# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
82# This ensures they will load libc.so for needed symbols if loaded by
83# a statically-linked program that hasn't already loaded it.
84$(services:%=$(objpfx)libnss_%.so): $(common-objpfx)libc.so
85
86
87ifeq ($(build-shared),yes)
88$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
89else
90$(others:%=$(objpfx)%): $(objpfx)libnsl.a
91endif