Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #############################################################
  2. # Required variables for each makefile
  3. # Discard this section from all parent makefiles
  4. # Expected variables (with automatic defaults):
  5. # CSRCS (all "C" files in the dir)
  6. # SUBDIRS (all subdirs with a Makefile)
  7. # GEN_LIBS - list of libs to be generated ()
  8. # GEN_IMAGES - list of images to be generated ()
  9. # COMPONENTS_xxx - a list of libs/objs in the form
  10. # subdir/lib to be extracted and rolled up into
  11. # a generated lib/image xxx.a ()
  12. #
  13. ifndef PDIR
  14. GEN_LIBS = libfatfs.a
  15. endif
  16. ifndef FATFS_INC_DIR
  17. FATFS_INC_DIR = ./
  18. endif
  19. STD_CFLAGS=-std=gnu11 -Wimplicit -imacros $(FATFS_INC_DIR)fatfs_prefix_lib.h
  20. #############################################################
  21. # Configuration i.e. compile options etc.
  22. # Target specific stuff (defines etc.) goes in here!
  23. # Generally values applying to a tree are captured in the
  24. # makefile at its root level - these are then overridden
  25. # for a subtree within the makefile rooted therein
  26. #
  27. #DEFINES +=
  28. #############################################################
  29. # Recursion Magic - Don't touch this!!
  30. #
  31. # Each subtree potentially has an include directory
  32. # corresponding to the common APIs applicable to modules
  33. # rooted at that subtree. Accordingly, the INCLUDE PATH
  34. # of a module can only contain the include directories up
  35. # its parent path, and not its siblings
  36. #
  37. # Required for each makefile to inherit from the parent
  38. #
  39. INCLUDES := $(INCLUDES) -I $(PDIR)include
  40. INCLUDES += -I ./
  41. INCLUDES += -I ../platform
  42. INCLUDES += -I ../libc
  43. INCLUDES += -I ../lua
  44. PDIR := ../$(PDIR)
  45. sinclude $(PDIR)Makefile