Add NIS+ source files.
[kopensolaris-gnu/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
31
32 # Specify rules for the nss_* modules.
33 services                := nis compat nisplus
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_names nis_clone\
47                   nis_table nis_xdr nis_intern nis_server
48
49 libnss_compat-routines  := $(addprefix compat-,grp pwd spwd)
50 libnss_compat-inhibit-o = $(filter-out .so,$(object-suffixes))
51
52 libnss_nis-routines     := $(addprefix nis-,$(databases))
53 libnss_nis-inhibit-o    = $(filter-out .so,$(object-suffixes))
54
55 libnss_nisplus-routines := $(addprefix nisplus-,$(databases))
56 libnss_nisplus-inhibit-o = $(filter-out .so,$(object-suffixes))
57
58 # Sun's header files are not too clean.
59 CFLAGS-compat-pwd.c = -Wno-strict-prototypes
60 CFLAGS-compat-spwd.c = -Wno-strict-prototypes
61 CFLAGS-compat-grp.c = -Wno-strict-prototypes
62 CFLAGS-nis-alias.c = -Wno-strict-prototypes
63 CFLAGS-nis-ethers.c = -Wno-strict-prototypes
64 CFLAGS-nis-grp.c = -Wno-strict-prototypes
65 CFLAGS-nis-hosts.c = -Wno-strict-prototypes
66 CFLAGS-nis-netgrp.c = -Wno-strict-prototypes
67 CFLAGS-nis-network.c = -Wno-strict-prototypes
68 CFLAGS-nis-proto.c = -Wno-strict-prototypes
69 CFLAGS-nis-publickey.c = -Wno-strict-prototypes
70 CFLAGS-nis-pwd.c = -Wno-strict-prototypes
71 CFLAGS-nis-rpc.c = -Wno-strict-prototypes
72 CFLAGS-nis-service.c = -Wno-strict-prototypes
73 CFLAGS-nis-spwd.c = -Wno-strict-prototypes
74 CFLAGS-ypclnt.c = -Wno-strict-prototypes -Wno-write-strings -Irpcsvc
75 CFLAGS-yp_xdr.c = -Wno-strict-prototypes -Irpcsvc
76 CFLAGS-ypupdate_xdr.c = -Wno-strict-prototypes -Irpcsvc
77 # For the NIS+ Code
78 CFLAGS-nis_call.c = -DNO_DES_RPC -Wno-strict-prototypes
79 CFLAGS-nis_subr.c = -Wno-strict-prototypes
80 CFLAGS-nis_local_names.c = -Wno-strict-prototypes
81 CFLAGS-nis_free.c = -Wno-strict-prototypes
82 CFLAGS-nis_file.c = -Wno-strict-prototypes
83 CFLAGS-nis_print.c = -Wno-strict-prototypes
84 CFLAGS-nis_error.c = -Wno-strict-prototypes
85 CFLAGS-nis_names.c = -Wno-strict-prototypes
86 CFLAGS-nis_clone.c = -Wno-strict-prototypes
87 CFLAGS-nis_table.c = -Wno-strict-prototypes
88 CFLAGS-nis_server.c = -Wno-strict-prototypes
89 CFLAGS-nis_xdr.c = -Wno-strict-prototypes
90 CFLAGS-nis_intern.c = -Wno-strict-prototypes
91 CFLAGS-nisplus-alias.c = -Wno-strict-prototypes
92 CFLAGS-nisplus-ethers.c = -Wno-strict-prototypes
93 CFLAGS-nisplus-grp.c = -Wno-strict-prototypes
94 CFLAGS-nisplus-hosts.c = -Wno-strict-prototypes
95 CFLAGS-nisplus-netgrp.c = -Wno-strict-prototypes
96 CFLAGS-nisplus-network.c = -Wno-strict-prototypes
97 CFLAGS-nisplus-proto.c = -Wno-strict-prototypes
98 CFLAGS-nisplus-publickey.c = -Wno-strict-prototypes
99 CFLAGS-nisplus-pwd.c = -Wno-strict-prototypes
100 CFLAGS-nisplus-rpc.c = -Wno-strict-prototypes
101 CFLAGS-nisplus-service.c = -Wno-strict-prototypes
102 CFLAGS-nisplus-spwd.c = -Wno-strict-prototypes
103
104 include ../Rules
105
106
107 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version) \
108                            $(common-objpfx)nss/libnss_files.so
109 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
110                         $(common-objpfx)nss/libnss_files.so
111 $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
112
113 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
114 # This ensures they will load libc.so for needed symbols if loaded by
115 # a statically-linked program that hasn't already loaded it.
116 $(services:%=$(objpfx)libnss_%.so): $(common-objpfx)libc.so
117
118
119 ifeq ($(build-shared),yes)
120 $(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
121 else
122 $(others:%=$(objpfx)%): $(objpfx)libnsl.a
123 endif