summaryrefslogtreecommitdiff
path: root/libc/inet/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/Makefile.in')
-rw-r--r--libc/inet/Makefile.in21
1 files changed, 17 insertions, 4 deletions
diff --git a/libc/inet/Makefile.in b/libc/inet/Makefile.in
index f3f65f4e7..493041ff6 100644
--- a/libc/inet/Makefile.in
+++ b/libc/inet/Makefile.in
@@ -10,14 +10,22 @@ include $(top_srcdir)libc/inet/rpc/Makefile.in
INET_DIR := $(top_srcdir)libc/inet
INET_OUT := $(top_builddir)libc/inet
-CSRC := getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
- inet_net.c ntop.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
- in6_addr.c ether_addr.c ntohl.c opensock.c ifaddrs.c
+CSRC :=
+ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
+CSRC += getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
+ inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
+ ether_addr.c ntohl.c ifaddrs.c ntop.c
+endif
+ifeq ($(UCLIBC_HAS_IPV6),y)
+CSRC += in6_addr.c
+endif
# multi source addr.c
addr_CSRC := inet_aton.c inet_addr.c inet_ntoa.c inet_makeaddr.c \
inet_lnaof.c inet_netof.c
+ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
CSRC += $(addr_CSRC)
+endif
# multi source resolv.c
resolv_CSRC += encodeh.c decodeh.c encoded.c decoded.c lengthd.c encodeq.c \
@@ -28,16 +36,21 @@ resolv_CSRC += encodeh.c decodeh.c encoded.c decoded.c lengthd.c encodeq.c \
get_hosts_byaddr_r.c gethostbyname2.c getnameinfo.c gethostent.c \
gethostbyname_r.c gethostbyname2_r.c gethostbyaddr_r.c \
res_comp.c ns_name.c ethers.c
+ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
CSRC += $(resolv_CSRC)
# unused ATM
CSRC += encodep.c decodep.c formquery.c
+endif
+
# multi source socketcalls.c
socketcalls_CSRC += accept.c bind.c connect.c getpeername.c getsockname.c \
getsockopt.c listen.c recv.c recvfrom.c recvmsg.c send.c sendmsg.c \
sendto.c setsockopt.c shutdown.c socket.c socketpair.c
-CSRC += $(socketcalls_CSRC)
+ifeq ($(UCLIBC_HAS_SOCKET),y)
+CSRC += $(socketcalls_CSRC) opensock.c
+endif
INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC))
INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC))