Statistics
| Branch: | Tag: | Revision:

mongoose / examples / ESP8266_RTOS / Makefile @ eaef5bd1

History | View | Annotate | Download (2.84 KB)

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

    
18
EXTRA_CCFLAGS += -Wall -Werror -DRTOS_SDK
19

    
20
ifndef PDIR # {
21
GEN_IMAGES= eagle.app.v6.out
22
GEN_BINS= eagle.app.v6.bin
23
SPECIAL_MKTARGETS=$(APP_MKTARGETS)
24
SUBDIRS=user
25

    
26
endif # } PDIR
27

    
28
LDDIR = $(SDK_PATH)/ld
29

    
30
CCFLAGS += -Os -Wno-undef
31

    
32
TARGET_LDFLAGS =		\
33
	-nostdlib		\
34
	-Wl,-EL \
35
	--longcalls \
36
	--text-section-literals
37

    
38
ifeq ($(FLAVOR),debug)
39
    TARGET_LDFLAGS += -g -O2
40
endif
41

    
42
ifeq ($(FLAVOR),release)
43
    TARGET_LDFLAGS += -g -O0
44
endif
45

    
46
COMPONENTS_eagle.app.v6 = \
47
	user/libuser.a
48

    
49
LINKFLAGS_eagle.app.v6 = \
50
	-L$(SDK_PATH)/lib        \
51
	-Wl,--gc-sections   \
52
	-nostdlib	\
53
    -T$(LD_FILE)   \
54
	-Wl,--no-check-sections	\
55
    -u call_user_start	\
56
	-Wl,-static						\
57
	-Wl,--start-group					\
58
	-lcirom \
59
	-lgcc					\
60
	-lhal					\
61
	-lphy	\
62
	-lpp	\
63
	-lnet80211	\
64
	-lwpa	\
65
	-lcrypto    \
66
	-lmain	\
67
	-lfreertos	\
68
	-llwip	\
69
	$(DEP_LIBS_eagle.app.v6)					\
70
	-Wl,--end-group
71

    
72
DEPENDS_eagle.app.v6 = \
73
                $(LD_FILE) \
74
                $(LDDIR)/eagle.rom.addr.v6.ld
75

    
76
#############################################################
77
# Configuration i.e. compile options etc.
78
# Target specific stuff (defines etc.) goes in here!
79
# Generally values applying to a tree are captured in the
80
#   makefile at its root level - these are then overridden
81
#   for a subtree within the makefile rooted therein
82
#
83

    
84
#UNIVERSAL_TARGET_DEFINES =		\
85

    
86
# Other potential configuration flags include:
87
#	-DTXRX_TXBUF_DEBUG
88
#	-DTXRX_RXBUF_DEBUG
89
#	-DWLAN_CONFIG_CCX
90
CONFIGURATION_DEFINES =	-DICACHE_FLASH
91

    
92
DEFINES +=				\
93
	$(UNIVERSAL_TARGET_DEFINES)	\
94
	$(CONFIGURATION_DEFINES)
95

    
96
DDEFINES +=				\
97
	$(UNIVERSAL_TARGET_DEFINES)	\
98
	$(CONFIGURATION_DEFINES)
99

    
100

    
101
#############################################################
102
# Recursion Magic - Don't touch this!!
103
#
104
# Each subtree potentially has an include directory
105
#   corresponding to the common APIs applicable to modules
106
#   rooted at that subtree. Accordingly, the INCLUDE PATH
107
#   of a module can only contain the include directories up
108
#   its parent path, and not its siblings
109
#
110
# Required for each makefile to inherit from the parent
111
#
112

    
113
INCLUDES := $(INCLUDES) -I $(PDIR)include
114
sinclude $(SDK_PATH)/Makefile
115

    
116
.PHONY: FORCE
117
FORCE:
118