]> git.ipfire.org Git - thirdparty/glibc.git/blob - grp/Makefile
Merge branch 'master' into bug13658-branch
[thirdparty/glibc.git] / grp / Makefile
1 # Copyright (C) 1991,1992,1996-2000,2003,2004,2012
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4
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.
9
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.
14
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <http://www.gnu.org/licenses/>.
18
19 #
20 # Sub-makefile for grp portion of the library.
21 #
22 subdir := grp
23 headers := grp.h
24
25 routines := fgetgrent initgroups setgroups \
26 getgrent getgrgid getgrnam putgrent \
27 getgrent_r getgrgid_r getgrnam_r fgetgrent_r
28
29 include ../Makeconfig
30
31 tests := testgrp
32
33 ifeq (yes,$(build-shared))
34 test-srcs := tst_fgetgrent
35 endif
36
37
38 include ../Rules
39
40 ifeq (yes,$(build-static-nss))
41 otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
42 $(resolvobjdir)/libresolv.a
43 endif
44
45
46 ifeq ($(have-thread-library),yes)
47
48 CFLAGS-getgrgid_r.c = -DUSE_NSCD=1 -fexceptions
49 CFLAGS-getgrnam_r.c = -DUSE_NSCD=1 -fexceptions
50 CFLAGS-getgrent_r.c = -fexceptions
51 CFLAGS-getgrent.c = -fexceptions
52 CFLAGS-fgetgrent.c = -fexceptions
53 CFLAGS-fgetgrent_r.c = -fexceptions -D_IO_MTSAFE_IO
54 CFLAGS-putgrent.c = -fexceptions -D_IO_MTSAFE_IO
55 CFLAGS-initgroups.c = -DUSE_NSCD=1 -fexceptions
56 CFLAGS-getgrgid.c = -fexceptions
57
58 endif
59
60 ifeq (no,$(cross-compiling))
61 # tst_fgetgrent currently only works with shared libraries
62 ifeq (yes,$(build-shared))
63 tests: $(objpfx)tst_fgetgrent.out
64 $(objpfx)tst_fgetgrent.out: tst_fgetgrent.sh $(objpfx)tst_fgetgrent
65 $(SHELL) -e tst_fgetgrent.sh $(common-objpfx) $(elf-objpfx) \
66 $(rtld-installed-name)
67
68 endif
69 endif