Initial revision
[libav.git] / libavcodec / Makefile
CommitLineData
de6d9b64
FB
1include ../config.mk
2CFLAGS= -O2 -Wall -g
3LDFLAGS= -g
4
5OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \
6 mpegaudio.o ac3enc.o mjpegenc.o resample.o dsputil.o \
7 motion_est.o imgconvert.o imgresample.o msmpeg4.o \
8 mpeg12.o h263dec.o rv10.o
9
10# currently using libac3 for ac3 decoding
11OBJS+= ac3dec.o \
12 libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
13 libac3/imdct.o libac3/parse.o
14
15# currently using mpglib for mpeg audio decoding
16OBJS+= mpegaudiodec.o \
17 mpglib/layer1.o mpglib/layer2.o mpglib/layer3.o \
18 mpglib/dct64_i386.o mpglib/decode_i386.o mpglib/tabinit.o
19
20# i386 mmx specific stuff
21ifdef CONFIG_MMX
22OBJS += i386/fdct_mmx.o i386/fdctdata.o i386/sad_mmx.o i386/cputest.o \
23 i386/dsputil_mmx.o
24endif
25
26LIB= libavcodec.a
27TESTS= imgresample-test dct-test
28
29all: $(LIB) apiexample
30
31$(LIB): $(OBJS)
32 rm -f $@
33 $(AR) rcs $@ $(OBJS)
34
35dsputil.o: dsputil.c dsputil.h
36
37%.o: %.c
38 $(CC) $(CFLAGS) -c -o $@ $<
39
40%.o: %.s
41 nasm -f elf -o $@ $<
42
43clean:
44 rm -f *.o *~ *.a i386/*.o i386/*~ \
45 libac3/*.o libac3/*~ \
46 mpglib/*.o mpglib/*~ \
47 apiexample $(TESTS)
48
49# api example program
50apiexample: apiexample.c $(LIB)
51 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
52
53# testing progs
54
55imgresample-test: imgresample.c
56 $(CC) $(CFLAGS) -DTEST -o $@ $^
57
58dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
59 $(CC) -o $@ $^