daily pastebin goal
11%
SHARE
TWEET

CMSIS DSPLib top level makefile

doragasu Nov 17th, 2012 489 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #*****************************************************************************#
  2. # Makefile: makefile for building CMSIS DSPLib.                               #
  3. #-----------------------------------------------------------------------------#
  4. # Jesús Alonso Fernández @doragasu, 2012                                      #
  5. #*****************************************************************************#
  6.  
  7. # Set root directory and import common variables
  8. ROOT = .
  9. include Makefile.inc
  10.  
  11. # Directories for sources
  12. DSPLBASE = DSP_Lib/Source
  13.  
  14. DSPLDIRS =                                      \
  15.         $(DSPLBASE)/BasicMathFunctions          \
  16.         $(DSPLBASE)/CommonTables                \
  17.         $(DSPLBASE)/ComplexMathFunctions        \
  18.         $(DSPLBASE)/ControllerFunctions         \
  19.         $(DSPLBASE)/FastMathFunctions           \
  20.         $(DSPLBASE)/FilteringFunctions          \
  21.         $(DSPLBASE)/MatrixFunctions             \
  22.         $(DSPLBASE)/StatisticsFunctions         \
  23.         $(DSPLBASE)/SupportFunctions            \
  24.         $(DSPLBASE)/TransformFunctions
  25.  
  26. # Sources for building dsplib
  27. dsplfiles := $(foreach dir, $(DSPLDIRS), $(wildcard $(dir)/*.c))
  28.  
  29. # dsplib object files
  30. dsplobjects := $(patsubst %.c, $(OBJDIR)/%.o, $(notdir $(dsplfiles)))
  31.  
  32. # Builds dsplib
  33. dsplib: $(dsplobjects)
  34.         $(PREFIX)$(AR) rcs $(LIB) $(dsplobjects)
  35.  
  36. # Builds all the object files of dsplib
  37. $(dsplobjects): $(dsplfiles)
  38.         @for dir in $(DSPLDIRS);               \
  39.         do                                     \
  40.             if [ -f $${dir}/Makefile ];        \
  41.             then                               \
  42.                 $(MAKE) -C $${dir} || exit $$?;\
  43.             fi;                                \
  44.         done
  45.  
  46. .PHONY: clean
  47. clean:
  48.         rm -f $(LIB)
  49.         @for dir in $(DSPLDIRS);               \
  50.         do                                     \
  51.             if [ -f $${dir}/Makefile ];        \
  52.             then                               \
  53.                 $(MAKE) -C $${dir} clean;      \
  54.             fi;                                \
  55.         done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top