linux.mk 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # This is a generic makefile for libyuv for gcc.
  2. # make -f linux.mk CXX=clang++
  3. CC?=gcc
  4. CFLAGS?=-O2 -fomit-frame-pointer
  5. CFLAGS+=-Iinclude/
  6. CXX?=g++
  7. CXXFLAGS?=-O2 -fomit-frame-pointer
  8. CXXFLAGS+=-Iinclude/
  9. LOCAL_OBJ_FILES := \
  10. source/compare.o \
  11. source/compare_common.o \
  12. source/compare_gcc.o \
  13. source/compare_mmi.o \
  14. source/compare_msa.o \
  15. source/compare_neon64.o \
  16. source/compare_neon.o \
  17. source/compare_win.o \
  18. source/convert_argb.o \
  19. source/convert.o \
  20. source/convert_from_argb.o \
  21. source/convert_from.o \
  22. source/convert_jpeg.o \
  23. source/convert_to_argb.o \
  24. source/convert_to_i420.o \
  25. source/cpu_id.o \
  26. source/mjpeg_decoder.o \
  27. source/mjpeg_validate.o \
  28. source/planar_functions.o \
  29. source/rotate_any.o \
  30. source/rotate_argb.o \
  31. source/rotate.o \
  32. source/rotate_common.o \
  33. source/rotate_gcc.o \
  34. source/rotate_mmi.o \
  35. source/rotate_msa.o \
  36. source/rotate_neon64.o \
  37. source/rotate_neon.o \
  38. source/rotate_win.o \
  39. source/row_any.o \
  40. source/row_common.o \
  41. source/row_gcc.o \
  42. source/row_mmi.o \
  43. source/row_msa.o \
  44. source/row_neon64.o \
  45. source/row_neon.o \
  46. source/row_win.o \
  47. source/scale_any.o \
  48. source/scale_argb.o \
  49. source/scale.o \
  50. source/scale_common.o \
  51. source/scale_gcc.o \
  52. source/scale_mmi.o \
  53. source/scale_msa.o \
  54. source/scale_neon64.o \
  55. source/scale_neon.o \
  56. source/scale_win.o \
  57. source/video_common.o
  58. .cc.o:
  59. $(CXX) -c $(CXXFLAGS) $*.cc -o $*.o
  60. .c.o:
  61. $(CC) -c $(CFLAGS) $*.c -o $*.o
  62. all: libyuv.a yuvconvert cpuid psnr
  63. libyuv.a: $(LOCAL_OBJ_FILES)
  64. $(AR) $(ARFLAGS) $@ $(LOCAL_OBJ_FILES)
  65. # A C++ test utility that uses libyuv conversion.
  66. yuvconvert: util/yuvconvert.cc libyuv.a
  67. $(CXX) $(CXXFLAGS) -Iutil/ -o $@ util/yuvconvert.cc libyuv.a
  68. # A standalone test utility
  69. psnr: util/psnr.cc
  70. $(CXX) $(CXXFLAGS) -Iutil/ -o $@ util/psnr.cc util/psnr_main.cc util/ssim.cc
  71. # A C test utility that uses libyuv conversion from C.
  72. # gcc 4.4 and older require -fno-exceptions to avoid link error on __gxx_personality_v0
  73. # CC=gcc-4.4 CXXFLAGS=-fno-exceptions CXX=g++-4.4 make -f linux.mk
  74. cpuid: util/cpuid.c libyuv.a
  75. $(CC) $(CFLAGS) -o $@ util/cpuid.c libyuv.a
  76. clean:
  77. /bin/rm -f source/*.o *.ii *.s libyuv.a yuvconvert cpuid psnr