OSDN Git Service

- ethers only make sense if we want to play with ethernet addresses
[uclinux-h8/uClibc.git] / libc / inet / Makefile.in
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
4 #
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 #
7
8 include $(top_srcdir)libc/inet/rpc/Makefile.in
9
10 INET_DIR := $(top_srcdir)libc/inet
11 INET_OUT := $(top_builddir)libc/inet
12
13 CSRC :=
14 ifneq ($(UCLIBC_HAS_CRYPT_IMPL)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
15 # des uses ntohl
16 CSRC += ntohl.c
17 endif
18 ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
19 CSRC += getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
20         inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
21         ether_addr.c ifaddrs.c ntop.c
22 endif
23 ifeq ($(UCLIBC_HAS_IPV6),y)
24 CSRC += in6_addr.c
25 endif
26
27 # multi source addr.c
28 addr_CSRC := \
29         inet_aton.c inet_addr.c inet_ntoa.c inet_makeaddr.c \
30         inet_lnaof.c inet_netof.c
31 ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
32 CSRC += $(addr_CSRC)
33 endif
34
35 # multi source resolv.c
36 resolv_CSRC += \
37         encodeh.c decodeh.c encoded.c decoded.c lengthd.c \
38         encodeq.c decodeq.c encodea.c decodea.c lengthq.c \
39         dnslookup.c opennameservers.c closenameservers.c \
40         read_etc_hosts_r.c get_hosts_byaddr_r.c get_hosts_byname_r.c \
41         getnameinfo.c \
42         gethostbyaddr_r.c gethostbyname_r.c gethostbyname2_r.c gethostent_r.c \
43         gethostbyaddr.c gethostbyname.c gethostbyname2.c gethostent.c \
44         res_init.c res_query.c res_comp.c ns_name.c
45
46 ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
47 CSRC += $(resolv_CSRC)
48 ## # unused ATM
49 ## CSRC += encodep.c decodep.c formquery.c
50 endif
51
52
53 # multi source socketcalls.c
54 socketcalls_CSRC += \
55         accept.c bind.c connect.c getpeername.c getsockname.c \
56         getsockopt.c listen.c recv.c recvfrom.c recvmsg.c send.c sendmsg.c \
57         sendto.c setsockopt.c shutdown.c socket.c socketpair.c
58 ifeq ($(UCLIBC_HAS_SOCKET),y)
59 CSRC += $(socketcalls_CSRC) opensock.c
60 endif
61
62 ifneq ($(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
63 CSRC += ethers.c
64 endif
65
66 INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC))
67 INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC))
68
69 libc-y += $(INET_OBJ)
70
71 objclean-y += inet_clean
72
73 inet_clean:
74         $(do_rm) $(addprefix $(INET_OUT)/*., o os)