blob: f1d871ff11de89de6de6ccc2adfcb3f67a97efb6 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# Copyright (C) 1991-2015 Free Software Foundation, Inc.
2# This file is part of the GNU C Library.
3
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.
8
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.
13
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# <http://www.gnu.org/licenses/>.
17
18#
19# Sub-makefile for inet portion of the library.
20#
21subdir := inet
22
23include ../Makeconfig
24
25headers := 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
30routines := htonl htons \
31 inet_lnaof inet_mkadr \
32 inet_netof inet_ntoa inet_net herrno herrno-loc \
33 gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
34 gethstbynm_r gethstent gethstent_r \
35 getnetbyad getnetbyad_r getnetbynm getnetent getnetent_r \
36 getnetbynm_r \
37 getproto getproto_r getprtent getprtent_r getprtname getprtname_r \
38 getsrvbynm getsrvbynm_r getsrvbypt getsrvbypt_r getservent \
39 getservent_r \
40 ether_aton ether_aton_r ether_hton ether_line \
41 ether_ntoa ether_ntoa_r ether_ntoh \
42 rcmd rexec ruserpass \
43 getnetgrent_r getnetgrent \
44 getaliasent_r getaliasent getaliasname getaliasname_r \
45 in6_addr getnameinfo if_index ifaddrs inet6_option \
46 getipv4sourcefilter setipv4sourcefilter \
47 getsourcefilter setsourcefilter inet6_opt inet6_rth
48
49aux := check_pf check_native ifreq
50
51tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
52 tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
53 tst-getni1 tst-getni2 tst-inet6_rth tst-checks
54
55include ../Rules
56
57ifeq ($(have-thread-library),yes)
58
59CFLAGS-gethstbyad_r.c = -fexceptions
60CFLAGS-gethstbyad.c = -fexceptions
61CFLAGS-gethstbynm_r.c = -fexceptions
62CFLAGS-gethstbynm.c = -fexceptions
63CFLAGS-gethstbynm2_r.c = -fexceptions
64CFLAGS-gethstbynm2.c = -fexceptions
65CFLAGS-gethstent_r.c = -fexceptions
66CFLAGS-gethstent.c = -fexceptions
67CFLAGS-rcmd.c = -fexceptions
68CFLAGS-getnetbynm_r.c = -fexceptions
69CFLAGS-getnetbynm.c = -fexceptions
70CFLAGS-getnetbyad_r.c = -fexceptions
71CFLAGS-getnetbyad.c = -fexceptions
72CFLAGS-getnetent_r.c = -fexceptions
73CFLAGS-getnetent.c = -fexceptions
74CFLAGS-getaliasent_r.c = -fexceptions
75CFLAGS-getaliasent.c = -fexceptions
76CFLAGS-getrpcent_r.c = -fexceptions
77CFLAGS-getrpcent.c = -fexceptions
78CFLAGS-getservent_r.c = -fexceptions
79CFLAGS-getservent.c = -fexceptions
80CFLAGS-getprtent_r.c = -fexceptions
81CFLAGS-getprtent.c = -fexceptions
82CFLAGS-either_ntoh.c = -fexceptions
83CFLAGS-either_hton.c = -fexceptions
84CFLAGS-getnetgrent.c = -fexceptions
85CFLAGS-getnetgrent_r.c = -fexceptions
86
87endif
88
89ifeq ($(build-static-nss),yes)
90CFLAGS += -DSTATIC_NSS
91endif