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.

86 lines
1.8KB

  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 mjpegenc.o resample.o dsputil.o \
  6. motion_est.o imgconvert.o imgresample.o msmpeg4.o \
  7. mpeg12.o h263dec.o rv10.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. # currently using mpglib for mpeg audio decoding
  16. ifeq ($(CONFIG_MPGLIB),yes)
  17. OBJS+= mpegaudiodec.o \
  18. mpglib/layer1.o mpglib/layer2.o mpglib/layer3.o \
  19. mpglib/dct64_i386.o mpglib/decode_i386.o mpglib/tabinit.o
  20. endif
  21. # i386 mmx specific stuff
  22. ifeq ($(TARGET_MMX),yes)
  23. ASM_OBJS += i386/fdct_mmx.o i386/sad_mmx.o
  24. OBJS += i386/fdctdata.o i386/cputest.o \
  25. i386/dsputil_mmx.o i386/mpegvideo_mmx.o
  26. endif
  27. SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
  28. LIB= libavcodec.a
  29. TESTS= imgresample-test dct-test
  30. all: $(LIB)
  31. tests: apiexample $(TESTS)
  32. $(LIB): $(OBJS) $(ASM_OBJS)
  33. rm -f $@
  34. $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
  35. dsputil.o: dsputil.c dsputil.h
  36. %.o: %.c
  37. $(CC) $(CFLAGS) -c -o $@ $<
  38. %.o: %.s
  39. nasm -f elf -o $@ $<
  40. # depend only used by mplayer now
  41. dep: depend
  42. depend:
  43. $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
  44. clean:
  45. rm -f *.o *~ *.a i386/*.o i386/*~ \
  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. # testing progs
  55. imgresample-test: imgresample.c
  56. $(CC) $(CFLAGS) -DTEST -o $@ $^
  57. dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
  58. $(CC) -o $@ $^
  59. #
  60. # include dependency files if they exist
  61. #
  62. ifneq ($(wildcard .depend),)
  63. include .depend
  64. endif