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.

74 lines
1.6KB

  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. OBJS+= ac3dec.o \
  11. libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
  12. libac3/imdct.o libac3/parse.o
  13. # currently using mpglib for mpeg audio decoding
  14. OBJS+= mpegaudiodec.o \
  15. mpglib/layer1.o mpglib/layer2.o mpglib/layer3.o \
  16. mpglib/dct64_i386.o mpglib/decode_i386.o mpglib/tabinit.o
  17. # i386 mmx specific stuff
  18. ifeq ($(TARGET_MMX),yes)
  19. ASM_OBJS += i386/fdct_mmx.o i386/sad_mmx.o
  20. OBJS += i386/fdctdata.o i386/cputest.o \
  21. i386/dsputil_mmx.o
  22. endif
  23. SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
  24. LIB= libavcodec.a
  25. TESTS= imgresample-test dct-test
  26. all: $(LIB) apiexample
  27. $(LIB): $(OBJS) $(ASM_OBJS)
  28. rm -f $@
  29. $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
  30. dsputil.o: dsputil.c dsputil.h
  31. %.o: %.c
  32. $(CC) $(CFLAGS) -c -o $@ $<
  33. %.o: %.s
  34. nasm -f elf -o $@ $<
  35. # depend only used by mplayer now
  36. dep: depend
  37. depend:
  38. $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
  39. clean:
  40. rm -f *.o *~ *.a i386/*.o i386/*~ \
  41. libac3/*.o libac3/*~ \
  42. mpglib/*.o mpglib/*~ \
  43. apiexample $(TESTS)
  44. distclean: clean
  45. rm -f Makefile.bak .depend
  46. # api example program
  47. apiexample: apiexample.c $(LIB)
  48. $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
  49. # testing progs
  50. imgresample-test: imgresample.c
  51. $(CC) $(CFLAGS) -DTEST -o $@ $^
  52. dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
  53. $(CC) -o $@ $^