Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2008 by egnite GmbH
  3. # Copyright (C) 2001-2004 by egnite Software GmbH
  4. #
  5. # All rights reserved.
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions
  9. # are met:
  10. #
  11. # 1. Redistributions of source code must retain the above copyright
  12. # notice, this list of conditions and the following disclaimer.
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. # notice, this list of conditions and the following disclaimer in the
  15. # documentation and/or other materials provided with the distribution.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20. # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21. # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  24. # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  25. # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  26. # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  27. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. # SUCH DAMAGE.
  29. #
  30. # For additional information see http://www.ethernut.de/
  31. #
  32. # $Id$
  33. #
  34. PROJ = libnutnet
  35. top_srcdir = ..
  36. top_blddir = ..
  37. LIBDIR = $(top_blddir)/lib
  38. include $(top_srcdir)/NutConf.mk
  39. include $(top_srcdir)/Makedefs
  40. SRC1 = tcpsock.c tcpsm.c tcpin.c tcpout.c tcputil.c \
  41. udpsock.c udpin.c udpout.c \
  42. icmpin.c icmpout.c \
  43. lcpin.c ipcpin.c pppsm.c papin.c papout.c
  44. SRC2 = ipin.c ipout.c ipcsum.c ipdemux.c route.c inet.c \
  45. netdebug.c pppdebug.c \
  46. arpin.c arpout.c arpcache.c \
  47. ethin.c ethout.c ethdemux.c ifconfig.c confnet.c \
  48. pppin.c pppout.c lcpout.c ipcpout.c \
  49. igmpin.c igmpout.c ether_addr.c
  50. # igmp.c
  51. OBJ1 = $(SRC1:.c=.o)
  52. OBJ2 = $(SRC2:.c=.o)
  53. TARG = $(PROJ).a
  54. all: $(TARG)
  55. include $(top_srcdir)/Makerules
  56. $(TARG): $(OBJ1) $(OBJ2)
  57. $(AR) $(ARFLAGS) $(TARG) $(OBJ1)
  58. $(AR) $(ARFLAGS) $(TARG) $(OBJ2)
  59. install: $(TARG)
  60. $(CP) $(TARG) $(LIBDIR)/$(TARG)
  61. ifeq ($(ARCH), unix)
  62. $(RANLIB) $(LIBDIR)/$(TARG)
  63. endif
  64. clean:
  65. @echo " [CLEANING] $(TARG)..."
  66. @-rm -f $(TARG)
  67. @-rm -f $(OBJ1) $(OBJ2)
  68. @-rm -f $(SRC1:.c=.lst) $(SRC2:.c=.lst)
  69. @-rm -f $(SRC1:.c=.lis) $(SRC2:.c=.lis)
  70. @-rm -f $(SRC1:.c=.s) $(SRC2:.c=.s)
  71. @-rm -f $(SRC1:.c=.bak) $(SRC2:.c=.bak)
  72. @-rm -f $(SRC1:.c=.c~) $(SRC2:.c=.c~)
  73. @-rm -f $(SRC1:.c=.i) $(SRC2:.c=.i)