Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. -lmain \
  60. -ljson \
  61. -lupgrade\
  62. -lssl \
  63. -lpwm \
  64. -lsmartconfig \
  65. $(DEP_LIBS_eagle.app.v6) \
  66. -Wl,--end-group
  67. DEPENDS_eagle.app.v6 = \
  68. $(LD_FILE) \
  69. $(LDDIR)/eagle.rom.addr.v6.ld
  70. #############################################################
  71. # Configuration i.e. compile options etc.
  72. # Target specific stuff (defines etc.) goes in here!
  73. # Generally values applying to a tree are captured in the
  74. # makefile at its root level - these are then overridden
  75. # for a subtree within the makefile rooted therein
  76. #
  77. #UNIVERSAL_TARGET_DEFINES = \
  78. # Other potential configuration flags include:
  79. # -DTXRX_TXBUF_DEBUG
  80. # -DTXRX_RXBUF_DEBUG
  81. # -DWLAN_CONFIG_CCX
  82. CONFIGURATION_DEFINES = -DICACHE_FLASH
  83. DEFINES += \
  84. $(UNIVERSAL_TARGET_DEFINES) \
  85. $(CONFIGURATION_DEFINES)
  86. DDEFINES += \
  87. $(UNIVERSAL_TARGET_DEFINES) \
  88. $(CONFIGURATION_DEFINES)
  89. #############################################################
  90. # Recursion Magic - Don't touch this!!
  91. #
  92. # Each subtree potentially has an include directory
  93. # corresponding to the common APIs applicable to modules
  94. # rooted at that subtree. Accordingly, the INCLUDE PATH
  95. # of a module can only contain the include directories up
  96. # its parent path, and not its siblings
  97. #
  98. # Required for each makefile to inherit from the parent
  99. #
  100. INCLUDES := $(INCLUDES) -I $(PDIR)include
  101. PDIR := ../$(PDIR)
  102. sinclude $(PDIR)Makefile
  103. .PHONY: FORCE
  104. FORCE: