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.

85 lines
1.8KB

  1. include ../config.mak
  2. CFLAGS= $(OPTFLAGS) -Wall -g
  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
  26. endif
  27. SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
  28. LIB= libavcodec.a
  29. TESTS= imgresample-test dct-test
  30. all: $(LIB) apiexample
  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. nasm -f elf -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. libac3/*.o libac3/*~ \
  46. mpglib/*.o mpglib/*~ \
  47. apiexample $(TESTS)
  48. distclean: clean
  49. rm -f Makefile.bak .depend
  50. # api example program
  51. apiexample: apiexample.c $(LIB)
  52. $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
  53. # testing progs
  54. imgresample-test: imgresample.c
  55. $(CC) $(CFLAGS) -DTEST -o $@ $^
  56. dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
  57. $(CC) -o $@ $^
  58. #
  59. # include dependency files if they exist
  60. #
  61. ifneq ($(wildcard .depend),)
  62. include .depend
  63. endif