linux.mk 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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_neon64.o \
  14. source/compare_neon.o \
  15. source/compare_win.o \
  16. source/convert_argb.o \
  17. source/convert.o \
  18. source/convert_from_argb.o \
  19. source/convert_from.o \
  20. source/convert_jpeg.o \
  21. source/convert_to_argb.o \
  22. source/convert_to_i420.o \
  23. source/cpu_id.o \
  24. source/mjpeg_decoder.o \
  25. source/mjpeg_validate.o \
  26. source/planar_functions.o \
  27. source/rotate_any.o \
  28. source/rotate_argb.o \
  29. source/rotate.o \
  30. source/rotate_common.o \
  31. source/rotate_gcc.o \
  32. source/rotate_mips.o \
  33. source/rotate_neon64.o \
  34. source/rotate_neon.o \
  35. source/rotate_win.o \
  36. source/row_any.o \
  37. source/row_common.o \
  38. source/row_gcc.o \
  39. source/row_mips.o \
  40. source/row_neon64.o \
  41. source/row_neon.o \
  42. source/row_win.o \
  43. source/scale_any.o \
  44. source/scale_argb.o \
  45. source/scale.o \
  46. source/scale_common.o \
  47. source/scale_gcc.o \
  48. source/scale_mips.o \
  49. source/scale_neon64.o \
  50. source/scale_neon.o \
  51. source/scale_win.o \
  52. source/video_common.o
  53. .cc.o:
  54. $(CXX) -c $(CXXFLAGS) $*.cc -o $*.o
  55. .c.o:
  56. $(CC) -c $(CFLAGS) $*.c -o $*.o
  57. all: libyuv.a convert cpuid psnr
  58. libyuv.a: $(LOCAL_OBJ_FILES)
  59. $(AR) $(ARFLAGS) $@ $(LOCAL_OBJ_FILES)
  60. # A C++ test utility that uses libyuv conversion.
  61. convert: util/convert.cc libyuv.a
  62. $(CXX) $(CXXFLAGS) -Iutil/ -o $@ util/convert.cc libyuv.a
  63. # A standalone test utility
  64. psnr: util/psnr.cc
  65. $(CXX) $(CXXFLAGS) -Iutil/ -o $@ util/psnr.cc util/psnr_main.cc util/ssim.cc
  66. # A C test utility that uses libyuv conversion from C.
  67. cpuid: util/cpuid.c libyuv.a
  68. $(CC) $(CFLAGS) -o $@ util/cpuid.c libyuv.a
  69. clean:
  70. /bin/rm -f source/*.o *.ii *.s libyuv.a convert cpuid psnr