You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.0KB

  1. include ../config.mak
  2. CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H
  3. LDFLAGS= -g
  4. OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \
  5. mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \
  6. motion_est.o imgconvert.o imgresample.o msmpeg4.o \
  7. mpeg12.o h263dec.o rv10.o mpegaudiodec.o
  8. ASM_OBJS=
  9. # currently using libac3 for ac3 decoding
  10. ifeq ($(CONFIG_AC3),yes)
  11. OBJS+= ac3dec.o \
  12. libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
  13. libac3/imdct.o libac3/parse.o
  14. endif
  15. # i386 mmx specific stuff
  16. ifeq ($(TARGET_MMX),yes)
  17. OBJS += i386/fdct_mmx.o i386/cputest.o \
  18. i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
  19. i386/idct_mmx.o i386/motion_est_mmx.o
  20. endif
  21. # armv4l specific stuff
  22. ifeq ($(TARGET_ARCH_ARMV4L),yes)
  23. ASM_OBJS += armv4l/jrevdct_arm.o
  24. OBJS += armv4l/dsputil_arm.o
  25. endif
  26. SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
  27. LIB= libavcodec.a
  28. TESTS= imgresample-test dct-test motion-test
  29. all: $(LIB)
  30. tests: apiexample cpuid_test $(TESTS)
  31. $(LIB): $(OBJS) $(ASM_OBJS)
  32. rm -f $@
  33. $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
  34. dsputil.o: dsputil.c dsputil.h
  35. %.o: %.c
  36. $(CC) $(CFLAGS) -c -o $@ $<
  37. %.o: %.S
  38. $(CC) $(CFLAGS) -c -o $@ $<
  39. # depend only used by mplayer now
  40. dep: depend
  41. depend:
  42. $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
  43. clean:
  44. rm -f *.o *~ *.a i386/*.o i386/*~ \
  45. armv4l/*.o armv4l/*~ \
  46. libac3/*.o libac3/*~ \
  47. mpglib/*.o mpglib/*~ \
  48. apiexample $(TESTS)
  49. distclean: clean
  50. rm -f Makefile.bak .depend
  51. # api example program
  52. apiexample: apiexample.c $(LIB)
  53. $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
  54. # cpuid test
  55. cpuid_test: i386/cputest.c
  56. $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
  57. # testing progs
  58. imgresample-test: imgresample.c
  59. $(CC) $(CFLAGS) -DTEST -o $@ $^
  60. dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \
  61. fdctref.o jrevdct.o i386/idct_mmx.o
  62. $(CC) -o $@ $^
  63. motion-test: motion_test.o $(LIB)
  64. $(CC) -o $@ $^
  65. #
  66. # include dependency files if they exist
  67. #
  68. ifneq ($(wildcard .depend),)
  69. include .depend
  70. endif