fixed symetric quantization (better quality!)
[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 \
c8fbc22d 9 mpeg12.o h263dec.o rv10.o mpegaudiodec.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 \
4300403e 23 i386/idct_mmx.o i386/motion_est_mmx.o
de6d9b64
FB
24endif
25
3d03c0a2
FB
26# armv4l specific stuff
27ifeq ($(TARGET_ARCH_ARMV4L),yes)
28ASM_OBJS += armv4l/jrevdct_arm.o
29OBJS += armv4l/dsputil_arm.o
30endif
31
980fc7b8
FB
32SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
33
de6d9b64 34LIB= libavcodec.a
4300403e 35TESTS= imgresample-test dct-test motion-test
de6d9b64 36
54329dd5 37all: $(LIB)
c10e9f70 38tests: apiexample cpuid_test $(TESTS)
de6d9b64 39
980fc7b8 40$(LIB): $(OBJS) $(ASM_OBJS)
de6d9b64 41 rm -f $@
980fc7b8 42 $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
de6d9b64
FB
43
44dsputil.o: dsputil.c dsputil.h
45
46%.o: %.c
47 $(CC) $(CFLAGS) -c -o $@ $<
48
3d03c0a2
FB
49%.o: %.S
50 $(CC) $(CFLAGS) -c -o $@ $<
51
980fc7b8
FB
52# depend only used by mplayer now
53dep: depend
54
55depend:
56 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
57
de6d9b64
FB
58clean:
59 rm -f *.o *~ *.a i386/*.o i386/*~ \
3d03c0a2 60 armv4l/*.o armv4l/*~ \
de6d9b64
FB
61 libac3/*.o libac3/*~ \
62 mpglib/*.o mpglib/*~ \
63 apiexample $(TESTS)
64
980fc7b8
FB
65distclean: clean
66 rm -f Makefile.bak .depend
67
de6d9b64
FB
68# api example program
69apiexample: apiexample.c $(LIB)
70 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
71
c10e9f70
NK
72# cpuid test
73cpuid_test: i386/cputest.c
74 $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
75
de6d9b64
FB
76# testing progs
77
78imgresample-test: imgresample.c
79 $(CC) $(CFLAGS) -DTEST -o $@ $^
80
4300403e 81dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \
de1ee36a 82 fdctref.o jrevdct.o i386/idct_mmx.o
de6d9b64 83 $(CC) -o $@ $^
d771bcae 84
4300403e
FB
85motion-test: motion_test.o $(LIB)
86 $(CC) -o $@ $^
87
d771bcae
FB
88#
89# include dependency files if they exist
90#
91ifneq ($(wildcard .depend),)
92include .depend
93endif