Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. export LIBDIR := ../../lib
  4. RULES_MAK := $(PJDIR)/build/rules.mak
  5. export G7221_CODEC_LIB := libg7221codec-$(TARGET_NAME)$(LIBEXT)
  6. ifeq ($(PJ_SHARED_LIBRARIES),)
  7. else
  8. export G7221_CODEC_SONAME := libg7221codec.$(SHLIB_SUFFIX)
  9. export G7221_CODEC_SHLIB := $(G7221_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)../../g7221/common \
  16. $(CC_INC)../../g7221/common/stl-files \
  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. $(LDFLAGS)
  22. export G7221_CODEC_SRCDIR = ../../g7221
  23. export G7221_CODEC_OBJS = common/common.o common/huff_tab.o common/tables.o \
  24. common/basic_op.o \
  25. decode/coef2sam.o decode/dct4_s.o decode/decoder.o \
  26. encode/dct4_a.o encode/sam2coef.o encode/encoder.o
  27. export G7221_CODEC_CFLAGS = $(_CFLAGS)
  28. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  29. ###############################################################################
  30. # Main entry
  31. #
  32. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  33. #
  34. TARGETS := $(G7221_CODEC_LIB) $(G7221_CODEC_SONAME)
  35. all: $(TARGETS)
  36. doc:
  37. cd .. && doxygen docs/doxygen.cfg
  38. dep: depend
  39. distclean: realclean
  40. .PHONY: all dep depend clean realclean distclean
  41. .PHONY: $(TARGETS)
  42. .PHONY: $(G7221_CODEC_LIB) $(G7221_CODEC_SONAME)
  43. libg7221codec: $(G7221_CODEC_LIB)
  44. $(G7221_CODEC_SONAME): $(G7221_CODEC_LIB)
  45. $(G7221_CODEC_LIB) $(G7221_CODEC_SONAME):
  46. $(MAKE) -f $(RULES_MAK) APP=G7221_CODEC app=libg7221codec $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  47. clean print_lib:
  48. $(MAKE) -f $(RULES_MAK) APP=G7221_CODEC app=libg7221codec $@
  49. realclean:
  50. $(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
  51. $(MAKE) -f $(RULES_MAK) APP=G7221_CODEC app=libg7221codec $@
  52. depend:
  53. $(MAKE) -f $(RULES_MAK) APP=G7221_CODEC app=libg7221codec $@