Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. export LIBDIR := ../../lib
  4. RULES_MAK := $(PJDIR)/build/rules.mak
  5. export GSM_CODEC_LIB := libgsmcodec-$(TARGET_NAME)$(LIBEXT)
  6. ifeq ($(PJ_SHARED_LIBRARIES),)
  7. else
  8. export GSM_CODEC_SONAME := libgsmcodec.$(SHLIB_SUFFIX)
  9. export GSM_CODEC_SHLIB := $(GSM_CODEC_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)../../gsm/inc \
  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 GSM_CODEC_SRCDIR = ../../gsm/src
  22. export GSM_CODEC_OBJS = add.o code.o decode.o \
  23. gsm_create.o gsm_decode.o gsm_destroy.o \
  24. gsm_encode.o gsm_explode.o gsm_implode.o \
  25. gsm_option.o long_term.o \
  26. lpc.o preprocess.o rpe.o short_term.o \
  27. table.o
  28. export GSM_CODEC_CFLAGS = -DSASR -DWAV49 -DNeedFunctionPrototypes=1 $(_CFLAGS)
  29. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  30. ###############################################################################
  31. # Main entry
  32. #
  33. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  34. #
  35. TARGETS := $(GSM_CODEC_LIB) $(GSM_CODEC_SONAME)
  36. all: $(TARGETS)
  37. doc:
  38. cd .. && doxygen docs/doxygen.cfg
  39. dep: depend
  40. distclean: realclean
  41. .PHONY: all dep depend clean realclean distclean
  42. .PHONY: $(TARGETS)
  43. .PHONE: $(GSM_CODEC_LIB) $(GSM_CODEC_SONAME)
  44. libgsmcodec: $(GSM_CODEC_LIB)
  45. $(GSM_CODEC_SONAME): $(GSM_CODEC_LIB)
  46. $(GSM_CODEC_LIB) $(GSM_CODEC_SONAME):
  47. $(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  48. clean print_lib:
  49. $(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $@
  50. realclean:
  51. $(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
  52. $(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $@
  53. depend:
  54. $(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $@