fixing msmpeg4 decoding if fps < 16 (i thought it was a indicator for the ext header...
[libav.git] / libavcodec / Makefile
CommitLineData
980fc7b8
FB
1include ../config.mak
2
2b0c1a44 3CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H
de6d9b64
FB
4LDFLAGS= -g
5
6OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \
10b7b472 7 mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \
de6d9b64 8 motion_est.o imgconvert.o imgresample.o msmpeg4.o \
d962f6fd 9 mpeg12.o h263dec.o rv10.o mpegaudiodec.o pcm.o simple_idct.o
980fc7b8 10ASM_OBJS=
de6d9b64
FB
11
12# currently using libac3 for ac3 decoding
d771bcae 13ifeq ($(CONFIG_AC3),yes)
de6d9b64
FB
14OBJS+= ac3dec.o \
15 libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
16 libac3/imdct.o libac3/parse.o
d771bcae 17endif
de6d9b64 18
de6d9b64 19# i386 mmx specific stuff
980fc7b8 20ifeq ($(TARGET_MMX),yes)
4300403e 21OBJS += i386/fdct_mmx.o i386/cputest.o \
de1ee36a 22 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
d962f6fd
A
23 i386/idct_mmx.o i386/motion_est_mmx.o \
24 i386/simple_idct_mmx.o
de6d9b64
FB
25endif
26
3d03c0a2
FB
27# armv4l specific stuff
28ifeq ($(TARGET_ARCH_ARMV4L),yes)
29ASM_OBJS += armv4l/jrevdct_arm.o
30OBJS += armv4l/dsputil_arm.o
31endif
32
c34270f5
FB
33# sun mediaLib specific stuff
34# currently only works when libavcodec is used in mplayer
35ifeq ($(HAVE_MLIB),yes)
36OBJS += mlib/dsputil_mlib.o
37CFLAGS += $(MLIB_INC)
38endif
39
1e98dffb
NK
40# alpha specific stuff
41ifeq ($(TARGET_ARCH_ALPHA),yes)
42OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o
43CFLAGS += -Wa,-mpca56
44endif
45
980fc7b8
FB
46SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
47
de6d9b64 48LIB= libavcodec.a
0fd94442
NK
49ifeq ($(BUILD_SHARED),yes)
50SLIB= libffmpeg-$(VERSION).so
51endif
4300403e 52TESTS= imgresample-test dct-test motion-test
de6d9b64 53
0fd94442 54all: $(LIB) $(SLIB)
c10e9f70 55tests: apiexample cpuid_test $(TESTS)
de6d9b64 56
980fc7b8 57$(LIB): $(OBJS) $(ASM_OBJS)
de6d9b64 58 rm -f $@
980fc7b8 59 $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
de6d9b64 60
0fd94442
NK
61$(SLIB): $(OBJS) $(ASM_OBJS)
62 rm -f $@
63 $(CC) -shared -o $@ $(OBJS) $(ASM_OBJS)
64 ln -sf $@ libffmpeg.so
de6d9b64
FB
65dsputil.o: dsputil.c dsputil.h
66
67%.o: %.c
68 $(CC) $(CFLAGS) -c -o $@ $<
69
3d03c0a2
FB
70%.o: %.S
71 $(CC) $(CFLAGS) -c -o $@ $<
72
980fc7b8
FB
73# depend only used by mplayer now
74dep: depend
75
76depend:
77 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
78
de6d9b64 79clean:
0fd94442 80 rm -f *.o *~ $(LIB) $(SLIB) *.so i386/*.o i386/*~ \
3d03c0a2 81 armv4l/*.o armv4l/*~ \
c34270f5 82 mlib/*.o mlib/*~ \
1e98dffb 83 alpha/*.o alpha/*~ \
de6d9b64 84 libac3/*.o libac3/*~ \
de6d9b64
FB
85 apiexample $(TESTS)
86
980fc7b8
FB
87distclean: clean
88 rm -f Makefile.bak .depend
89
de6d9b64
FB
90# api example program
91apiexample: apiexample.c $(LIB)
92 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
93
c10e9f70
NK
94# cpuid test
95cpuid_test: i386/cputest.c
96 $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
97
de6d9b64
FB
98# testing progs
99
100imgresample-test: imgresample.c
101 $(CC) $(CFLAGS) -DTEST -o $@ $^
102
4300403e 103dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \
de1ee36a 104 fdctref.o jrevdct.o i386/idct_mmx.o
de6d9b64 105 $(CC) -o $@ $^
d771bcae 106
4300403e
FB
107motion-test: motion_test.o $(LIB)
108 $(CC) -o $@ $^
109
0fd94442 110install: all
f840692f 111# install -m 644 $(LIB) $(prefix)/lib
0fd94442
NK
112ifeq ($(BUILD_SHARED),yes)
113 install -s -m 755 $(SLIB) $(prefix)/lib
114 ln -sf $(prefix)/lib/$(SLIB) $(prefix)/lib/libffmpeg.so
115 ldconfig
f840692f
NK
116 mkdir -p $(prefix)/include/libffmpeg
117 install -m 644 avcodec.h $(prefix)/include/libffmpeg/avcodec.h
18c599db 118 install -m 644 common.h $(prefix)/include/libffmpeg/common.h
0fd94442 119endif
d771bcae
FB
120#
121# include dependency files if they exist
122#
123ifneq ($(wildcard .depend),)
124include .depend
125endif