Linux: consolidate chmod implementation
[glibc.git] / inet / Makefile
bloba5ef1ec0a3da78672ed5f427ac4ccbf1d91ef377
1 # Copyright (C) 1991-2022 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.
21 subdir := inet
23 include ../Makeconfig
25 headers := netinet/ether.h netinet/in.h netinet/in_systm.h \
26 netinet/if_ether.h netinet/igmp.h \
27 netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
28 aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h \
29 rpc/netdb.h
31 routines := htonl htons \
32 inet_lnaof inet_mkadr \
33 inet_netof inet_ntoa inet_net herrno herrno-loc \
34 gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
35 gethstbynm_r gethstent gethstent_r \
36 getnetbyad getnetbyad_r getnetbynm getnetent getnetent_r \
37 getnetbynm_r \
38 getproto getproto_r getprtent getprtent_r getprtname getprtname_r \
39 getsrvbynm getsrvbynm_r getsrvbypt getsrvbypt_r getservent \
40 getservent_r getrpcent getrpcbyname getrpcbynumber \
41 getrpcent_r getrpcbyname_r getrpcbynumber_r \
42 ether_aton ether_aton_r ether_hton ether_line \
43 ether_ntoa ether_ntoa_r ether_ntoh \
44 rcmd rexec ruserpass bindresvport \
45 getnetgrent_r getnetgrent \
46 getaliasent_r getaliasent getaliasname getaliasname_r \
47 in6_addr getnameinfo if_index ifaddrs inet6_option \
48 getipv4sourcefilter setipv4sourcefilter \
49 getsourcefilter setsourcefilter inet6_opt inet6_rth \
50 inet6_scopeid_pton deadline idna idna_name_classify
52 install-others = $(inst_sysconfdir)/rpc
54 aux := check_pf check_native ifreq
56 tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
57 tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
58 tst-getni1 tst-getni2 tst-inet6_rth tst-checks tst-checks-posix \
59 tst-sockaddr test-hnto-types tst-if_index-long
61 # tst-deadline must be linked statically so that we can access
62 # internal functions.
63 tests-static += tst-deadline
64 tests-internal += tst-deadline
66 # tst-idna_name_classify must be linked statically because it tests
67 # internal functionality.
68 tests-static += tst-idna_name_classify
69 tests-internal += tst-idna_name_classify
71 # tst-inet6_scopeid_pton also needs internal functions but does not
72 # need to be linked statically.
73 tests-internal += tst-inet6_scopeid_pton
75 include ../Rules
77 LOCALES := en_US.UTF-8 en_US.ISO-8859-1
78 include ../gen-locales.mk
80 ifeq ($(have-thread-library),yes)
82 CFLAGS-gethstbyad_r.c += -fexceptions
83 CFLAGS-gethstbyad.c += -fexceptions
84 CFLAGS-gethstbynm_r.c += -fexceptions
85 CFLAGS-gethstbynm.c += -fexceptions
86 CFLAGS-gethstbynm2_r.c += -fexceptions
87 CFLAGS-gethstbynm2.c += -fexceptions
88 CFLAGS-gethstent_r.c += -fexceptions
89 CFLAGS-gethstent.c += -fexceptions
90 CFLAGS-rcmd.c += -fexceptions
91 CFLAGS-getnetbynm_r.c += -fexceptions
92 CFLAGS-getnetbynm.c += -fexceptions
93 CFLAGS-getnetbyad_r.c += -fexceptions
94 CFLAGS-getnetbyad.c += -fexceptions
95 CFLAGS-getnetent_r.c += -fexceptions
96 CFLAGS-getnetent.c += -fexceptions
97 CFLAGS-getaliasent_r.c += -fexceptions
98 CFLAGS-getaliasent.c += -fexceptions
99 CFLAGS-getrpcent_r.c += -fexceptions
100 CFLAGS-getrpcent.c += -fexceptions
101 CFLAGS-getservent_r.c += -fexceptions
102 CFLAGS-getservent.c += -fexceptions
103 CFLAGS-getprtent_r.c += -fexceptions
104 CFLAGS-getprtent.c += -fexceptions
105 CFLAGS-either_ntoh.c += -fexceptions
106 CFLAGS-either_hton.c += -fexceptions
107 CFLAGS-getnetgrent.c += -fexceptions
108 CFLAGS-getnetgrent_r.c += -fexceptions
109 CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes)
110 CFLAGS-if_index.c += $(config-cflags-wno-ignored-attributes)
111 CFLAGS-ifaddrs.c += $(config-cflags-wno-ignored-attributes)
113 CFLAGS-tst-checks-posix.c += -std=c99
114 CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
116 endif
118 # Install the rpc database file.
119 $(inst_sysconfdir)/rpc: etc.rpc $(+force)
120 $(do-install)
122 ifeq ($(build-static-nss),yes)
123 CFLAGS += -DSTATIC_NSS
124 endif
126 # The test uses dlopen indirectly and would otherwise load system
127 # objects.
128 tst-idna_name_classify-ENV = \
129 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
130 $(objpfx)tst-idna_name_classify.out: $(gen-locales)