-
Notifications
You must be signed in to change notification settings - Fork 4
/
archive_makefile
388 lines (351 loc) · 18.1 KB
/
archive_makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
################################################################################
# General Instructions #
################################################################################
# To generate microlite.a file for your particular project you have
# to run the following command from main directory:
#
# make -f archive_makefile PROJECT=<name_of_your_project>
#
# This will create microlite.a file for your target system, which will be
# included in the linking process.
# Variable PROJECT has to match to the name of your project folder inside
# projects directory.
################################################################################
# Instructions for testing #
################################################################################
# To avoid unnecessary flashing, we can test hardware independent
# parts of code on development machine.
# To compile test files add them to TESTFILES variable in specific projects
# project.mk file . We also need to create separate archive file for testing,
# we will call it testlite.a.
# To create it run following command from main directory:
#
# make -f archive_makefile test PROJECT=<name_of_your_project>
#
# This will create testlite.a file for your development system, which will be
# included in the linking process.
# Variable PROJECT has to match to the name of your project folder inside
# projects directory.
################################################################################
# Build directory #
################################################################################
PROJECT_PATH = projects/$(PROJECT)
# Microcontroller specific
MICROLITE_BUILD = $(PROJECT_PATH)/microlite_build
MICROLITE_LIB = $(MICROLITE_BUILD)/microlite.a
# Test, development machine specific
TESTLITE_BUILD = $(PROJECT_PATH)/testlite_build
TESTLITE_LIB = $(TESTLITE_BUILD)/testlite.a
################################################################################
# Project selection #
################################################################################
DIRECTORIES = $(sort $(dir $(wildcard projects/*/)))
PROJECT ?= 0
# Path to libopen, needed by genlink-config.mk
OPENCM3_DIR = libopencm3
ifneq (,$(findstring $(PROJECT),$(DIRECTORIES)))
# Project was found in projects directory, lets include its project.mk file
include projects/$(PROJECT)/project.mk
# Include configuration for linker file, we also get our arch_flags from here
include libopencm3/mk/genlink-config.mk
all: $(MICROLITE_LIB)
# Clean up PREFIX variable
test: PREFIX =
test: $(TESTLITE_LIB)
else
#Project was not found, exit gracefully
all:
@echo Project was not found, exiting!
test:
@echo Project was not found, exiting!
endif
################################################################################
# Make Verbosity #
################################################################################
# Be silent per default, but 'make V=1' will show all compiler calls.
# If you want, V=99 will print out all sorts of things.
V?=0
ifeq ($(V),0)
Q := @
NULL := 2>/dev/null
endif
#For checking macros, to use it write make print-VARIABLE
print-% : ; @echo $* = $($*)
################################################################################
# Tool paths #
################################################################################
PREFIX ?= arm-none-eabi-
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
LD = $(PREFIX)g++
AS = $(PREFIX)gcc -x assembler-with-cpp
AR = $(PREFIX)ar
OBJCOPY = $(PREFIX)objcopy
OBJDUMP = $(PREFIX)objdump
################################################################################
# All sources, .c, .cc, .s files #
################################################################################
MICROLITE_SRC := \
tensorflow/tensorflow/lite/micro/all_ops_resolver.cc \
tensorflow/tensorflow/lite/micro/memory_helpers.cc \
tensorflow/tensorflow/lite/micro/micro_allocator.cc \
tensorflow/tensorflow/lite/micro/micro_error_reporter.cc \
tensorflow/tensorflow/lite/micro/micro_interpreter.cc \
tensorflow/tensorflow/lite/micro/micro_profiler.cc \
tensorflow/tensorflow/lite/micro/micro_string.cc \
tensorflow/tensorflow/lite/micro/micro_utils.cc \
tensorflow/tensorflow/lite/micro/recording_micro_allocator.cc \
tensorflow/tensorflow/lite/micro/recording_simple_memory_allocator.cc \
tensorflow/tensorflow/lite/micro/simple_memory_allocator.cc \
tensorflow/tensorflow/lite/micro/test_helpers.cc \
tensorflow/tensorflow/lite/micro/benchmarks/keyword_scrambled_model_data.cc \
tensorflow/tensorflow/lite/micro/kernels/activations.cc \
tensorflow/tensorflow/lite/micro/kernels/arg_min_max.cc \
tensorflow/tensorflow/lite/micro/kernels/ceil.cc \
tensorflow/tensorflow/lite/micro/kernels/circular_buffer.cc \
tensorflow/tensorflow/lite/micro/kernels/comparisons.cc \
tensorflow/tensorflow/lite/micro/kernels/concatenation.cc \
tensorflow/tensorflow/lite/micro/kernels/dequantize.cc \
tensorflow/tensorflow/lite/micro/kernels/elementwise.cc \
tensorflow/tensorflow/lite/micro/kernels/ethosu.cc \
tensorflow/tensorflow/lite/micro/kernels/floor.cc \
tensorflow/tensorflow/lite/micro/kernels/hard_swish.cc \
tensorflow/tensorflow/lite/micro/kernels/kernel_runner.cc \
tensorflow/tensorflow/lite/micro/kernels/kernel_util.cc \
tensorflow/tensorflow/lite/micro/kernels/l2norm.cc \
tensorflow/tensorflow/lite/micro/kernels/logical.cc \
tensorflow/tensorflow/lite/micro/kernels/logistic.cc \
tensorflow/tensorflow/lite/micro/kernels/maximum_minimum.cc \
tensorflow/tensorflow/lite/micro/kernels/neg.cc \
tensorflow/tensorflow/lite/micro/kernels/pack.cc \
tensorflow/tensorflow/lite/micro/kernels/pad.cc \
tensorflow/tensorflow/lite/micro/kernels/prelu.cc \
tensorflow/tensorflow/lite/micro/kernels/quantize.cc \
tensorflow/tensorflow/lite/micro/kernels/reduce.cc \
tensorflow/tensorflow/lite/micro/kernels/reshape.cc \
tensorflow/tensorflow/lite/micro/kernels/resize_nearest_neighbor.cc \
tensorflow/tensorflow/lite/micro/kernels/round.cc \
tensorflow/tensorflow/lite/micro/kernels/shape.cc \
tensorflow/tensorflow/lite/micro/kernels/split.cc \
tensorflow/tensorflow/lite/micro/kernels/split_v.cc \
tensorflow/tensorflow/lite/micro/kernels/strided_slice.cc \
tensorflow/tensorflow/lite/micro/kernels/sub.cc \
tensorflow/tensorflow/lite/micro/kernels/tanh.cc \
tensorflow/tensorflow/lite/micro/kernels/unpack.cc \
tensorflow/tensorflow/lite/micro/memory_planner/greedy_memory_planner.cc \
tensorflow/tensorflow/lite/micro/memory_planner/linear_memory_planner.cc \
tensorflow/tensorflow/lite/micro/testing/test_conv_model.cc \
tensorflow/tensorflow/lite/c/common.c \
tensorflow/tensorflow/lite/core/api/error_reporter.cc \
tensorflow/tensorflow/lite/core/api/flatbuffer_conversions.cc \
tensorflow/tensorflow/lite/core/api/op_resolver.cc \
tensorflow/tensorflow/lite/core/api/tensor_utils.cc \
tensorflow/tensorflow/lite/kernels/internal/quantization_util.cc \
tensorflow/tensorflow/lite/kernels/kernel_util.cc \
tensorflow/tensorflow/lite/schema/schema_utils.cc \
CMSIS_NN_PATH := tensorflow/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/
CMSIS_NN_SRC := \
${CMSIS_NN_PATH}/DSP/Source/BasicMathFunctions/arm_dot_prod_q15.c \
${CMSIS_NN_PATH}/DSP/Source/BasicMathFunctions/arm_mult_q15.c \
${CMSIS_NN_PATH}/DSP/Source/TransformFunctions/arm_rfft_init_q15.c \
${CMSIS_NN_PATH}/DSP/Source/TransformFunctions/arm_rfft_q15.c \
${CMSIS_NN_PATH}/DSP/Source/TransformFunctions/arm_bitreversal2.c \
${CMSIS_NN_PATH}/DSP/Source/TransformFunctions/arm_cfft_q15.c \
${CMSIS_NN_PATH}/DSP/Source/TransformFunctions/arm_cfft_radix4_q15.c \
${CMSIS_NN_PATH}/DSP/Source/CommonTables/arm_const_structs.c \
${CMSIS_NN_PATH}/DSP/Source/CommonTables/arm_common_tables.c \
${CMSIS_NN_PATH}/DSP/Source/StatisticsFunctions/arm_mean_q15.c \
${CMSIS_NN_PATH}/DSP/Source/StatisticsFunctions/arm_max_q7.c \
${CMSIS_NN_PATH}/NN/Source/BasicMathFunctions/arm_elementwise_mul_s8.c \
${CMSIS_NN_PATH}/NN/Source/BasicMathFunctions/arm_elementwise_add_s8.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_q7_opt.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_s8.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_q15_opt.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_q15.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_mat_q7_vec_q15.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_q7.c \
${CMSIS_NN_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_mat_q7_vec_q15_opt.c \
${CMSIS_NN_PATH}/NN/Source/SVDFunctions/arm_svdf_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConcatenationFunctions/arm_concatenation_s8_z.c \
${CMSIS_NN_PATH}/NN/Source/ConcatenationFunctions/arm_concatenation_s8_x.c \
${CMSIS_NN_PATH}/NN/Source/ConcatenationFunctions/arm_concatenation_s8_w.c \
${CMSIS_NN_PATH}/NN/Source/ConcatenationFunctions/arm_concatenation_s8_y.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_nn_depthwise_conv_s8_core.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_u8_basic_ver1.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_1x1_s8_fast.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_fast.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_q7_q15_reordered.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_q7_q15.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_RGB.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_1x1_HWC_q7_fast_nonsquare.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_basic.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_separable_conv_HWC_q7_nonsquare.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q15_fast_nonsquare.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8_opt.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_3x3_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q15_basic.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q15_fast.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_fast_nonsquare.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16_reordered.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_separable_conv_HWC_q7.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_1_x_n_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_basic_nonsquare.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_wrapper_s8.c \
${CMSIS_NN_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_wrapper_s8.c \
${CMSIS_NN_PATH}/NN/Source/PoolingFunctions/arm_pool_q7_HWC.c \
${CMSIS_NN_PATH}/NN/Source/PoolingFunctions/arm_avgpool_s8.c \
${CMSIS_NN_PATH}/NN/Source/PoolingFunctions/arm_max_pool_s8.c \
${CMSIS_NN_PATH}/NN/Source/ActivationFunctions/arm_relu_q15.c \
${CMSIS_NN_PATH}/NN/Source/ActivationFunctions/arm_relu_q7.c \
${CMSIS_NN_PATH}/NN/Source/ActivationFunctions/arm_nn_activations_q7.c \
${CMSIS_NN_PATH}/NN/Source/ActivationFunctions/arm_relu6_s8.c \
${CMSIS_NN_PATH}/NN/Source/ActivationFunctions/arm_nn_activations_q15.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_add_q7.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_padded_s8.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_q7_to_q15_reordered_no_shift.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_s8.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nntables.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_accumulate_q7_to_q15.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_mult_q7.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_mult_q15.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_q7_to_q15_reordered_with_offset.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_q7_to_q15_with_offset.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_mat_mult_nt_t_s8.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_vec_mat_mult_t_s8.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_1x_s8.c \
${CMSIS_NN_PATH}/NN/Source/NNSupportFunctions/arm_q7_to_q15_no_shift.c \
${CMSIS_NN_PATH}/NN/Source/SoftmaxFunctions/arm_softmax_s8.c \
${CMSIS_NN_PATH}/NN/Source/SoftmaxFunctions/arm_softmax_q15.c \
${CMSIS_NN_PATH}/NN/Source/SoftmaxFunctions/arm_softmax_u8.c \
${CMSIS_NN_PATH}/NN/Source/SoftmaxFunctions/arm_softmax_q7.c \
${CMSIS_NN_PATH}/NN/Source/SoftmaxFunctions/arm_softmax_with_batch_q7.c \
${CMSIS_NN_PATH}/NN/Source/ReshapeFunctions/arm_reshape_s8.c \
CMSIS_KERNELS_SRC := \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/conv.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/add.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/depthwise_conv.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/fully_connected.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/mul.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/pooling.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/softmax.cc \
tensorflow/tensorflow/lite/micro/kernels/cmsis-nn/svdf.cc
NORMAL_KERNELS_SRC := \
tensorflow/tensorflow/lite/micro/kernels/conv.cc \
tensorflow/tensorflow/lite/micro/kernels/add.cc \
tensorflow/tensorflow/lite/micro/kernels/depthwise_conv.cc \
tensorflow/tensorflow/lite/micro/kernels/fully_connected.cc \
tensorflow/tensorflow/lite/micro/kernels/mul.cc \
tensorflow/tensorflow/lite/micro/kernels/pooling.cc \
tensorflow/tensorflow/lite/micro/kernels/softmax.cc \
tensorflow/tensorflow/lite/micro/kernels/svdf.cc \
tensorflow/tensorflow/lite/micro/debug_log.cc
#$(MICROLITE_LIB) : MICROLITE_SRC += $(CMSIS_KERNELS_SRC) $(CMSIS_NN_SRC)
#$(TESTLITE_LIB) : MICROLITE_SRC += $(NORMAL_KERNELS_SRC)
#all : MICROLITE_SRC += $(CMSIS_KERNELS_SRC) $(CMSIS_NN_SRC)
#test : MICROLITE_SRC += $(NORMAL_KERNELS_SRC)
################################################################################
# Includes #
################################################################################
THIRD_PARTY_DIR = tensorflow/tensorflow/lite/micro/tools/make/downloads
INCLUDES := \
-Itensorflow \
-I$(THIRD_PARTY_DIR) \
-I$(THIRD_PARTY_DIR)/gemmlowp \
-I$(THIRD_PARTY_DIR)/flatbuffers/include \
-I$(THIRD_PARTY_DIR)/kissfft \
-I$(THIRD_PARTY_DIR)/ruy \
-I$(THIRD_PARTY_DIR)/cmsis/CMSIS/Core/Include/ \
-I$(THIRD_PARTY_DIR)/cmsis/CMSIS/DSP/Include/ \
-isystem$(THIRD_PARTY_DIR)/cmsis/CMSIS/Core/Include/ \
-isystem$(THIRD_PARTY_DIR)/cmsis/CMSIS/DSP/Include/ \
-I$(THIRD_PARTY_DIR)/cmsis/CMSIS/NN/Include/ \
-I$(PROJECT_PATH) \
################################################################################
# Objects #
################################################################################
MICROLITE_RAW_OBJS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(MICROLITE_SRC)))
MICROLITE_RAW_OBJS += $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(CMSIS_KERNELS_SRC)))
MICROLITE_RAW_OBJS += $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(CMSIS_NN_SRC)))
MICROLITE_OBJS := $(addprefix $(MICROLITE_BUILD)/, $(MICROLITE_RAW_OBJS))
TESTLITE_RAW_OBJS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(MICROLITE_SRC)))
TESTLITE_RAW_OBJS += $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(NORMAL_KERNELS_SRC)))
TESTLITE_OBJS := $(addprefix $(TESTLITE_BUILD)/, $(TESTLITE_RAW_OBJS))
vpath %.c $(sort $(dir $(MICROLITE_SRC)))
vpath %.cc $(sort $(dir $(MICROLITE_SRC)))
vpath %.c $(sort $(dir $(CMSIS_KERNELS_SRC)))
vpath %.cc $(sort $(dir $(CMSIS_KERNELS_SRC)))
vpath %.c $(sort $(dir $(CMSIS_NN_SRC)))
vpath %.cc $(sort $(dir $(CMSIS_NN_SRC)))
vpath %.c $(sort $(dir $(NORMAL_KERNELS_SRC)))
vpath %.cc $(sort $(dir $(NORMAL_KERNELS_SRC)))
################################################################################
# Defines #
################################################################################
C_DEFS :=
CXX_DEFS := \
-DNDEBUG \
-DTF_LITE_STATIC_MEMORY \
-DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK
#-DTF_LITE_MCU_DEBUG_LOG
################################################################################
# Compiler Flags #
################################################################################
FLAGS :=\
-Wall \
-Wno-strict-aliasing \
-Wno-sign-compare \
-fdata-sections \
-ffunction-sections \
-Wno-narrowing\
-funsigned-char \
-nostdlib \
-fmessage-length=0 \
-fno-unwind-tables \
-fomit-frame-pointer \
-fno-common \
-O3 \
-DCMSIS_NN # Needed due to ifdef statement in tensorflow code
# Default flags
MICROLITE_CFLAGS := $(ARCH_FLAGS) $(FLAGS) $(C_DEFS) -std=c11
MICROLITE_CXXFLAGS := $(ARCH_FLAGS) $(FLAGS) $(CXX_DEFS) \
-std=c++11 -std=gnu++11 \
-fno-rtti -fpermissive -fno-threadsafe-statics -fno-use-cxa-atexit
# Test flags
TESTLITE_CXXFLAGS = -std=c++11 -DTF_LITE_STATIC_MEMORY -O3 -DTF_LITE_DISABLE_X86_NEON
TESTLITE_CFLAGS = -DTF_LITE_STATIC_MEMORY -O3 -DTF_LITE_DISABLE_X86_NEON
################################################################################
# Rules #
################################################################################
#default all rules
$(MICROLITE_LIB): $(MICROLITE_OBJS) $(MICROLITE_BUILD) archive_makefile
@printf " AR\t$<\n"
@mkdir -p $(dir $@)
$(Q)$(AR) -r $@ $(MICROLITE_OBJS)
$(MICROLITE_BUILD)/%.o: %.c
@printf " CC\t$<\n"
@mkdir -p $(dir $@)
$(Q)$(CC) $(MICROLITE_CFLAGS) $(INCLUDES) -c $< -o $@
$(MICROLITE_BUILD)/%.o: %.cc
@printf " CXX\t$<\n"
@mkdir -p $(dir $@)
$(Q)$(CXX) $(MICROLITE_CXXFLAGS) $(INCLUDES) -c $< -o $@
#test rules
$(TESTLITE_LIB): $(TESTLITE_OBJS)
@printf " AR\t$<\n"
@mkdir -p $(dir $@)
$(Q)$(AR) -r $@ $(TESTLITE_OBJS)
$(TESTLITE_BUILD)/%.o: %.c
@printf " CC\t$<\n"
@mkdir -p $(dir $@)
$(Q)$(CC) $(TESTLITE_CFLAGS) $(INCLUDES) -c $< -o $@
$(TESTLITE_BUILD)/%.o: %.cc
@printf " CXX\t$<\n"
@mkdir -p $(dir $@)
$(Q)$(CXX) $(TESTLITE_CXXFLAGS) $(INCLUDES) -c $< -o $@
$(MICROLITE_BUILD):
mkdir $@