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+= + 1
47 SHARED_DATA=yes
48 TINY_CBOR=yes
49 SW_AES=yes
50 endif
51 
52 ifeq ($(PROVISIONING_PROXY), yes)
53 SHARED_DATA=yes
54 TINY_CBOR=yes
55 SW_AES=yes
56 endif
57 
58 ifeq ($(CONTROL_NODE), yes)
59 scheduler_tasks+= + 3
60 SHARED_DATA=yes
61 endif
62 
63 ifeq ($(POSITIONING), yes)
64 scheduler_tasks+= + 7
65 SHARED_DATA=yes
66 app_config_filters+= + 2
67 shared_neighbors_cbs+= + 2
68 # 2 state event cb
69 # - one in measurement for end of scan
70 # - one if route cb is implemented in poslib_contol
71 stack_state_cbs+= + 2
72 SHARED_BEACON=yes
73 shared_offline_modules+= + 2
74 endif
75 
76 ifeq ($(SHARED_OFFLINE), yes)
77 scheduler_tasks+= + 2
78 endif
79 
80 ifeq ($(DUALMCU_LIB), yes)
81 HAL_GPIO=yes
82 scheduler_tasks+= + 4
83 app_config_filters+= + 1
84 SHARED_DATA=yes
85 stack_state_cbs+= + 1
86 endif
87 
88 # RTC library
89 ifeq ($(RTC), yes)
90 scheduler_tasks+= + 1
91 SHARED_DATA=yes
92 APP_SCHEDULER=yes
93 endif
94 
95 #########
96 # Enabling libraries needed by other libs and check app input
97 #########
98 
99 # Shared app_config
100 ifeq ($(SHARED_APP_CONFIG), yes)
101 # Enabled by app
102 ifndef SHARED_APP_CONFIG_FILTERS
103 $(error "Please define SHARED_APP_CONFIG_FILTERS from your application makefile. Previously\
104  directly added as a CFLAG: -DSHARED_APP_CONFIG_MAX_FILTER=n")
105 endif
106 # Add to app libs own filters
107 app_config_filters+= + $(SHARED_APP_CONFIG_FILTERS)
108 else
109 ifneq ($(app_config_filters), 0)
110 $(info Enabling SHARED_APP_CONFIG as libraries need it)
111 SHARED_APP_CONFIG=yes
112 endif
113 endif
114 
115 # Shared neighbors
116 ifeq ($(SHARED_NEIGHBORS), yes)
117 ifndef SHARED_NEIGHBORS_CBS
118 $(error "Please define SHARED_NEIGHBORS_CBS from your application makefile. Previously\
119  directly added as a CFLAG: -DSHARED_NEIGHBORS_MAX_CB=n")
120 endif
121 shared_neighbors_cbs+= + $(SHARED_NEIGHBORS_CBS)
122 else
123 ifneq ($(shared_neighbors_cbs), 0)
124 $(info Enabling SHARED_NEIGHBORS as libraries need it)
125 SHARED_NEIGHBORS=yes
126 endif
127 endif
128 
129 # Stack state
130 ifeq ($(STACK_STATE_LIB), yes)
131 ifdef STACK_STATE_CBS
132 stack_state_cbs+= + $(STACK_STATE_CBS)
133 endif
134 # It is not an issue if STACK_STATE_CBS is not defined
135 # as lib can be used without callbacks
136 else
137 ifneq ($(stack_state_cbs), 0)
138 $(info Enabling STACK_STATE_LIB as libraries need it)
139 STACK_STATE_LIB=yes
140 endif
141 endif
142 
143 # Shared offline library
144 ifeq ($(SHARED_OFFLINE), yes)
145 ifndef SHARED_OFFLINE_MODULES
146 $(error "Please define SHARED_OFFLINE_MODULES from your application makefile. Previously\
147  directly added as a CFLAG: -DSHARED_OFFLINE_MAX_MODULES=n")
148 endif
149 shared_offline_modules+= + $(SHARED_OFFLINE_MODULES)
150 else
151 ifneq ($(shared_offline_modules), 0)
152 $(info Enabling SHARED_OFFLINE as libraries need it)
153 SHARED_OFFLINE=yes
154 endif
155 endif
156 
157 # App scheduler
158 ifeq ($(APP_SCHEDULER), yes)
159 ifndef APP_SCHEDULER_TASKS
160 $(error "Please define APP_SCHEDULER_TASKS from your application makefile. Previously\
161  directly added as a CFLAG: -DAPP_SCHEDULER_MAX_TASKS=n")
162 endif
163 scheduler_tasks+= + $(APP_SCHEDULER_TASKS)
164 else
165 ifneq ($(scheduler_tasks), 0)
166 $(info Enabling APP_SCHEDULER as libraries need it but app not)
167 APP_SCHEDULER=yes
168 endif
169 endif