KernelLibs.mk 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ############################################################################
  2. # tools/KernelLibs.mk
  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. # NUTTXLIBS is the list of NuttX libraries that is passed to the
  21. # processor-specific Makefile to build the final NuttX target.
  22. # USERLIBS is the list of libraries used to build the final user-space
  23. # application
  24. # EXPORTLIBS is the list of libraries that should be exported by
  25. # 'make export' is
  26. NUTTXLIBS = staging$(DELIM)libsched$(LIBEXT)
  27. USERLIBS =
  28. # Driver support.
  29. NUTTXLIBS += staging$(DELIM)libdrivers$(LIBEXT)
  30. # External code support
  31. ifeq ($(EXTERNALDIR),external)
  32. NUTTXLIBS += staging$(DELIM)libexternal$(LIBEXT)
  33. endif
  34. # Add libraries for board support
  35. NUTTXLIBS += staging$(DELIM)libboards$(LIBEXT)
  36. # Add libraries for syscall support. The C library will be needed by
  37. # both the kernel- and user-space builds.
  38. NUTTXLIBS += staging$(DELIM)libstubs$(LIBEXT) staging$(DELIM)libkc$(LIBEXT)
  39. NUTTXLIBS += staging$(DELIM)libkmm$(LIBEXT) staging$(DELIM)libkarch$(LIBEXT)
  40. USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libc$(LIBEXT)
  41. USERLIBS += staging$(DELIM)libmm$(LIBEXT) staging$(DELIM)libarch$(LIBEXT)
  42. # Add library for system call instrumentation if needed
  43. ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
  44. NUTTXLIBS += staging$(DELIM)libwraps$(LIBEXT)
  45. endif
  46. # Add libraries for C++ support. CXX, CXXFLAGS, and COMPILEXX must
  47. # be defined in Make.defs for this to work!
  48. ifeq ($(CONFIG_HAVE_CXX),y)
  49. USERLIBS += staging$(DELIM)libxx$(LIBEXT)
  50. endif
  51. # Add libraries for network support
  52. ifeq ($(CONFIG_NET),y)
  53. NUTTXLIBS += staging$(DELIM)libnet$(LIBEXT)
  54. endif
  55. # Add libraries for Crypto API support
  56. ifeq ($(CONFIG_CRYPTO),y)
  57. NUTTXLIBS += staging$(DELIM)libcrypto$(LIBEXT)
  58. endif
  59. # Add libraries for file system support
  60. NUTTXLIBS += staging$(DELIM)libfs$(LIBEXT) staging$(DELIM)libbinfmt$(LIBEXT)
  61. # Add libraries for the NX graphics sub-system
  62. ifeq ($(CONFIG_NX),y)
  63. NUTTXLIBS += staging$(DELIM)libgraphics$(LIBEXT)
  64. NUTTXLIBS += staging$(DELIM)libknx$(LIBEXT)
  65. USERLIBS += staging$(DELIM)libnx$(LIBEXT)
  66. else ifeq ($(CONFIG_NXFONTS),y)
  67. NUTTXLIBS += staging$(DELIM)libknx$(LIBEXT)
  68. USERLIBS += staging$(DELIM)libnx$(LIBEXT)
  69. endif
  70. # Add libraries for the Audio sub-system
  71. ifeq ($(CONFIG_AUDIO),y)
  72. NUTTXLIBS += staging$(DELIM)libaudio$(LIBEXT)
  73. endif
  74. # Add libraries for the Video sub-system
  75. ifeq ($(CONFIG_VIDEO),y)
  76. NUTTXLIBS += staging$(DELIM)libvideo$(LIBEXT)
  77. endif
  78. # Add libraries for the Wireless sub-system
  79. ifeq ($(CONFIG_WIRELESS),y)
  80. NUTTXLIBS += staging$(DELIM)libwireless$(LIBEXT)
  81. endif
  82. # Add DSP library
  83. ifeq ($(CONFIG_LIBDSP),y)
  84. NUTTXLIBS += staging$(DELIM)libdsp$(LIBEXT)
  85. endif
  86. ifeq ($(CONFIG_OPENAMP),y)
  87. NUTTXLIBS += staging$(DELIM)libopenamp$(LIBEXT)
  88. endif
  89. # Export only the user libraries
  90. EXPORTLIBS = $(USERLIBS)