1 # Copyright (C) 1991-2024 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
) \
76 install-others
= $(inst_sysconfdir
)/rpc
78 aux
:= check_pf check_native ifreq
100 # tst-deadline must be linked statically so that we can access
101 # internal functions.
102 tests-static
+= tst-deadline
103 tests-internal
+= tst-deadline
105 # tst-idna_name_classify must be linked statically because it tests
106 # internal functionality.
107 tests-static
+= tst-idna_name_classify
108 tests-internal
+= tst-idna_name_classify
110 # tst-inet6_scopeid_pton also needs internal functions but does not
111 # need to be linked statically.
112 tests-internal
+= tst-inet6_scopeid_pton
116 LOCALES
:= en_US.UTF-8 en_US.ISO-8859-1
117 include ..
/gen-locales.mk
119 ifeq ($(have-thread-library
),yes
)
121 CFLAGS-rcmd.c
+= -fexceptions
122 CFLAGS-either_ntoh.c
+= -fexceptions
123 CFLAGS-either_hton.c
+= -fexceptions
124 CFLAGS-in6_addr.c
+= $(config-cflags-wno-ignored-attributes
)
125 CFLAGS-if_index.c
+= $(config-cflags-wno-ignored-attributes
)
126 CFLAGS-ifaddrs.c
+= $(config-cflags-wno-ignored-attributes
)
128 CFLAGS-tst-checks-posix.c
+= -std
=c99
129 CFLAGS-tst-sockaddr.c
+= -fno-strict-aliasing
133 # Install the rpc database file.
134 $(inst_sysconfdir
)/rpc
: etc.rpc
$(+force)
137 ifeq ($(build-static-nss
),yes
)
138 CFLAGS
+= -DSTATIC_NSS
141 # The test uses dlopen indirectly and would otherwise load system
143 tst-idna_name_classify-ENV
= \
144 LD_LIBRARY_PATH
=$(ld-library-path
):$(common-objpfx
):$(common-objpfx
)elf
145 $(objpfx
)tst-idna_name_classify.out
: $(gen-locales
)