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