Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. export LIBDIR := ../../lib
  4. RULES_MAK := $(PJDIR)/build/rules.mak
  5. export SPEEX_LIB := libspeex-$(TARGET_NAME)$(LIBEXT)
  6. ifeq ($(PJ_SHARED_LIBRARIES),)
  7. else
  8. export SPEEX_SONAME := libspeex.$(SHLIB_SUFFIX)
  9. export SPEEX_SHLIB := $(SPEEX_SONAME).$(PJ_VERSION_MAJOR)
  10. endif
  11. ###############################################################################
  12. # Gather all flags.
  13. #
  14. export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
  15. $(CFLAGS) $(CC_INC). $(CC_INC)../../speex/include \
  16. $(CC_INC)../../speex/libspeex \
  17. $(CC_INC)../../../pjlib/include
  18. export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
  19. $(HOST_CXXFLAGS) $(CXXFLAGS)
  20. export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
  21. $(APP_LDFLAGS) $(LDFLAGS)
  22. export SPEEX_SRCDIR = ../../speex/libspeex
  23. export SPEEX_OBJS = bits.o cb_search.o exc_10_16_table.o \
  24. exc_10_32_table.o exc_20_32_table.o \
  25. exc_5_256_table.o exc_5_64_table.o \
  26. exc_8_128_table.o fftwrap.o filterbank.o \
  27. filters.o gain_table.o gain_table_lbr.o \
  28. hexc_10_32_table.o hexc_table.o \
  29. high_lsp_tables.o \
  30. kiss_fft.o kiss_fftr.o lpc.o \
  31. lsp.o lsp_tables_nb.o ltp.o \
  32. mdf.o modes.o modes_wb.o \
  33. nb_celp.o preprocess.o \
  34. quant_lsp.o resample.o sb_celp.o smallft.o \
  35. speex.o speex_callbacks.o speex_header.o \
  36. scal.o stereo.o vbr.o vq.o window.o
  37. export SPEEX_CFLAGS = -DHAVE_CONFIG_H $(_CFLAGS)
  38. export SPEEX_LDFLAGS := $(PJLIB_LDLIB) $(_LDFLAGS)
  39. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  40. ###############################################################################
  41. # Main entry
  42. #
  43. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  44. #
  45. TARGETS := $(SPEEX_LIB) $(SPEEX_SONAME)
  46. all: $(TARGETS)
  47. doc:
  48. cd .. && doxygen docs/doxygen.cfg
  49. dep: depend
  50. distclean: realclean
  51. .PHONY: all dep depend clean realclean distclean
  52. .PHONY: $(TARGETS)
  53. .PHONY: $(SPEEX_LIB) $(SPEEX_SONAME)
  54. libspeex: $(SPEEX_LIB)
  55. $(SPEEX_SONAME): $(SPEEX_LIB)
  56. $(SPEEX_LIB) $(SPEEX_SONAME):
  57. $(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  58. clean print_lib:
  59. $(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@
  60. realclean:
  61. $(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
  62. $(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@
  63. depend:
  64. $(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@