Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ############################################################################
  2. # fs/Makefile
  3. #
  4. # Copyright (C) 2007, 2008, 2011-2014, 2016-2018 Gregory Nutt. All rights
  5. # reserved.
  6. # Author: Gregory Nutt <gnutt@nuttx.org>
  7. #
  8. # Redistribution and use in source and binary forms, with or without
  9. # modification, are permitted provided that the following conditions
  10. # are met:
  11. #
  12. # 1. Redistributions of source code must retain the above copyright
  13. # notice, this list of conditions and the following disclaimer.
  14. # 2. Redistributions in binary form must reproduce the above copyright
  15. # notice, this list of conditions and the following disclaimer in
  16. # the documentation and/or other materials provided with the
  17. # distribution.
  18. # 3. Neither the name NuttX nor the names of its contributors may be
  19. # used to endorse or promote products derived from this software
  20. # without specific prior written permission.
  21. #
  22. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  25. # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  26. # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  27. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  28. # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  29. # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  30. # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  31. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  32. # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  33. # POSSIBILITY OF SUCH DAMAGE.
  34. #
  35. ############################################################################
  36. -include $(TOPDIR)/Make.defs
  37. ASRCS =
  38. AOBJS = $(ASRCS:.S=$(OBJEXT))
  39. CSRCS = fs_initialize.c
  40. DEPPATH = --dep-path .
  41. VPATH = .
  42. include inode/Make.defs
  43. include vfs/Make.defs
  44. include driver/Make.defs
  45. include dirent/Make.defs
  46. include aio/Make.defs
  47. include mmap/Make.defs
  48. # OS resources
  49. include semaphore/Make.defs
  50. include mqueue/Make.defs
  51. include shm/Make.defs
  52. # Additional files required is mount-able file systems are supported
  53. ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
  54. include mount/Make.defs
  55. include partition/Make.defs
  56. include fat/Make.defs
  57. include romfs/Make.defs
  58. include cromfs/Make.defs
  59. include tmpfs/Make.defs
  60. include nxffs/Make.defs
  61. include nfs/Make.defs
  62. include smartfs/Make.defs
  63. include binfs/Make.defs
  64. include procfs/Make.defs
  65. include spiffs/Make.defs
  66. include unionfs/Make.defs
  67. include userfs/Make.defs
  68. include hostfs/Make.defs
  69. include littlefs/Make.defs
  70. endif
  71. COBJS = $(CSRCS:.c=$(OBJEXT))
  72. SRCS = $(ASRCS) $(CSRCS)
  73. OBJS = $(AOBJS) $(COBJS)
  74. BIN = libfs$(LIBEXT)
  75. all: $(BIN)
  76. .PHONY: depend clean distclean
  77. $(AOBJS): %$(OBJEXT): %.S
  78. $(call ASSEMBLE, $<, $@)
  79. $(COBJS): %$(OBJEXT): %.c
  80. $(call COMPILE, $<, $@)
  81. $(BIN): $(OBJS)
  82. $(call ARCHIVE, $@, $(OBJS))
  83. .depend: Makefile $(SRCS)
  84. $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
  85. $(Q) touch $@
  86. depend: .depend
  87. clean:
  88. $(call DELFILE, $(BIN))
  89. $(call CLEAN)
  90. distclean: clean
  91. $(call DELFILE, Make.dep)
  92. $(call DELFILE, .depend)
  93. -include Make.dep