CC = arm-none-eabi-gcc OUT_FILE_NAME = libcmsisDNN_M7.a #CFLAGS= -fPIC -O0 -g -Wall -c -mcpu=cortex-m7 \ # -mfpu=fpv5-d16 \ # -Ofast -ffast-math \ # -DNDEBUG -Wextra -mfloat-abi=hard -mlittle-endian -mthumb\ # -DARM_MATH_LOOPUNROLL CFLAGS= -fPIC -O0 -g -Wall -c -mcpu=cortex-m7 \ -Ofast -ffast-math \ -mfpu=fpv5-sp-d16 -mfloat-abi=hard \ -DNDEBUG -Wextra -mlittle-endian -mthumb\ -DARM_MATH_LOOPUNROLL CMSISROOT = Y:\Projects\DeepLearning\R2022a\Cortex-M\CMSIS_5-5.8.0\CMSIS_5-5.8.0 INC = -I../Import\ -I$(CMSISROOT)\CMSIS\Core\Include \ -I$(CMSISROOT)\CMSIS\DSP\PrivateInclude \ -I$(CMSISROOT)\CMSIS\DSP\Include \ -I$(CMSISROOT)\CMSIS\NN\Include OBJ_DIR=./obj OUT_DIR=./lib_win # Enumerating of every *.cpp as *.o and using that as dependency. # filter list of .c files in a directory. # FILES =dump_l.c \ # kter.c \ # # $(OUT_FILE_NAME): $(patsubst %.c,$(OBJ_DIR)/%.o,$(wildcard $(FILES))) FILES = Source\ActivationFunctions\arm_nn_activations_q15.c \ Source\ActivationFunctions\arm_nn_activations_q7.c \ Source\ActivationFunctions\arm_relu6_s8.c \ Source\ActivationFunctions\arm_relu_q15.c \ Source\ActivationFunctions\arm_relu_q7.c \ Source\BasicMathFunctions\arm_elementwise_add_s8.c \ Source\BasicMathFunctions\arm_elementwise_mul_s8.c \ Source\ConcatenationFunctions\arm_concatenation_s8_w.c \ Source\ConcatenationFunctions\arm_concatenation_s8_x.c \ Source\ConcatenationFunctions\arm_concatenation_s8_y.c \ Source\ConcatenationFunctions\arm_concatenation_s8_z.c \ Source\ConvolutionFunctions\arm_convolve_1x1_HWC_q7_fast_nonsquare.c \ Source\ConvolutionFunctions\arm_convolve_1x1_s8_fast.c \ Source\ConvolutionFunctions\arm_convolve_1_x_n_s8.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q15_basic.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q15_fast.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q15_fast_nonsquare.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q7_basic.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q7_basic_nonsquare.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q7_fast.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q7_fast_nonsquare.c \ Source\ConvolutionFunctions\arm_convolve_HWC_q7_RGB.c \ Source\ConvolutionFunctions\arm_convolve_s8.c \ Source\ConvolutionFunctions\arm_convolve_wrapper_s8.c \ Source\ConvolutionFunctions\arm_depthwise_conv_3x3_s8.c \ Source\ConvolutionFunctions\arm_depthwise_conv_s8.c \ Source\ConvolutionFunctions\arm_depthwise_conv_s8_opt.c \ Source\ConvolutionFunctions\arm_depthwise_conv_u8_basic_ver1.c \ Source\ConvolutionFunctions\arm_depthwise_conv_wrapper_s8.c \ Source\ConvolutionFunctions\arm_depthwise_separable_conv_HWC_q7.c \ Source\ConvolutionFunctions\arm_depthwise_separable_conv_HWC_q7_nonsquare.c \ Source\ConvolutionFunctions\arm_nn_depthwise_conv_s8_core.c \ Source\ConvolutionFunctions\arm_nn_mat_mult_kernel_q7_q15.c \ Source\ConvolutionFunctions\arm_nn_mat_mult_kernel_q7_q15_reordered.c \ Source\ConvolutionFunctions\arm_nn_mat_mult_kernel_s8_s16.c \ Source\ConvolutionFunctions\arm_nn_mat_mult_kernel_s8_s16_reordered.c \ Source\ConvolutionFunctions\arm_nn_mat_mult_s8.c \ Source\FullyConnectedFunctions\arm_fully_connected_mat_q7_vec_q15.c \ Source\FullyConnectedFunctions\arm_fully_connected_mat_q7_vec_q15_opt.c \ Source\FullyConnectedFunctions\arm_fully_connected_q15.c \ Source\FullyConnectedFunctions\arm_fully_connected_q15_opt.c \ Source\FullyConnectedFunctions\arm_fully_connected_q7.c \ Source\FullyConnectedFunctions\arm_fully_connected_q7_opt.c \ Source\FullyConnectedFunctions\arm_fully_connected_s8.c \ Source\NNSupportFunctions\arm_nntables.c \ Source\NNSupportFunctions\arm_nn_accumulate_q7_to_q15.c \ Source\NNSupportFunctions\arm_nn_add_q7.c \ Source\NNSupportFunctions\arm_nn_depthwise_conv_nt_t_padded_s8.c \ Source\NNSupportFunctions\arm_nn_depthwise_conv_nt_t_s8.c \ Source\NNSupportFunctions\arm_nn_mat_mult_nt_t_s8.c \ Source\NNSupportFunctions\arm_nn_mat_mul_core_1x_s8.c \ Source\NNSupportFunctions\arm_nn_mat_mul_core_4x_s8.c \ Source\NNSupportFunctions\arm_nn_mult_q15.c \ Source\NNSupportFunctions\arm_nn_mult_q7.c \ Source\NNSupportFunctions\arm_nn_vec_mat_mult_t_s8.c \ Source\NNSupportFunctions\arm_nn_vec_mat_mult_t_svdf_s8.c \ Source\NNSupportFunctions\arm_q7_to_q15_no_shift.c \ Source\NNSupportFunctions\arm_q7_to_q15_reordered_no_shift.c \ Source\NNSupportFunctions\arm_q7_to_q15_reordered_with_offset.c \ Source\NNSupportFunctions\arm_q7_to_q15_with_offset.c \ Source\PoolingFunctions\arm_avgpool_s8.c \ Source\PoolingFunctions\arm_max_pool_s8.c \ Source\PoolingFunctions\arm_pool_q7_HWC.c \ Source\ReshapeFunctions\arm_reshape_s8.c \ Source\SoftmaxFunctions\arm_softmax_q15.c \ Source\SoftmaxFunctions\arm_softmax_q7.c \ Source\SoftmaxFunctions\arm_softmax_s8.c \ Source\SoftmaxFunctions\arm_softmax_u8.c \ Source\SoftmaxFunctions\arm_softmax_with_batch_q7.c \ Source\SVDFunctions\arm_svdf_s8.c \ # Enumerating of every *.cpp as *.o and using that as dependency $(OUT_FILE_NAME): $(patsubst %.c,%.o,$(wildcard $(FILES))) ar -r -o $(OUT_DIR)/$@ $^ #Compiling every *.cpp to *.o %.o: %.c dirmake $(CC) -c $(INC) $(CFLAGS) -o $@ $< dirmake: @mkdir -p $(OUT_DIR) @mkdir -p $(OBJ_DIR) clean: rm -f $(OBJ_DIR)/*.o $(OUT_DIR)/$(OUT_FILE_NAME) Makefile.bak rebuild: clean build all: arm-none-eabi-gcc -DARM_MATH_LOOPUNROLL \ -I/cmsisroot/CMSIS/Core/Include \ -I/cmsisroot/CMSIS/DSP/PrivateInclude \ -I/cmsisroot/CMSIS/DSP/Include \ -mcpu=cortex-m7 \ -mfpu=fpv5-d16 \ -Ofast -ffast-math \ -DNDEBUG -Wall -Wextra -Werror -mfloat-abi=hard -mlittle-endian -mthumb -c Y:\Projects\DeepLearning\R2022a\Cortex-M\CMSIS_5-5.8.0\CMSIS_5-5.8.0\CMSIS\NN\Source\ActivationFunctions\arm_relu_q7.c