1 # Copyright (C) 1991-2023 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
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 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
19 # Sub-makefile for inet portion of the library.
26 $(wildcard arpa
/*.h protocols
/*.h
) \
107 setipv4sourcefilter \
111 install-others
= $(inst_sysconfdir
)/rpc
113 aux
:= check_pf check_native ifreq
136 # tst-deadline must be linked statically so that we can access
137 # internal functions.
138 tests-static
+= tst-deadline
139 tests-internal
+= tst-deadline
141 # tst-idna_name_classify must be linked statically because it tests
142 # internal functionality.
143 tests-static
+= tst-idna_name_classify
144 tests-internal
+= tst-idna_name_classify
146 # tst-inet6_scopeid_pton also needs internal functions but does not
147 # need to be linked statically.
148 tests-internal
+= tst-inet6_scopeid_pton
152 LOCALES
:= en_US.UTF-8 en_US.ISO-8859-1
153 include ..
/gen-locales.mk
155 ifeq ($(have-thread-library
),yes
)
157 CFLAGS-gethstbyad_r.c
+= -fexceptions
158 CFLAGS-gethstbyad.c
+= -fexceptions
159 CFLAGS-gethstbynm_r.c
+= -fexceptions
160 CFLAGS-gethstbynm.c
+= -fexceptions
161 CFLAGS-gethstbynm2_r.c
+= -fexceptions
162 CFLAGS-gethstbynm2.c
+= -fexceptions
163 CFLAGS-gethstent_r.c
+= -fexceptions
164 CFLAGS-gethstent.c
+= -fexceptions
165 CFLAGS-rcmd.c
+= -fexceptions
166 CFLAGS-getnetbynm_r.c
+= -fexceptions
167 CFLAGS-getnetbynm.c
+= -fexceptions
168 CFLAGS-getnetbyad_r.c
+= -fexceptions
169 CFLAGS-getnetbyad.c
+= -fexceptions
170 CFLAGS-getnetent_r.c
+= -fexceptions
171 CFLAGS-getnetent.c
+= -fexceptions
172 CFLAGS-getrpcent_r.c
+= -fexceptions
173 CFLAGS-getrpcent.c
+= -fexceptions
174 CFLAGS-getservent_r.c
+= -fexceptions
175 CFLAGS-getservent.c
+= -fexceptions
176 CFLAGS-getprtent_r.c
+= -fexceptions
177 CFLAGS-getprtent.c
+= -fexceptions
178 CFLAGS-either_ntoh.c
+= -fexceptions
179 CFLAGS-either_hton.c
+= -fexceptions
180 CFLAGS-getnetgrent.c
+= -fexceptions
181 CFLAGS-getnetgrent_r.c
+= -fexceptions
182 CFLAGS-in6_addr.c
+= $(config-cflags-wno-ignored-attributes
)
183 CFLAGS-if_index.c
+= $(config-cflags-wno-ignored-attributes
)
184 CFLAGS-ifaddrs.c
+= $(config-cflags-wno-ignored-attributes
)
186 CFLAGS-tst-checks-posix.c
+= -std
=c99
187 CFLAGS-tst-sockaddr.c
+= -fno-strict-aliasing
191 # Install the rpc database file.
192 $(inst_sysconfdir
)/rpc
: etc.rpc
$(+force)
195 ifeq ($(build-static-nss
),yes
)
196 CFLAGS
+= -DSTATIC_NSS
199 # The test uses dlopen indirectly and would otherwise load system
201 tst-idna_name_classify-ENV
= \
202 LD_LIBRARY_PATH
=$(ld-library-path
):$(common-objpfx
):$(common-objpfx
)elf
203 $(objpfx
)tst-idna_name_classify.out
: $(gen-locales
)