ProtectedLibs.mk 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ############################################################################
  2. # ProtectedLibs.mk
  3. #
  4. # Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved.
  5. # Author: Gregory Nutt <gnutt@nuttx.org>
  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
  15. # the documentation and/or other materials provided with the
  16. # distribution.
  17. # 3. Neither the name NuttX nor the names of its contributors may be
  18. # used to endorse or promote products derived from this software
  19. # without specific prior written permission.
  20. #
  21. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  31. # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  32. # POSSIBILITY OF SUCH DAMAGE.
  33. #
  34. ############################################################################
  35. # NUTTXLIBS is the list of NuttX libraries that is passed to the
  36. # processor-specific Makefile to build the final NuttX target.
  37. # Libraries in FSDIRS are excluded if file descriptor support
  38. # is disabled.
  39. # USERLIBS is the list of libraries used to build the final user-space
  40. # application
  41. # EXPORTLIBS is the list of libraries that should be exported by
  42. # 'make export' is
  43. NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT)
  44. USERLIBS =
  45. # Driver support. Generally depends on file descriptor support but there
  46. # are some components in the drivers directory that are needed even if file
  47. # descriptors are not supported.
  48. NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT)
  49. # Add libraries for board support
  50. NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT)
  51. # Add libraries for syscall support. The C library will be needed by
  52. # both the kernel- and user-space builds. For now, the memory manager (mm)
  53. # is placed in user space (only).
  54. NUTTXLIBS += lib$(DELIM)libstubs$(LIBEXT) lib$(DELIM)libkc$(LIBEXT)
  55. NUTTXLIBS += lib$(DELIM)libkmm$(LIBEXT) lib$(DELIM)libkarch$(LIBEXT)
  56. USERLIBS += lib$(DELIM)libproxies$(LIBEXT) lib$(DELIM)libuc$(LIBEXT)
  57. USERLIBS += lib$(DELIM)libumm$(LIBEXT) lib$(DELIM)libuarch$(LIBEXT)
  58. # Add libraries for C++ support. CXX, CXXFLAGS, and COMPILEXX must
  59. # be defined in Make.defs for this to work!
  60. ifeq ($(CONFIG_HAVE_CXX),y)
  61. USERLIBS += lib$(DELIM)libcxx$(LIBEXT)
  62. endif
  63. # Add library for application support.
  64. ifneq ($(APPDIR),)
  65. USERLIBS += lib$(DELIM)libapps$(LIBEXT)
  66. endif
  67. # Add libraries for network support
  68. ifeq ($(CONFIG_NET),y)
  69. NUTTXLIBS += lib$(DELIM)libnet$(LIBEXT)
  70. endif
  71. # Add libraries for Crypto API support
  72. ifeq ($(CONFIG_CRYPTO),y)
  73. NUTTXLIBS += lib$(DELIM)libcrypto$(LIBEXT)
  74. endif
  75. # Add libraries for file system support
  76. ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
  77. ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
  78. NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT)
  79. endif
  80. else
  81. NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT)
  82. endif
  83. # Add libraries for the NX graphics sub-system
  84. ifeq ($(CONFIG_NX),y)
  85. NUTTXLIBS += lib$(DELIM)libgraphics$(LIBEXT)
  86. ifeq ($(CONFIG_BUILD_PROTECTED),y)
  87. NUTTXLIBS += lib$(DELIM)libknx$(LIBEXT)
  88. USERLIBS += lib$(DELIM)libunx$(LIBEXT)
  89. else
  90. NUTTXLIBS += lib$(DELIM)libnx$(LIBEXT)
  91. endif
  92. endif
  93. # Add libraries for the Audio sub-system
  94. ifeq ($(CONFIG_AUDIO),y)
  95. NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT)
  96. endif
  97. # Add libraries for the Wireless sub-system
  98. ifeq ($(CONFIG_WIRELESS),y)
  99. NUTTXLIBS += lib$(DELIM)libwireless$(LIBEXT)
  100. endif
  101. # Add C++ library
  102. ifeq ($(CONFIG_HAVE_CXX),y)
  103. NUTTXLIBS += lib$(DELIM)libcxx$(LIBEXT)
  104. endif
  105. # Export only the user libraries
  106. EXPORTLIBS = $(USERLIBS)