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
) \
109 setipv4sourcefilter \
113 install-others
= $(inst_sysconfdir
)/rpc
115 aux
:= check_pf check_native ifreq
138 # tst-deadline must be linked statically so that we can access
139 # internal functions.
140 tests-static
+= tst-deadline
141 tests-internal
+= tst-deadline
143 # tst-idna_name_classify must be linked statically because it tests
144 # internal functionality.
145 tests-static
+= tst-idna_name_classify
146 tests-internal
+= tst-idna_name_classify
148 # tst-inet6_scopeid_pton also needs internal functions but does not
149 # need to be linked statically.
150 tests-internal
+= tst-inet6_scopeid_pton
154 LOCALES
:= en_US.UTF-8 en_US.ISO-8859-1
155 include ..
/gen-locales.mk
157 ifeq ($(have-thread-library
),yes
)
159 CFLAGS-gethstbyad_r.c
+= -fexceptions
160 CFLAGS-gethstbyad.c
+= -fexceptions
161 CFLAGS-gethstbynm_r.c
+= -fexceptions
162 CFLAGS-gethstbynm.c
+= -fexceptions
163 CFLAGS-gethstbynm2_r.c
+= -fexceptions
164 CFLAGS-gethstbynm2.c
+= -fexceptions
165 CFLAGS-gethstent_r.c
+= -fexceptions
166 CFLAGS-gethstent.c
+= -fexceptions
167 CFLAGS-rcmd.c
+= -fexceptions
168 CFLAGS-getnetbynm_r.c
+= -fexceptions
169 CFLAGS-getnetbynm.c
+= -fexceptions
170 CFLAGS-getnetbyad_r.c
+= -fexceptions
171 CFLAGS-getnetbyad.c
+= -fexceptions
172 CFLAGS-getnetent_r.c
+= -fexceptions
173 CFLAGS-getnetent.c
+= -fexceptions
174 CFLAGS-getrpcent_r.c
+= -fexceptions
175 CFLAGS-getrpcent.c
+= -fexceptions
176 CFLAGS-getservent_r.c
+= -fexceptions
177 CFLAGS-getservent.c
+= -fexceptions
178 CFLAGS-getprtent_r.c
+= -fexceptions
179 CFLAGS-getprtent.c
+= -fexceptions
180 CFLAGS-either_ntoh.c
+= -fexceptions
181 CFLAGS-either_hton.c
+= -fexceptions
182 CFLAGS-getnetgrent.c
+= -fexceptions
183 CFLAGS-getnetgrent_r.c
+= -fexceptions
184 CFLAGS-in6_addr.c
+= $(config-cflags-wno-ignored-attributes
)
185 CFLAGS-if_index.c
+= $(config-cflags-wno-ignored-attributes
)
186 CFLAGS-ifaddrs.c
+= $(config-cflags-wno-ignored-attributes
)
188 CFLAGS-tst-checks-posix.c
+= -std
=c99
189 CFLAGS-tst-sockaddr.c
+= -fno-strict-aliasing
193 # Install the rpc database file.
194 $(inst_sysconfdir
)/rpc
: etc.rpc
$(+force)
197 ifeq ($(build-static-nss
),yes
)
198 CFLAGS
+= -DSTATIC_NSS
201 # The test uses dlopen indirectly and would otherwise load system
203 tst-idna_name_classify-ENV
= \
204 LD_LIBRARY_PATH
=$(ld-library-path
):$(common-objpfx
):$(common-objpfx
)elf
205 $(objpfx
)tst-idna_name_classify.out
: $(gen-locales
)