Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ############################################################################
  2. # net/Makefile
  3. #
  4. # Licensed to the Apache Software Foundation (ASF) under one or more
  5. # contributor license agreements. See the NOTICE file distributed with
  6. # this work for additional information regarding copyright ownership. The
  7. # ASF licenses this file to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance with the
  9. # License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. # License for the specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. ############################################################################
  20. include $(TOPDIR)/Make.defs
  21. ifeq ($(CONFIG_NET),y)
  22. # Basic networking support
  23. NET_CSRCS = net_initialize.c
  24. include socket/Make.defs
  25. include inet/Make.defs
  26. include netdev/Make.defs
  27. include arp/Make.defs
  28. include icmp/Make.defs
  29. include icmpv6/Make.defs
  30. include neighbor/Make.defs
  31. include igmp/Make.defs
  32. include pkt/Make.defs
  33. include local/Make.defs
  34. include rpmsg/Make.defs
  35. include mld/Make.defs
  36. include can/Make.defs
  37. include netlink/Make.defs
  38. include tcp/Make.defs
  39. include udp/Make.defs
  40. include sixlowpan/Make.defs
  41. include bluetooth/Make.defs
  42. include ieee802154/Make.defs
  43. include devif/Make.defs
  44. include ipforward/Make.defs
  45. include route/Make.defs
  46. include procfs/Make.defs
  47. include usrsock/Make.defs
  48. include utils/Make.defs
  49. endif
  50. CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)net}
  51. ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS)
  52. AOBJS = $(ASRCS:.S=$(OBJEXT))
  53. CSRCS = $(SOCK_CSRCS) $(NETDEV_CSRCS) $(NET_CSRCS)
  54. COBJS = $(CSRCS:.c=$(OBJEXT))
  55. SRCS = $(ASRCS) $(CSRCS)
  56. OBJS = $(AOBJS) $(COBJS)
  57. BIN = libnet$(LIBEXT)
  58. all: $(BIN)
  59. .PHONY: depend clean distclean
  60. $(AOBJS): %$(OBJEXT): %.S
  61. $(call ASSEMBLE, $<, $@)
  62. $(COBJS): %$(OBJEXT): %.c
  63. $(call COMPILE, $<, $@)
  64. $(BIN): $(OBJS)
  65. $(call ARCHIVE, $@, $(OBJS))
  66. makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
  67. $(call CATFILE, Make.dep, $^)
  68. $(call DELFILE, $^)
  69. .depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
  70. ifeq ($(CONFIG_NET),y)
  71. $(Q) $(MAKE) makedepfile
  72. endif
  73. $(Q) touch $@
  74. depend: .depend
  75. clean:
  76. $(call DELFILE, $(BIN))
  77. $(call CLEAN)
  78. distclean: clean
  79. $(call DELFILE, Make.dep)
  80. $(call DELFILE, .depend)
  81. -include Make.dep