linux.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. # gcc 4.4 and older require -fno-exceptions to avoid link error on __gxx_personality_v0
  68. # CC=gcc-4.4 CXXFLAGS=-fno-exceptions CXX=g++-4.4 make -f linux.mk
  69. cpuid: util/cpuid.c libyuv.a
  70. $(CC) $(CFLAGS) -o $@ util/cpuid.c libyuv.a
  71. clean:
  72. /bin/rm -f source/*.o *.ii *.s libyuv.a convert cpuid psnr