1 | # This file was automagically generated by mbed.org. For more information,
|
---|
2 | # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded
|
---|
3 |
|
---|
4 | ###############################################################################
|
---|
5 | # Boiler-plate
|
---|
6 |
|
---|
7 | # cross-platform directory manipulation
|
---|
8 | ifeq ($(shell echo $$OS),$$OS)
|
---|
9 | MAKEDIR = if not exist "$(1)" mkdir "$(1)"
|
---|
10 | RM = rmdir /S /Q "$(1)"
|
---|
11 | else
|
---|
12 | MAKEDIR = '$(SHELL)' -c "mkdir -p \"$(1)\""
|
---|
13 | RM = '$(SHELL)' -c "rm -rf \"$(1)\""
|
---|
14 | endif
|
---|
15 |
|
---|
16 | OBJDIR := Debug
|
---|
17 | # Move to the build directory
|
---|
18 | ifeq (,$(filter $(OBJDIR),$(notdir $(CURDIR))))
|
---|
19 | .SUFFIXES:
|
---|
20 | mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
---|
21 | MAKETARGET = '$(MAKE)' --no-print-directory -C $(OBJDIR) -f '$(mkfile_path)' \
|
---|
22 | 'SRCDIR=$(CURDIR)' $(MAKECMDGOALS)
|
---|
23 | .PHONY: $(OBJDIR) clean
|
---|
24 | all:
|
---|
25 | +@$(call MAKEDIR,$(OBJDIR))
|
---|
26 | +@$(MAKETARGET)
|
---|
27 | $(OBJDIR): all
|
---|
28 | Makefile : ;
|
---|
29 | % :: $(OBJDIR) ; :
|
---|
30 | clean :
|
---|
31 | $(call RM,$(OBJDIR))
|
---|
32 |
|
---|
33 | else
|
---|
34 |
|
---|
35 | # trick rules into thinking we are in the root, when we are in the bulid dir
|
---|
36 | VPATH = ../../azure_iot_sdk
|
---|
37 |
|
---|
38 | # Boiler-plate
|
---|
39 | ###############################################################################
|
---|
40 | # Project settings
|
---|
41 |
|
---|
42 | PROJECT := azure_iot_sdk
|
---|
43 |
|
---|
44 |
|
---|
45 | # Project settings
|
---|
46 | ###############################################################################
|
---|
47 | # Objects and Paths
|
---|
48 |
|
---|
49 | OBJECTS += c-utility/adapters/agenttime_mbed.o
|
---|
50 | OBJECTS += c-utility/adapters/httpapi_compact.o
|
---|
51 | OBJECTS += c-utility/adapters/lock_toppers.o
|
---|
52 | OBJECTS += c-utility/adapters/platform_toppers.o
|
---|
53 | OBJECTS += c-utility/adapters/socketio_esp_at.o
|
---|
54 | OBJECTS += c-utility/adapters/threadapi_toppers.o
|
---|
55 | OBJECTS += c-utility/adapters/tickcounter_toppers.o
|
---|
56 | OBJECTS += c-utility/adapters/tlsio_esp_at.o
|
---|
57 | OBJECTS += c-utility/adapters/tlsio_wolfssl.o
|
---|
58 | OBJECTS += c-utility/adapters/uniqueid_stub.o
|
---|
59 | OBJECTS += c-utility/src/azure_base32.o
|
---|
60 | OBJECTS += c-utility/src/azure_base64.o
|
---|
61 | OBJECTS += c-utility/src/buffer.o
|
---|
62 | OBJECTS += c-utility/src/connection_string_parser.o
|
---|
63 | OBJECTS += c-utility/src/consolelogger.o
|
---|
64 | OBJECTS += c-utility/src/constbuffer.o
|
---|
65 | OBJECTS += c-utility/src/constmap.o
|
---|
66 | OBJECTS += c-utility/src/crt_abstractions.o
|
---|
67 | #OBJECTS += c-utility/src/dns_resolver_sync.o
|
---|
68 | OBJECTS += c-utility/src/doublylinkedlist.o
|
---|
69 | OBJECTS += c-utility/src/gb_rand.o
|
---|
70 | OBJECTS += c-utility/src/gb_stdio.o
|
---|
71 | OBJECTS += c-utility/src/gb_time.o
|
---|
72 | OBJECTS += c-utility/src/gballoc.o
|
---|
73 | OBJECTS += c-utility/src/hmac.o
|
---|
74 | OBJECTS += c-utility/src/hmacsha256.o
|
---|
75 | OBJECTS += c-utility/src/http_proxy_io.o
|
---|
76 | OBJECTS += c-utility/src/httpapiex.o
|
---|
77 | OBJECTS += c-utility/src/httpapiexsas.o
|
---|
78 | OBJECTS += c-utility/src/httpheaders.o
|
---|
79 | OBJECTS += c-utility/src/map.o
|
---|
80 | OBJECTS += c-utility/src/optionhandler.o
|
---|
81 | OBJECTS += c-utility/src/sastoken.o
|
---|
82 | OBJECTS += c-utility/src/sha1.o
|
---|
83 | OBJECTS += c-utility/src/sha224.o
|
---|
84 | OBJECTS += c-utility/src/sha384-512.o
|
---|
85 | OBJECTS += c-utility/src/singlylinkedlist.o
|
---|
86 | OBJECTS += c-utility/src/string_token.o
|
---|
87 | OBJECTS += c-utility/src/string_tokenizer.o
|
---|
88 | OBJECTS += c-utility/src/strings.o
|
---|
89 | OBJECTS += c-utility/src/urlencode.o
|
---|
90 | OBJECTS += c-utility/src/usha.o
|
---|
91 | OBJECTS += c-utility/src/utf8_checker.o
|
---|
92 | OBJECTS += c-utility/src/uuid.o
|
---|
93 | OBJECTS += c-utility/src/uws_client.o
|
---|
94 | OBJECTS += c-utility/src/uws_frame_encoder.o
|
---|
95 | OBJECTS += c-utility/src/vector.o
|
---|
96 | OBJECTS += c-utility/src/wsio.o
|
---|
97 | OBJECTS += c-utility/src/xio.o
|
---|
98 | OBJECTS += c-utility/src/xlogging.o
|
---|
99 | OBJECTS += certs/certs.o
|
---|
100 | OBJECTS += deps/parson/parson.o
|
---|
101 | OBJECTS += iothub_client/src/blob.o
|
---|
102 | OBJECTS += iothub_client/src/iothub.o
|
---|
103 | OBJECTS += iothub_client/src/iothub_client.o
|
---|
104 | OBJECTS += iothub_client/src/iothub_client_authorization.o
|
---|
105 | OBJECTS += iothub_client/src/iothub_client_core.o
|
---|
106 | OBJECTS += iothub_client/src/iothub_client_core_ll.o
|
---|
107 | OBJECTS += iothub_client/src/iothub_client_diagnostic.o
|
---|
108 | OBJECTS += iothub_client/src/iothub_client_ll.o
|
---|
109 | OBJECTS += iothub_client/src/iothub_client_ll_uploadtoblob.o
|
---|
110 | OBJECTS += iothub_client/src/iothub_client_retry_control.o
|
---|
111 | OBJECTS += iothub_client/src/iothub_device_client_ll.o
|
---|
112 | OBJECTS += iothub_client/src/iothub_message.o
|
---|
113 | OBJECTS += iothub_client/src/iothub_transport_ll_private.o
|
---|
114 | OBJECTS += iothub_client/src/iothubtransport.o
|
---|
115 | OBJECTS += iothub_client/src/iothubtransport_mqtt_common.o
|
---|
116 | OBJECTS += iothub_client/src/iothubtransporthttp.o
|
---|
117 | OBJECTS += iothub_client/src/iothubtransportmqtt.o
|
---|
118 | OBJECTS += iothub_client/src/iothubtransportmqtt_websockets.o
|
---|
119 | OBJECTS += iothub_client/src/version.o
|
---|
120 | OBJECTS += provisioning_client/adapters/hsm_client_data.o
|
---|
121 | OBJECTS += provisioning_client/adapters/hsm_client_key.o
|
---|
122 | OBJECTS += provisioning_client/src/iothub_auth_client.o
|
---|
123 | OBJECTS += provisioning_client/src/iothub_security_factory.o
|
---|
124 | OBJECTS += provisioning_client/src/prov_auth_client.o
|
---|
125 | OBJECTS += provisioning_client/src/prov_device_client.o
|
---|
126 | OBJECTS += provisioning_client/src/prov_device_ll_client.o
|
---|
127 | OBJECTS += provisioning_client/src/prov_security_factory.o
|
---|
128 | OBJECTS += provisioning_client/src/prov_transport_http_client.o
|
---|
129 | OBJECTS += provisioning_client/src/prov_transport_mqtt_client.o
|
---|
130 | OBJECTS += provisioning_client/src/prov_transport_mqtt_common.o
|
---|
131 | OBJECTS += provisioning_client/src/prov_transport_mqtt_ws_client.o
|
---|
132 | OBJECTS += serializer/src/methodreturn.o
|
---|
133 | OBJECTS += serializer/src/multitree.o
|
---|
134 | OBJECTS += serializer/src/schema.o
|
---|
135 | OBJECTS += serializer/src/schemalib.o
|
---|
136 | OBJECTS += serializer/src/schemaserializer.o
|
---|
137 | OBJECTS += serializer/src/datamarshaller.o
|
---|
138 | OBJECTS += serializer/src/datapublisher.o
|
---|
139 | OBJECTS += serializer/src/dataserializer.o
|
---|
140 | OBJECTS += serializer/src/iotdevice.o
|
---|
141 | OBJECTS += serializer/src/jsondecoder.o
|
---|
142 | OBJECTS += serializer/src/jsonencoder.o
|
---|
143 | OBJECTS += serializer/src/agenttypesystem.o
|
---|
144 | OBJECTS += serializer/src/codefirst.o
|
---|
145 | OBJECTS += serializer/src/commanddecoder.o
|
---|
146 | OBJECTS += uhttp/src/uhttp.o
|
---|
147 | OBJECTS += umqtt/src/mqtt_client.o
|
---|
148 | OBJECTS += umqtt/src/mqtt_codec.o
|
---|
149 | OBJECTS += umqtt/src/mqtt_message.o
|
---|
150 |
|
---|
151 | INCLUDE_PATHS += -I../../asp_baseplatform
|
---|
152 | INCLUDE_PATHS += -I../../asp_baseplatform/include
|
---|
153 | INCLUDE_PATHS += -I../../asp_baseplatform/arch
|
---|
154 | INCLUDE_PATHS += -I../../asp_baseplatform/arch/riscv_gcc
|
---|
155 | INCLUDE_PATHS += -I../../asp_baseplatform/target/k210_gcc
|
---|
156 | INCLUDE_PATHS += -I../../asp_baseplatform/OBJ/K210_GCC/DEMO
|
---|
157 | INCLUDE_PATHS += -I../../asp_baseplatform/monitor
|
---|
158 | INCLUDE_PATHS += -I../../asp_baseplatform/files
|
---|
159 | INCLUDE_PATHS += -I../../azure_iot_sdk/c-utility/inc
|
---|
160 | INCLUDE_PATHS += -I../../azure_iot_sdk/c-utility/pal/toppers
|
---|
161 | INCLUDE_PATHS += -I../../azure_iot_sdk/iothub_client/inc
|
---|
162 | INCLUDE_PATHS += -I../../azure_iot_sdk/iothub_client/inc/internal
|
---|
163 | INCLUDE_PATHS += -I../../azure_iot_sdk/provisioning_client/adapters
|
---|
164 | INCLUDE_PATHS += -I../../azure_iot_sdk/provisioning_client/inc
|
---|
165 | INCLUDE_PATHS += -I../../azure_iot_sdk/provisioning_client/inc/azure_prov_client/internal
|
---|
166 | INCLUDE_PATHS += -I../../azure_iot_sdk/deps/parson
|
---|
167 | INCLUDE_PATHS += -I../../azure_iot_sdk/deps/azure-macro-utils-c/inc
|
---|
168 | INCLUDE_PATHS += -I../../azure_iot_sdk/deps/umock-c/inc
|
---|
169 | INCLUDE_PATHS += -I../../azure_iot_sdk/serializer/inc
|
---|
170 | INCLUDE_PATHS += -I../../azure_iot_sdk/uhttp/inc
|
---|
171 | INCLUDE_PATHS += -I../../azure_iot_sdk/umqtt/inc
|
---|
172 | INCLUDE_PATHS += -I../../wolfssl-4.4.0/wolfssl
|
---|
173 | INCLUDE_PATHS += -I../../wolfssl-4.4.0/wolfssl/wolfcrypt
|
---|
174 | INCLUDE_PATHS += -I../../wolfssl-4.4.0
|
---|
175 | INCLUDE_PATHS += -I../../zlib-1.2.11/src
|
---|
176 |
|
---|
177 | # Objects and Paths
|
---|
178 | ###############################################################################
|
---|
179 | # Tools and Flags
|
---|
180 |
|
---|
181 | AS = riscv-none-embed-gcc
|
---|
182 | CC = riscv-none-embed-gcc
|
---|
183 | CPP = riscv-none-embed-g++
|
---|
184 | AR = riscv-none-embed-ar
|
---|
185 | RANLIB = riscv-none-embed-ranlib
|
---|
186 |
|
---|
187 |
|
---|
188 | C_FLAGS += -std=gnu11
|
---|
189 | C_FLAGS += -march=rv64imafdc
|
---|
190 | C_FLAGS += -mabi=lp64d
|
---|
191 | C_FLAGS += -mcmodel=medany
|
---|
192 | C_FLAGS += -O2
|
---|
193 | C_FLAGS += -fmessage-length=0
|
---|
194 | C_FLAGS += -fsigned-char
|
---|
195 | C_FLAGS += -ffunction-sections
|
---|
196 | C_FLAGS += -fdata-sections
|
---|
197 | C_FLAGS += -Wall
|
---|
198 | C_FLAGS += -Wextra
|
---|
199 | C_FLAGS += -Wno-unused-parameter
|
---|
200 | C_FLAGS += -Wno-missing-field-initializers
|
---|
201 | C_FLAGS += -Wnull-dereference
|
---|
202 |
|
---|
203 | C_FLAGS += -Wno-unused-variable
|
---|
204 | C_FLAGS += -Wno-unused-function
|
---|
205 |
|
---|
206 | C_FLAGS += -g3
|
---|
207 | C_FLAGS += -Wstack-usage=256
|
---|
208 |
|
---|
209 | C_FLAGS += -DWOLFSSL_USER_SETTINGS
|
---|
210 | C_FLAGS += -DCYASSL_USER_SETTINGS
|
---|
211 | C_FLAGS += -DUSE_WOLFSSL=1
|
---|
212 | C_FLAGS += -DHSM_TYPE_SYMM_KEY
|
---|
213 | C_FLAGS += -DUSE_PROV_MODULE
|
---|
214 | C_FLAGS += -Dget_time=azure_get_time
|
---|
215 |
|
---|
216 | CXX_FLAGS += -std=gnu++11
|
---|
217 | CXX_FLAGS += -march=rv64imafdc
|
---|
218 | CXX_FLAGS += -mabi=lp64d
|
---|
219 | CXX_FLAGS += -mcmodel=medany
|
---|
220 | CXX_FLAGS += -O2
|
---|
221 | CXX_FLAGS += -fmessage-length=0
|
---|
222 | CXX_FLAGS += -fsigned-char
|
---|
223 | CXX_FLAGS += -ffunction-sections
|
---|
224 | CXX_FLAGS += -fdata-sections
|
---|
225 | CXX_FLAGS += -Wall
|
---|
226 | CXX_FLAGS += -Wextra
|
---|
227 | CXX_FLAGS += -Wno-unused-parameter
|
---|
228 | CXX_FLAGS += -Wno-missing-field-initializers
|
---|
229 | CXX_FLAGS += -Wnull-dereference
|
---|
230 |
|
---|
231 | CXX_FLAGS += -g3
|
---|
232 | CXX_FLAGS += -Wstack-usage=256
|
---|
233 |
|
---|
234 | CXX_FLAGS += -DWOLFSSL_USER_SETTINGS
|
---|
235 | CXX_FLAGS += -DCYASSL_USER_SETTINGS
|
---|
236 | CXX_FLAGS += -DUSE_WOLFSSL=1
|
---|
237 | CXX_FLAGS += -DHSM_TYPE_SYMM_KEY
|
---|
238 | CXX_FLAGS += -DUSE_PROV_MODULE
|
---|
239 | CXX_FLAGS += -Dget_time=azure_get_time
|
---|
240 |
|
---|
241 | ASM_FLAGS += -x
|
---|
242 | ASM_FLAGS += assembler-with-cpp
|
---|
243 | ASM_FLAGS += -march=rv64imafdc
|
---|
244 | ASM_FLAGS += -mabi=lp64d
|
---|
245 | ASM_FLAGS += -mcmodel=medany
|
---|
246 | ASM_FLAGS += -O2
|
---|
247 | ASM_FLAGS += -fmessage-length=0
|
---|
248 | ASM_FLAGS += -fsigned-char
|
---|
249 | ASM_FLAGS += -ffunction-sections
|
---|
250 | ASM_FLAGS += -fdata-sections
|
---|
251 | ASM_FLAGS += -Wall
|
---|
252 | ASM_FLAGS += -Wextra
|
---|
253 | ASM_FLAGS += -Wno-unused-parameter
|
---|
254 | ASM_FLAGS += -Wno-missing-field-initializers
|
---|
255 | ASM_FLAGS += -Wnull-dereference
|
---|
256 | ASM_FLAGS += -g3
|
---|
257 | ASM_FLAGS += -Wstack-usage=256
|
---|
258 |
|
---|
259 |
|
---|
260 | # Tools and Flags
|
---|
261 | ###############################################################################
|
---|
262 | # Rules
|
---|
263 |
|
---|
264 | .PHONY: all lst size
|
---|
265 |
|
---|
266 |
|
---|
267 | all: lib$(PROJECT).a
|
---|
268 |
|
---|
269 |
|
---|
270 | .s.o:
|
---|
271 | +@$(call MAKEDIR,$(dir $@))
|
---|
272 | +@echo "Assemble: $(notdir $<)"
|
---|
273 | @$(AS) -c $(ASM_FLAGS) -o $@ $<
|
---|
274 |
|
---|
275 |
|
---|
276 | .S.o:
|
---|
277 | +@$(call MAKEDIR,$(dir $@))
|
---|
278 | +@echo "Assemble: $(notdir $<)"
|
---|
279 | @$(AS) -c $(ASM_FLAGS) -o $@ $<
|
---|
280 |
|
---|
281 | .c.o:
|
---|
282 | +@$(call MAKEDIR,$(dir $@))
|
---|
283 | +@echo "Compile: $(notdir $<)"
|
---|
284 | @$(CC) $(C_FLAGS) $(INCLUDE_PATHS) -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
---|
285 |
|
---|
286 | .cpp.o:
|
---|
287 | +@$(call MAKEDIR,$(dir $@))
|
---|
288 | +@echo "Compile: $(notdir $<)"
|
---|
289 | @$(CPP) $(CXX_FLAGS) $(INCLUDE_PATHS) -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
---|
290 |
|
---|
291 | lib$(PROJECT).a: $(OBJECTS)
|
---|
292 | rm -f lib$(PROJECT).a
|
---|
293 | $(AR) -rcs lib$(PROJECT).a $(OBJECTS)
|
---|
294 | $(RANLIB) lib$(PROJECT).a
|
---|
295 |
|
---|
296 |
|
---|
297 |
|
---|
298 | # Rules
|
---|
299 | ###############################################################################
|
---|
300 | # Dependencies
|
---|
301 |
|
---|
302 | DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
|
---|
303 | -include $(DEPS)
|
---|
304 | endif
|
---|
305 |
|
---|
306 | # Dependencies
|
---|
307 | ###############################################################################
|
---|