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.

60 lines
1.4KB

  1. include ../config.mk
  2. CFLAGS= -O2 -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. # currently using libac3 for ac3 decoding
  9. OBJS+= ac3dec.o \
  10. libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
  11. libac3/imdct.o libac3/parse.o
  12. # currently using mpglib for mpeg audio decoding
  13. OBJS+= mpegaudiodec.o \
  14. mpglib/layer1.o mpglib/layer2.o mpglib/layer3.o \
  15. mpglib/dct64_i386.o mpglib/decode_i386.o mpglib/tabinit.o
  16. # i386 mmx specific stuff
  17. ifdef CONFIG_MMX
  18. OBJS += i386/fdct_mmx.o i386/fdctdata.o i386/sad_mmx.o i386/cputest.o \
  19. i386/dsputil_mmx.o
  20. endif
  21. LIB= libavcodec.a
  22. TESTS= imgresample-test dct-test
  23. all: $(LIB) apiexample
  24. $(LIB): $(OBJS)
  25. rm -f $@
  26. $(AR) rcs $@ $(OBJS)
  27. dsputil.o: dsputil.c dsputil.h
  28. %.o: %.c
  29. $(CC) $(CFLAGS) -c -o $@ $<
  30. %.o: %.s
  31. nasm -f elf -o $@ $<
  32. clean:
  33. rm -f *.o *~ *.a i386/*.o i386/*~ \
  34. libac3/*.o libac3/*~ \
  35. mpglib/*.o mpglib/*~ \
  36. apiexample $(TESTS)
  37. # api example program
  38. apiexample: apiexample.c $(LIB)
  39. $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
  40. # testing progs
  41. imgresample-test: imgresample.c
  42. $(CC) $(CFLAGS) -DTEST -o $@ $^
  43. dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
  44. $(CC) -o $@ $^