Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #*****************************************************************************#
- # Makefile: makefile for building CMSIS DSPLib. #
- #-----------------------------------------------------------------------------#
- # Jesús Alonso Fernández @doragasu, 2012 #
- #*****************************************************************************#
- # Set root directory and import common variables
- ROOT = .
- include Makefile.inc
- # Directories for sources
- DSPLBASE = DSP_Lib/Source
- DSPLDIRS = \
- $(DSPLBASE)/BasicMathFunctions \
- $(DSPLBASE)/CommonTables \
- $(DSPLBASE)/ComplexMathFunctions \
- $(DSPLBASE)/ControllerFunctions \
- $(DSPLBASE)/FastMathFunctions \
- $(DSPLBASE)/FilteringFunctions \
- $(DSPLBASE)/MatrixFunctions \
- $(DSPLBASE)/StatisticsFunctions \
- $(DSPLBASE)/SupportFunctions \
- $(DSPLBASE)/TransformFunctions
- # Sources for building dsplib
- dsplfiles := $(foreach dir, $(DSPLDIRS), $(wildcard $(dir)/*.c))
- # dsplib object files
- dsplobjects := $(patsubst %.c, $(OBJDIR)/%.o, $(notdir $(dsplfiles)))
- # Builds dsplib
- dsplib: $(dsplobjects)
- $(PREFIX)$(AR) rcs $(LIB) $(dsplobjects)
- # Builds all the object files of dsplib
- $(dsplobjects): $(dsplfiles)
- @for dir in $(DSPLDIRS); \
- do \
- if [ -f $${dir}/Makefile ]; \
- then \
- $(MAKE) -C $${dir} || exit $$?;\
- fi; \
- done
- .PHONY: clean
- clean:
- rm -f $(LIB)
- @for dir in $(DSPLDIRS); \
- do \
- if [ -f $${dir}/Makefile ]; \
- then \
- $(MAKE) -C $${dir} clean; \
- fi; \
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement