Wirepas SDK
config.mk
Go to the documentation of this file.
1 ifeq ($(SHARED_LIBDATA), yes)
2 $(error Shared_LibData library as been renamed, please see libraries/shared_libdata.h for an explanation.)
3 endif
4 
5 ifeq ($(SHARED_SHUTDOWN), yes)
6 $(error Shared_Shutdown library as been renamed, please use libraries/stack_state.h instead \
7  and enable its usage with STACK_STATE_LIB)
8 endif
9 
10 # Any library needing app_scheduler must increment this variable
11 # this way:
12 # scheduler_tasks+= + n
13 scheduler_tasks=0
14 
15 # Any library needing stack state callbacks must increment this variable
16 # this way:
17 # stack_state_cbs+= + n
18 stack_state_cbs=0
19 
20 # Any library needing app_config filter must increment this variable
21 # this way:
22 # library_app_config_filters+= + n
23 app_config_filters=0
24 
25 # Any library needing shared offline modules must increment this variable
26 # this way:
27 # shared_offline_modules+= + n
28 shared_offline_modules=0
29 
30 # Any library needing shared neighbors callbacks must increment this variable
31 # this way:
32 # shared_neighbors_cbs+= + n
33 shared_neighbors_cbs=0
34 
35 ifeq ($(LOCAL_PROVISIONING), yes)
36 $(info LOCAL_PROVISIONING automatically enable PROVISIONING and PROVISIONING_PROXY)
37 PROVISIONING=yes
38 PROVISIONING_PROXY=yes
39 scheduler_tasks+= + 1
40 app_config_filters+= + 1
41 stack_state_cbs+= + 1
42 endif
43 
44 ifeq ($(PROVISIONING), yes)
45 scheduler_tasks+= + 3
46 stack_state_cbs+= + 2
47 SHARED_DATA=yes
48 TINY_CBOR=yes
49 SW_AES=yes
50 APP_SECURE_STORAGE=yes
51 endif
52 
53 ifeq ($(PROVISIONING_PROXY), yes)
54 SHARED_DATA=yes
55 TINY_CBOR=yes
56 SW_AES=yes
57 endif
58 
59 ifeq ($(APP_SETUP), yes)
60 $(info APP_SETUP automatically enables APP_PERSISTENT)
61 APP_PERSISTENT=yes
62 endif
63 
64 ifeq ($(CONTROL_NODE), yes)
65 scheduler_tasks+= + 3
66 SHARED_DATA=yes
67 endif
68 
69 ifeq ($(POSITIONING), yes)
70 scheduler_tasks+= + 7
71 SHARED_DATA=yes
72 app_config_filters+= + 2
73 shared_neighbors_cbs+= + 2
74 # 2 state event cb
75 # - one in measurement for end of scan
76 # - one if route cb is implemented in poslib_contol
77 stack_state_cbs+= + 2
78 SHARED_BEACON=yes
79 shared_offline_modules+= + 2
80 endif
81 
82 ifeq ($(SHARED_OFFLINE), yes)
83 scheduler_tasks+= + 2
84 endif
85 
86 ifeq ($(DUALMCU_LIB), yes)
87 HAL_GPIO=yes
88 scheduler_tasks+= + 4
89 app_config_filters+= + 1
90 SHARED_DATA=yes
91 stack_state_cbs+= + 1
92 endif
93 
94 # RTC library
95 ifeq ($(RTC), yes)
96 scheduler_tasks+= + 1
97 SHARED_DATA=yes
98 APP_SCHEDULER=yes
99 endif
100 
101 #########
102 # Enabling libraries needed by other libs and check app input
103 #########
104 
105 # Shared app_config
106 ifeq ($(SHARED_APP_CONFIG), yes)
107 # Enabled by app
108 ifndef SHARED_APP_CONFIG_FILTERS
109 $(error "Please define SHARED_APP_CONFIG_FILTERS from your application makefile. Previously\
110  directly added as a CFLAG: -DSHARED_APP_CONFIG_MAX_FILTER=n")
111 endif
112 # Add to app libs own filters
113 app_config_filters+= + $(SHARED_APP_CONFIG_FILTERS)
114 else
115 ifneq ($(app_config_filters), 0)
116 $(info Enabling SHARED_APP_CONFIG as libraries need it)
117 SHARED_APP_CONFIG=yes
118 endif
119 endif
120 
121 # Shared neighbors
122 ifeq ($(SHARED_NEIGHBORS), yes)
123 ifndef SHARED_NEIGHBORS_CBS
124 $(error "Please define SHARED_NEIGHBORS_CBS from your application makefile. Previously\
125  directly added as a CFLAG: -DSHARED_NEIGHBORS_MAX_CB=n")
126 endif
127 shared_neighbors_cbs+= + $(SHARED_NEIGHBORS_CBS)
128 else
129 ifneq ($(shared_neighbors_cbs), 0)
130 $(info Enabling SHARED_NEIGHBORS as libraries need it)
131 SHARED_NEIGHBORS=yes
132 endif
133 endif
134 
135 # Stack state
136 ifeq ($(STACK_STATE_LIB), yes)
137 ifdef STACK_STATE_CBS
138 stack_state_cbs+= + $(STACK_STATE_CBS)
139 endif
140 # It is not an issue if STACK_STATE_CBS is not defined
141 # as lib can be used without callbacks
142 else
143 ifneq ($(stack_state_cbs), 0)
144 $(info Enabling STACK_STATE_LIB as libraries need it)
145 STACK_STATE_LIB=yes
146 endif
147 endif
148 
149 # Shared offline library
150 ifeq ($(SHARED_OFFLINE), yes)
151 ifndef SHARED_OFFLINE_MODULES
152 $(error "Please define SHARED_OFFLINE_MODULES from your application makefile. Previously\
153  directly added as a CFLAG: -DSHARED_OFFLINE_MAX_MODULES=n")
154 endif
155 shared_offline_modules+= + $(SHARED_OFFLINE_MODULES)
156 else
157 ifneq ($(shared_offline_modules), 0)
158 $(info Enabling SHARED_OFFLINE as libraries need it)
159 SHARED_OFFLINE=yes
160 endif
161 endif
162 
163 # App scheduler
164 ifeq ($(APP_SCHEDULER), yes)
165 ifndef APP_SCHEDULER_TASKS
166 $(error "Please define APP_SCHEDULER_TASKS from your application makefile. Previously\
167  directly added as a CFLAG: -DAPP_SCHEDULER_MAX_TASKS=n")
168 endif
169 scheduler_tasks+= + $(APP_SCHEDULER_TASKS)
170 else
171 ifneq ($(scheduler_tasks), 0)
172 $(info Enabling APP_SCHEDULER as libraries need it but app not)
173 APP_SCHEDULER=yes
174 endif
175 endif