Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. export LIBDIR := ../../lib
  4. RULES_MAK := $(PJDIR)/build/rules.mak
  5. export YUV_LIB := libyuv-$(TARGET_NAME)$(LIBEXT)
  6. ifeq ($(PJ_SHARED_LIBRARIES),)
  7. else
  8. export YUV_SONAME := libyuv.$(SHLIB_SUFFIX)
  9. export YUV_SHLIB := $(YUV_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)../../yuv/include \
  16. $(CC_INC)../../../pjlib/include
  17. export _CXXFLAGS:= $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
  18. $(HOST_CXXFLAGS) $(CXXFLAGS) $(_CFLAGS)
  19. export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
  20. $(LDFLAGS)
  21. export YUV_SRCDIR = ../../yuv/source
  22. export YUV_OBJS = \
  23. compare.o \
  24. compare_common.o \
  25. compare_gcc.o \
  26. compare_neon64.o \
  27. compare_neon.o \
  28. compare_win.o \
  29. convert_argb.o \
  30. convert.o \
  31. convert_from_argb.o \
  32. convert_from.o \
  33. convert_jpeg.o \
  34. convert_to_argb.o \
  35. convert_to_i420.o \
  36. cpu_id.o \
  37. mjpeg_decoder.o \
  38. mjpeg_validate.o \
  39. planar_functions.o \
  40. rotate_any.o \
  41. rotate_argb.o \
  42. rotate.o \
  43. rotate_common.o \
  44. rotate_gcc.o \
  45. rotate_dspr2.o \
  46. rotate_neon64.o \
  47. rotate_neon.o \
  48. rotate_win.o \
  49. row_any.o \
  50. row_common.o \
  51. row_gcc.o \
  52. row_dspr2.o \
  53. row_neon64.o \
  54. row_neon.o \
  55. row_win.o \
  56. scale_any.o \
  57. scale_argb.o \
  58. scale.o \
  59. scale_common.o \
  60. scale_gcc.o \
  61. scale_dspr2.o \
  62. scale_neon64.o \
  63. scale_neon.o \
  64. scale_win.o \
  65. video_common.o
  66. export YUV_CFLAGS = -fomit-frame-pointer -fno-strict-aliasing -Wno-memset-elt-size -Wno-unknown-warning-option -Wno-pragmas $(_CFLAGS)
  67. export YUV_CXXFLAGS = -fomit-frame-pointer -fno-strict-aliasing -Wno-memset-elt-size -Wno-unknown-warning-option -Wno-pragmas $(_CXXFLAGS)
  68. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  69. ###############################################################################
  70. # Main entry
  71. #
  72. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  73. #
  74. TARGETS := $(YUV_LIB) $(YUV_SONAME)
  75. all: $(TARGETS)
  76. doc:
  77. cd .. && doxygen docs/doxygen.cfg
  78. dep: depend
  79. distclean: realclean
  80. .PHONY: all dep depend clean realclean distclean
  81. .PHONY: $(TARGETS)
  82. .PHONY: $(YUV_LIB) $(YUV_SONAME)
  83. libyuv: $(YUV_LIB)
  84. $(YUV_SONAME): $(YUV_LIB)
  85. $(YUV_LIB) $(YUV_SONAME):
  86. $(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  87. clean print_lib:
  88. $(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
  89. realclean:
  90. $(subst @@,$(subst /,$(HOST_PSEP),.yuv-$(TARGET_NAME).depend),$(HOST_RMR))
  91. $(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
  92. depend:
  93. $(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@