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