0
|
1 include ../config.mk
|
|
2 CFLAGS= -O2 -Wall -g
|
|
3 LDFLAGS= -g
|
|
4
|
|
5 OBJS= 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
|
|
11 OBJS+= 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
|
|
16 OBJS+= 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
|
|
21 ifdef CONFIG_MMX
|
|
22 OBJS += i386/fdct_mmx.o i386/fdctdata.o i386/sad_mmx.o i386/cputest.o \
|
|
23 i386/dsputil_mmx.o
|
|
24 endif
|
|
25
|
|
26 LIB= libavcodec.a
|
|
27 TESTS= imgresample-test dct-test
|
|
28
|
|
29 all: $(LIB) apiexample
|
|
30
|
|
31 $(LIB): $(OBJS)
|
|
32 rm -f $@
|
|
33 $(AR) rcs $@ $(OBJS)
|
|
34
|
|
35 dsputil.o: dsputil.c dsputil.h
|
|
36
|
|
37 %.o: %.c
|
|
38 $(CC) $(CFLAGS) -c -o $@ $<
|
|
39
|
|
40 %.o: %.s
|
|
41 nasm -f elf -o $@ $<
|
|
42
|
|
43 clean:
|
|
44 rm -f *.o *~ *.a i386/*.o i386/*~ \
|
|
45 libac3/*.o libac3/*~ \
|
|
46 mpglib/*.o mpglib/*~ \
|
|
47 apiexample $(TESTS)
|
|
48
|
|
49 # api example program
|
|
50 apiexample: apiexample.c $(LIB)
|
|
51 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
|
|
52
|
|
53 # testing progs
|
|
54
|
|
55 imgresample-test: imgresample.c
|
|
56 $(CC) $(CFLAGS) -DTEST -o $@ $^
|
|
57
|
|
58 dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
|
|
59 $(CC) -o $@ $^
|