mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
43 lines
1.4 KiB
Makefile
43 lines
1.4 KiB
Makefile
PKG_NAME=cmsis-nn
|
|
|
|
# A list of all the directories to build for CMSIS-NN
|
|
CMSIS_DIRS += \
|
|
CMSIS/NN/Source/ActivationFunctions \
|
|
CMSIS/NN/Source/BasicMathFunctions \
|
|
CMSIS/NN/Source/ConcatenationFunctions \
|
|
CMSIS/NN/Source/ConvolutionFunctions \
|
|
CMSIS/NN/Source/FullyConnectedFunctions \
|
|
CMSIS/NN/Source/NNSupportFunctions \
|
|
CMSIS/NN/Source/PoolingFunctions \
|
|
CMSIS/NN/Source/ReshapeFunctions \
|
|
CMSIS/NN/Source/SoftmaxFunctions \
|
|
#
|
|
|
|
INCLUDES += -I$(CURDIR)/CMSIS/NN/Include
|
|
CMSIS_BINDIRS = $(addprefix $(BINDIR)/$(PKG_NAME)/,$(CMSIS_DIRS))
|
|
|
|
# Override default RIOT search path for sources to include all of the CMSIS-NN
|
|
# sources in one library instead of one library per subdirectory.
|
|
SRC := $(foreach DIR,$(CMSIS_DIRS),$(wildcard $(DIR)/*.c))
|
|
SRCXX := $(foreach DIR,$(CMSIS_DIRS),$(wildcard $(DIR)/*.cpp))
|
|
ASMSRC := $(foreach DIR,$(CMSIS_DIRS),$(wildcard $(DIR)/*.s))
|
|
ASSMSRC := $(foreach DIR,$(CMSIS_DIRS),$(wildcard $(DIR)/*.S))
|
|
|
|
OBJC := $(SRC:%.c=$(BINDIR)/$(PKG_NAME)/%.o)
|
|
OBJCXX := $(SRCXX:%.cpp=$(BINDIR)/$(PKG_NAME)/%.o)
|
|
ASMOBJ := $(ASMSRC:%.s=$(BINDIR)/$(PKG_NAME)/%.o)
|
|
ASSMOBJ := $(ASSMSRC:%.S=$(BINDIR)/$(PKG_NAME)/%.o)
|
|
OBJ = $(OBJC) $(OBJCXX) $(ASMOBJ) $(ASSMOBJ)
|
|
|
|
# Create subdirectories if they do not already exist
|
|
$(OBJ): | $(CMSIS_BINDIRS)
|
|
|
|
$(CMSIS_BINDIRS):
|
|
@mkdir -p $@
|
|
|
|
# Reset the default goal.
|
|
.DEFAULT_GOAL :=
|
|
|
|
# Include RIOT settings and recipes
|
|
include $(RIOTBASE)/Makefile.base
|