Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 object file images to be generated ()
  9. # GEN_BINS - list of binaries to be generated ()
  10. # COMPONENTS_xxx - a list of libs/objs in the form
  11. # subdir/lib to be extracted and rolled up into
  12. # a generated lib/image xxx.a ()
  13. #
  14. TARGET = eagle
  15. #FLAVOR = release
  16. FLAVOR = debug
  17. #EXTRA_CCFLAGS += -u
  18. ifndef PDIR # {
  19. GEN_IMAGES= eagle.app.v6.out
  20. GEN_BINS= eagle.app.v6.bin
  21. SPECIAL_MKTARGETS=$(APP_MKTARGETS)
  22. SUBDIRS= \
  23. user \
  24. driver
  25. endif # } PDIR
  26. APPDIR = .
  27. LDDIR = ../ld
  28. CCFLAGS += -Os
  29. TARGET_LDFLAGS = \
  30. -nostdlib \
  31. -Wl,-EL \
  32. --longcalls \
  33. --text-section-literals
  34. ifeq ($(FLAVOR),debug)
  35. TARGET_LDFLAGS += -g -O2
  36. endif
  37. ifeq ($(FLAVOR),release)
  38. TARGET_LDFLAGS += -g -O0
  39. endif
  40. COMPONENTS_eagle.app.v6 = \
  41. user/libuser.a \
  42. driver/libdriver.a
  43. LINKFLAGS_eagle.app.v6 = \
  44. -L../lib \
  45. -nostdlib \
  46. -T$(LD_FILE) \
  47. -Wl,--no-check-sections \
  48. -u call_user_start \
  49. -Wl,-static \
  50. -Wl,--start-group \
  51. -lc \
  52. -lgcc \
  53. -lhal \
  54. -lphy \
  55. -lpp \
  56. -lnet80211 \
  57. -llwip \
  58. -lwpa \
  59. -lcrypto \
  60. -lmain \
  61. -lespnow \
  62. -ljson \
  63. -lupgrade\
  64. -lssl \
  65. -lsmartconfig \
  66. $(DEP_LIBS_eagle.app.v6) \
  67. -Wl,--end-group
  68. # -lpwm \
  69. DEPENDS_eagle.app.v6 = \
  70. $(LD_FILE) \
  71. $(LDDIR)/eagle.rom.addr.v6.ld
  72. #############################################################
  73. # Configuration i.e. compile options etc.
  74. # Target specific stuff (defines etc.) goes in here!
  75. # Generally values applying to a tree are captured in the
  76. # makefile at its root level - these are then overridden
  77. # for a subtree within the makefile rooted therein
  78. #
  79. #UNIVERSAL_TARGET_DEFINES = \
  80. # Other potential configuration flags include:
  81. # -DTXRX_TXBUF_DEBUG
  82. # -DTXRX_RXBUF_DEBUG
  83. # -DWLAN_CONFIG_CCX
  84. CONFIGURATION_DEFINES = -DICACHE_FLASH
  85. DEFINES += \
  86. $(UNIVERSAL_TARGET_DEFINES) \
  87. $(CONFIGURATION_DEFINES)
  88. DDEFINES += \
  89. $(UNIVERSAL_TARGET_DEFINES) \
  90. $(CONFIGURATION_DEFINES)
  91. #############################################################
  92. # Recursion Magic - Don't touch this!!
  93. #
  94. # Each subtree potentially has an include directory
  95. # corresponding to the common APIs applicable to modules
  96. # rooted at that subtree. Accordingly, the INCLUDE PATH
  97. # of a module can only contain the include directories up
  98. # its parent path, and not its siblings
  99. #
  100. # Required for each makefile to inherit from the parent
  101. #
  102. INCLUDES := $(INCLUDES) -I $(PDIR)include
  103. PDIR := ../$(PDIR)
  104. sinclude $(PDIR)Makefile
  105. .PHONY: FORCE
  106. FORCE: