Remove dead code from x86-32 SSSE3 strncmp.
[glibc.git] / nss / Makefile
blob04165b7604b6bffb49d9ab9a95931b49825e384d
1 # Copyright (C) 1996-1998,2000-2002,2007,2009,2010
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, write to the Free
17 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 # 02111-1307 USA.
21 # Makefile for name service switch.
23 subdir := nss
25 headers := nss.h
26 distribute := nsswitch.h XXX-lookup.c getXXbyYY.c getXXbyYY_r.c \
27 getXXent.c getXXent_r.c databases.def \
28 nsswitch.conf digits_dots.c function.def
30 # This is the trivial part which goes into libc itself.
31 routines = nsswitch getnssent getnssent_r digits_dots \
32 $(addsuffix -lookup,$(databases))
34 # These are the databases that go through nss dispatch.
35 # Caution: if you add a database here, you must add its real name
36 # in databases.def, too.
37 databases = proto service hosts network grp pwd rpc ethers \
38 spwd netgrp key alias sgrp
40 others := getent
41 install-bin := getent
43 tests = test-netdb tst-nss-test1
44 xtests = bug-erange
46 include ../Makeconfig
48 ifeq (yes,$(build-static-nss))
49 otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
50 $(resolvobjdir)/libresolv.a
51 endif
53 # Specify rules for the nss_* modules. We have some services.
54 services := files
56 extra-libs = $(services:%=libnss_%)
57 # These libraries will be built in the `others' pass rather than
58 # the `lib' pass, because they depend on libc.so being built already.
59 extra-libs-others = $(extra-libs)
61 # The sources are found in the appropriate subdir.
62 subdir-dirs = $(services:%=nss_%)
63 vpath %.c $(subdir-dirs)
66 libnss_files-routines := $(addprefix files-,$(databases)) \
67 files-have_o_cloexec
68 distribute += files-XXX.c files-parse.c
71 # Build static module if requested
72 ifneq ($(build-static-nss),yes)
73 libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
74 endif
76 include ../Rules
79 ifeq (yes,$(build-static-nss))
80 $(objpfx)getent: $(objpfx)libnss_files.a
81 endif
83 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
84 # This ensures they will load libc.so for needed symbols if loaded by
85 # a statically-linked program that hasn't already loaded it.
86 $(services:%=$(objpfx)libnss_%.so): $(common-objpfx)libc.so \
87 $(common-objpfx)libc_nonshared.a
90 distribute += nss_test1.c
92 CFLAGS-nss_test1.c = -DNOT_IN_libc=1
93 $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(common-objpfx)libc.so \
94 $(common-objpfx)libc_nonshared.a
95 $(build-module)
96 $(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so
97 $(make-link)
98 $(objpfx)tst-nss-test1.out: $(objpfx)/libnss_test1.so$(libnss_test1.so-version)