Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / flight / pios / common / libraries / CMSIS / library.mk
blobdecd03d6f4034e86e469db277db176cbbe11b723
2 # Rules to add CMSIS2 to a PiOS target
5 CMSIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
6 EXTRAINCDIRS += $(CMSIS_DIR)Include
8 # Rules to build the ARM DSP library
9 ifeq ($(USE_DSP_LIB), YES)
10 DSPLIB_NAME := dsp
11 CMSIS_DSPLIB := $(CMSIS_DIR)DSP_Lib/Source
13 # Compile all files into output directory
14 DSPLIB_SRC := $(sort $(wildcard $(CMSIS_DSPLIB)/*/*.c))
15 DSPLIB_SRCBASE := $(notdir $(basename $(DSPLIB_SRC)))
16 $(foreach src, $(DSPLIB_SRC), $(eval $(call COMPILE_C_TEMPLATE, $(src))))
18 # Define the object files directory and a list of object files for the library
19 DSPLIB_OBJDIR = $(OUTDIR)
20 DSPLIB_OBJ = $(addprefix $(DSPLIB_OBJDIR)/, $(addsuffix .o, $(DSPLIB_SRCBASE)))
22 # Create a library file
23 $(eval $(call ARCHIVE_TEMPLATE, $(OUTDIR)/lib$(DSPLIB_NAME).a, $(DSPLIB_OBJ), $(DSPLIB_OBJDIR)))
25 # Add library to the list of linked objects
26 ALLLIB += $(OUTDIR)/lib$(DSPLIB_NAME).a
27 endif