summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/Makefile.in15
-rw-r--r--libc/inet/rpc/Makefile.in28
2 files changed, 19 insertions, 24 deletions
diff --git a/libc/inet/Makefile.in b/libc/inet/Makefile.in
index a4d3c49e6..5a5593838 100644
--- a/libc/inet/Makefile.in
+++ b/libc/inet/Makefile.in
@@ -11,33 +11,34 @@ include $(top_srcdir)libc/inet/rpc/Makefile.in
INET_DIR := $(top_srcdir)libc/inet
INET_OUT := $(top_builddir)libc/inet
+V4_OR_V6 := $(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6))
CFLAGS-inet := -DRESOLVER="\"resolv.c\""
CSRC-y :=
# des uses ntohl
-CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ntohl.c
-CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
+CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(V4_OR_V6)) += ntohl.c
+CSRC-$(V4_OR_V6) += \
getservice.c getproto.c getnet.c hostid.c \
inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
ifaddrs.c ntop.c
CSRC-$(UCLIBC_HAS_IPV6) += in6_addr.c
# multi source addr.c
-CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
+CSRC-$(V4_OR_V6) += \
inet_aton.c inet_addr.c inet_ntoa.c inet_makeaddr.c \
inet_lnaof.c inet_netof.c
# multi source resolv.c
-CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
+CSRC-$(V4_OR_V6) += \
encodeh.c decodeh.c encoded.c decoded.c \
encodeq.c encodea.c \
read_etc_hosts_r.c \
dnslookup.c opennameservers.c closenameservers.c \
getnameinfo.c \
gethostent.c gethostent_r.c
-CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
+CSRC-$(V4_OR_V6) += \
get_hosts_byaddr_r.c get_hosts_byname_r.c \
gethostbyaddr_r.c gethostbyname_r.c gethostbyname2_r.c \
gethostbyaddr.c gethostbyname.c gethostbyname2.c
-CSRC-$(findstring y,$(UCLIBC_HAS_RESOLVER_SUPPORT)) += \
+CSRC-$(UCLIBC_HAS_RESOLVER_SUPPORT) += \
ns_netint.c ns_parse.c res_data.c \
res_init.c res_query.c res_comp.c ns_name.c \
_res_state.c
@@ -52,7 +53,7 @@ socketcalls_CSRC-y += \
socketcalls_CSRC-$(UCLIBC_LINUX_SPECIFIC) += accept4.c
CSRC-$(UCLIBC_HAS_SOCKET) += $(socketcalls_CSRC-y) opensock.c
-CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ethers.c ether_addr.c
+CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(V4_OR_V6)) += ethers.c ether_addr.c
INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC-y))
INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC-y))
diff --git a/libc/inet/rpc/Makefile.in b/libc/inet/rpc/Makefile.in
index 6ec674d10..481961d80 100644
--- a/libc/inet/rpc/Makefile.in
+++ b/libc/inet/rpc/Makefile.in
@@ -9,9 +9,8 @@ subdirs += libc/inet/rpc
CFLAGS-rpc := -fno-strict-aliasing
-ifneq ($(UCLIBC_HAS_FULL_RPC),y)
# For now, only compile the stuff needed to do an NFS mount....
-CSRC:= authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
+CSRC_NFS = authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
clnt_perror.c clnt_simple.c clnt_tcp.c clnt_udp.c \
create_xid.c getrpcent.c \
pmap_clnt.c pm_getmaps.c pm_getport.c pmap_prot.c pmap_prot2.c \
@@ -19,27 +18,22 @@ CSRC:= authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
rpc_prot.c rpc_thread.c rtime.c ruserpass.c sa_len.c \
svc.c svc_auth.c svc_authux.c \
xdr.c xdr_array.c xdr_mem.c xdr_rec.c xdr_reference.c
-endif
+CSRC_ALL = $(notdir $(wildcard $(INET_RPC_DIR)/*.c))
+CSRC-y := $(if $(UCLIBC_HAS_FULL_RPC),$(CSRC_ALL),$(CSRC_NFS))
+# rpc_thread.oS is better, because the header adds unneeded references
+# to __pthread_internal_tsd*
+CSRC-y := $(filter-out rpc_thread.c,$(CSRC-y))
INET_RPC_DIR:=$(top_srcdir)libc/inet/rpc
INET_RPC_OUT:=$(top_builddir)libc/inet/rpc
-ifeq ($(UCLIBC_HAS_FULL_RPC),y)
-INET_RPC_SRC:=$(wildcard $(INET_RPC_DIR)/*.c)
-else
-INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC))
-endif
-# rpc_thread.oS is better, because the header adds unneeded references to __pthread_internal_tsd*
-INET_RPC_SRC:=$(filter-out $(INET_RPC_DIR)/rpc_thread.c,$(INET_RPC_SRC))
-
-INET_RPC_OBJ:=$(patsubst $(INET_RPC_DIR)/%.c,$(INET_RPC_OUT)/%.o,$(INET_RPC_SRC))
-
-libc-static-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OUT)/rpc_thread.o
-libc-shared-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OUT)/rpc_thread.oS
+INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC-y))
+INET_RPC_OBJ:=$(patsubst %.c,$(INET_RPC_OUT)/%.o,$(CSRC-y))
+libc-static-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.o
+libc-shared-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.oS
libc-nomulti-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.o
-
-libc-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OBJ)
+libc-$(UCLIBC_HAS_RPC) += $(INET_RPC_OBJ)
objclean-y+=CLEAN_libc/inet/rpc