]> git.sesse.net Git - ffmpeg/blob - libavcodec/Makefile
added pcm codecs
[ffmpeg] / libavcodec / Makefile
1 include ../config.mak
2
3 CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H
4 LDFLAGS= -g
5
6 OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \
7       mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \
8       motion_est.o imgconvert.o imgresample.o msmpeg4.o \
9       mpeg12.o h263dec.o rv10.o mpegaudiodec.o pcm.o
10 ASM_OBJS=
11
12 # currently using libac3 for ac3 decoding
13 ifeq ($(CONFIG_AC3),yes)
14 OBJS+= ac3dec.o \
15        libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
16        libac3/imdct.o  libac3/parse.o
17 endif
18
19 # i386 mmx specific stuff
20 ifeq ($(TARGET_MMX),yes)
21 OBJS += i386/fdct_mmx.o i386/cputest.o \
22         i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
23         i386/idct_mmx.o i386/motion_est_mmx.o
24 endif
25
26 # armv4l specific stuff
27 ifeq ($(TARGET_ARCH_ARMV4L),yes)
28 ASM_OBJS += armv4l/jrevdct_arm.o
29 OBJS += armv4l/dsputil_arm.o
30 endif
31
32 # sun mediaLib specific stuff
33 # currently only works when libavcodec is used in mplayer
34 ifeq ($(HAVE_MLIB),yes)
35 OBJS += mlib/dsputil_mlib.o
36 CFLAGS += $(MLIB_INC)
37 endif
38
39 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
40
41 LIB= libavcodec.a
42 TESTS= imgresample-test dct-test motion-test
43
44 all: $(LIB)
45 tests: apiexample cpuid_test $(TESTS)
46
47 $(LIB): $(OBJS) $(ASM_OBJS)
48         rm -f $@
49         $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
50
51 dsputil.o: dsputil.c dsputil.h
52
53 %.o: %.c
54         $(CC) $(CFLAGS) -c -o $@ $< 
55
56 %.o: %.S
57         $(CC) $(CFLAGS) -c -o $@ $<
58
59 # depend only used by mplayer now
60 dep:    depend
61
62 depend:
63         $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
64
65 clean: 
66         rm -f *.o *~ *.a i386/*.o i386/*~ \
67            armv4l/*.o armv4l/*~ \
68            mlib/*.o mlib/*~ \
69            libac3/*.o libac3/*~ \
70            apiexample $(TESTS)
71
72 distclean: clean
73         rm -f Makefile.bak .depend
74
75 # api example program
76 apiexample: apiexample.c $(LIB)
77         $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
78
79 # cpuid test
80 cpuid_test: i386/cputest.c
81         $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
82
83 # testing progs
84
85 imgresample-test: imgresample.c
86         $(CC) $(CFLAGS) -DTEST -o $@ $^ 
87
88 dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \
89           fdctref.o jrevdct.o i386/idct_mmx.o
90         $(CC) -o $@ $^
91
92 motion-test: motion_test.o $(LIB)
93         $(CC) -o $@ $^
94
95 #
96 # include dependency files if they exist
97 #
98 ifneq ($(wildcard .depend),)
99 include .depend
100 endif