mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
* Fix possible build dependency issue. * Detect number of cores instead of hard coded value.
49 lines
1.4 KiB
Makefile
49 lines
1.4 KiB
Makefile
# This file is part of the OpenMV project.
|
|
#
|
|
# Copyright (c) 2013-2019 Ibrahim Abdelkader <iabdalkader@openmv.io>
|
|
# Copyright (c) 2013-2019 Kwabena W. Agyeman <kwagyeman@openmv.io>
|
|
#
|
|
# This work is licensed under the MIT license, see the file LICENSE for details.
|
|
#
|
|
# CMSIS Makefile
|
|
|
|
SRC_S = src/$(STARTUP).s
|
|
SRC_C = src/$(SYSTEM).c
|
|
|
|
SRC_C += $(wildcard src/dsp/CommonTables/*.c)
|
|
SRC_C += $(wildcard src/dsp/FastMathFunctions/*.c)
|
|
SRC_C += $(wildcard src/dsp/MatrixFunctions/*.c)
|
|
SRC_C += $(wildcard src/nn/ActivationFunctions/*.c)
|
|
SRC_C += $(wildcard src/nn/ConvolutionFunctions/*.c)
|
|
SRC_C += $(wildcard src/nn/FullyConnectedFunctions/*.c)
|
|
SRC_C += $(wildcard src/nn/NNSupportFunctions/*.c)
|
|
SRC_C += $(wildcard src/nn/PoolingFunctions/*.c)
|
|
SRC_C += $(wildcard src/nn/SoftmaxFunctions/*.c)
|
|
|
|
#SRC_C += $(wildcard src/dsp/ComplexMathFunctions/*.c)
|
|
#SRC_C += $(wildcard src/dsp/ControllerFunctions/*.c)
|
|
#SRC_C += $(wildcard src/dsp/FilteringFunctions/*.c)
|
|
#SRC_C += $(wildcard src/dsp/StatisticsFunctions/*.c)
|
|
#SRC_C += $(wildcard src/dsp/SupportFunctions/*.c)
|
|
#SRC_C += $(wildcard src/dsp/TransformFunctions/*.c)
|
|
|
|
OBJS = $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
|
|
OBJS += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
|
OBJ_DIRS = $(sort $(dir $(OBJS)))
|
|
|
|
all: $(OBJS)
|
|
$(OBJS): | $(OBJ_DIRS)
|
|
|
|
$(OBJ_DIRS):
|
|
$(MKDIR) -p $@
|
|
|
|
$(BUILD)/%.o : %.c
|
|
$(ECHO) "CC $<"
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
$(BUILD)/%.o : %.s
|
|
$(ECHO) "AS $<"
|
|
$(AS) $(AFLAGS) $< -o $@
|
|
|
|
-include $(OBJS:%.o=%.d)
|