Makefile 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #
  2. # Copyright (C) 2001-2006 by egnite Software GmbH
  3. #
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions
  8. # are met:
  9. #
  10. # 1. Redistributions of source code must retain the above copyright
  11. # notice, this list of conditions and the following disclaimer.
  12. # 2. Redistributions in binary form must reproduce the above copyright
  13. # notice, this list of conditions and the following disclaimer in the
  14. # documentation and/or other materials provided with the distribution.
  15. # 3. Neither the name of the copyright holders nor the names of
  16. # contributors may be used to endorse or promote products derived
  17. # from this software without specific prior written permission.
  18. #
  19. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. # SUCH DAMAGE.
  31. #
  32. # For additional information see http://www.ethernut.de/
  33. #
  34. top_srcdir = ..
  35. include $(top_srcdir)/NutConf.mk
  36. all:
  37. ifneq (, $(findstring h8300, $(ARCH)))
  38. $(MAKE) -C $(top_srcdir)/arch/$(ARCH)/init
  39. endif
  40. $(MAKE) -C $(top_srcdir)/arch
  41. $(MAKE) -C $(top_srcdir)/os
  42. $(MAKE) -C $(top_srcdir)/fs
  43. $(MAKE) -C $(top_srcdir)/dev
  44. $(MAKE) -C $(top_srcdir)/net
  45. $(MAKE) -C $(top_srcdir)/pro
  46. $(MAKE) -C $(top_srcdir)/crt
  47. $(MAKE) -C $(top_srcdir)/gorp
  48. ifeq ($(ARCH), avr)
  49. $(MAKE) -C $(top_srcdir)/cpp
  50. endif
  51. install:
  52. ifneq (, $(findstring h8300, $(ARCH)))
  53. $(MAKE) -C $(top_srcdir)/arch/$(ARCH)/init install
  54. endif
  55. $(MAKE) -C $(top_srcdir)/arch install
  56. $(MAKE) -C $(top_srcdir)/os install
  57. $(MAKE) -C $(top_srcdir)/fs install
  58. $(MAKE) -C $(top_srcdir)/dev install
  59. $(MAKE) -C $(top_srcdir)/net install
  60. $(MAKE) -C $(top_srcdir)/pro install
  61. $(MAKE) -C $(top_srcdir)/crt install
  62. $(MAKE) -C $(top_srcdir)/gorp install
  63. ifeq ($(ARCH), avr)
  64. $(MAKE) -C $(top_srcdir)/cpp install
  65. endif
  66. clean:
  67. ifneq (, $(findstring h8300, $(ARCH)))
  68. $(MAKE) -C $(top_srcdir)/arch/$(ARCH)/init clean
  69. endif
  70. $(MAKE) -C $(top_srcdir)/arch clean
  71. $(MAKE) -C $(top_srcdir)/os clean
  72. $(MAKE) -C $(top_srcdir)/fs clean
  73. $(MAKE) -C $(top_srcdir)/dev clean
  74. $(MAKE) -C $(top_srcdir)/net clean
  75. $(MAKE) -C $(top_srcdir)/pro clean
  76. $(MAKE) -C $(top_srcdir)/crt clean
  77. $(MAKE) -C $(top_srcdir)/cpp clean
  78. $(MAKE) -C $(top_srcdir)/gorp clean
  79. apps:
  80. $(MAKE) -C $(top_srcdir)/app
  81. apps-install:
  82. $(MAKE) -C $(top_srcdir)/app install
  83. cleanall:
  84. ifneq (, $(findstring h8300, $(ARCH)))
  85. $(MAKE) -C $(top_srcdir)/arch/$(ARCH)/init clean
  86. endif
  87. $(MAKE) -C $(top_srcdir)/arch clean
  88. $(MAKE) -C $(top_srcdir)/os clean
  89. $(MAKE) -C $(top_srcdir)/fs clean
  90. $(MAKE) -C $(top_srcdir)/dev clean
  91. $(MAKE) -C $(top_srcdir)/net clean
  92. $(MAKE) -C $(top_srcdir)/pro clean
  93. $(MAKE) -C $(top_srcdir)/crt clean
  94. $(MAKE) -C $(top_srcdir)/gorp clean
  95. $(MAKE) -C $(top_srcdir)/cpp clean
  96. $(MAKE) -C $(top_srcdir)/app clean
  97. distclean:
  98. ifneq (, $(findstring h8300, $(ARCH)))
  99. $(MAKE) -C $(top_srcdir)/arch/$(ARCH)/init clean
  100. endif
  101. $(MAKE) -C $(top_srcdir)/arch clean
  102. $(MAKE) -C $(top_srcdir)/os clean
  103. $(MAKE) -C $(top_srcdir)/fs clean
  104. $(MAKE) -C $(top_srcdir)/dev clean
  105. $(MAKE) -C $(top_srcdir)/net clean
  106. $(MAKE) -C $(top_srcdir)/pro clean
  107. $(MAKE) -C $(top_srcdir)/crt clean
  108. $(MAKE) -C $(top_srcdir)/gorp clean
  109. $(MAKE) -C $(top_srcdir)/cpp clean
  110. $(MAKE) -C $(top_srcdir)/app clean
  111. cd $(top_srcdir)
  112. rm -f UserConf.mk Makerules Makedefs app/Makerules app/Makedefs
  113. rm -f include/stdio_orig.h include/sys/types_orig.h include/errno_orig.h include/fcntl_orig.h
  114. rm -f include/sys/socket_orig.h include/netdb_orig.h include/netinet/in_orig.h
  115. rm -f `find . -name '*\.[ch]~'`