Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. export LIBDIR := ../../lib
  4. RULES_MAK := $(PJDIR)/build/rules.mak
  5. export ILBC_LIB := libilbccodec-$(TARGET_NAME)$(LIBEXT)
  6. ifeq ($(PJ_SHARED_LIBRARIES),)
  7. else
  8. export ILBC_SONAME := libilbccodec.$(SHLIB_SUFFIX)
  9. export ILBC_SHLIB := $(ILBC_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)../../ilbc \
  16. $(CC_INC)../../../pjlib/include
  17. export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
  18. $(HOST_CXXFLAGS) $(CXXFLAGS)
  19. export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
  20. $(LDFLAGS)
  21. export ILBC_SRCDIR = ../../ilbc
  22. export ILBC_OBJS = FrameClassify.o LPCdecode.o LPCencode.o \
  23. StateConstructW.o StateSearchW.o anaFilter.o \
  24. constants.o createCB.o doCPLC.o \
  25. enhancer.o filter.o gainquant.o \
  26. getCBvec.o helpfun.o hpInput.o \
  27. hpOutput.o iCBConstruct.o iCBSearch.o \
  28. iLBC_decode.o iLBC_encode.o lsf.o \
  29. packing.o syntFilter.o
  30. export ILBC_CFLAGS = $(_CFLAGS)
  31. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  32. ###############################################################################
  33. # Main entry
  34. #
  35. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  36. #
  37. TARGETS := $(ILBC_LIB) $(ILBC_SONAME)
  38. all: $(TARGETS)
  39. doc:
  40. cd .. && doxygen docs/doxygen.cfg
  41. dep: depend
  42. distclean: realclean
  43. .PHONY: all dep depend clean realclean distclean
  44. .PHONY: $(TARGETS)
  45. .PHONY: $(ILBC_LIB) $(ILBC_SONAME)
  46. libilbccodec: $(ILBC_LIB)
  47. $(ILBC_SONAME): $(ILBC_LIB)
  48. $(ILBC_LIB) $(ILBC_SONAME):
  49. $(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  50. clean print_lib:
  51. $(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $@
  52. realclean:
  53. $(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
  54. $(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $@
  55. depend:
  56. $(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $@