Makefile.in 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. subdirs += libc/inet
  8. include $(top_srcdir)libc/inet/rpc/Makefile.in
  9. INET_DIR := $(top_srcdir)libc/inet
  10. INET_OUT := $(top_builddir)libc/inet
  11. CFLAGS-inet := -DRESOLVER="\"resolv.c\""
  12. CSRC-y :=
  13. # des uses ntohl
  14. CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ntohl.c
  15. CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  16. getservice.c getproto.c getnet.c hostid.c \
  17. inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
  18. ifaddrs.c ntop.c
  19. CSRC-$(UCLIBC_HAS_IPV6) += in6_addr.c
  20. # multi source addr.c
  21. CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  22. inet_aton.c inet_addr.c inet_ntoa.c inet_makeaddr.c \
  23. inet_lnaof.c inet_netof.c
  24. # multi source resolv.c
  25. CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  26. encodeh.c decodeh.c encoded.c decoded.c \
  27. encodeq.c encodea.c \
  28. read_etc_hosts_r.c \
  29. dnslookup.c opennameservers.c closenameservers.c \
  30. getnameinfo.c \
  31. gethostent.c gethostent_r.c
  32. CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  33. get_hosts_byaddr_r.c get_hosts_byname_r.c \
  34. gethostbyaddr_r.c gethostbyname_r.c gethostbyname2_r.c \
  35. gethostbyaddr.c gethostbyname.c gethostbyname2.c
  36. CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  37. res_init.c res_query.c res_comp.c ns_name.c \
  38. _res_state.c
  39. CSRC-$(findstring y,$(UCLIBC_HAS_RESOLVER_SUPPORT)) += \
  40. ns_netint.c ns_parse.c
  41. ## # unused ATM
  42. ## CSRC-y += encodep.c decodep.c formquery.c
  43. # multi source socketcalls.c
  44. socketcalls_CSRC-y += \
  45. accept.c bind.c connect.c getpeername.c getsockname.c \
  46. getsockopt.c listen.c recv.c recvfrom.c recvmsg.c send.c sendmsg.c \
  47. sendto.c setsockopt.c shutdown.c socket.c socketpair.c
  48. socketcalls_CSRC-$(UCLIBC_LINUX_SPECIFIC) += accept4.c
  49. CSRC-$(UCLIBC_HAS_SOCKET) += $(socketcalls_CSRC-y) opensock.c
  50. CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ethers.c ether_addr.c
  51. INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC-y))
  52. INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC-y))
  53. libc-y += $(INET_OBJ)
  54. objclean-y += CLEAN_libc/inet
  55. CLEAN_libc/inet:
  56. $(do_rm) $(addprefix $(INET_OUT)/*., o os)