Statistics
| Branch: | Revision:

ffmpeg / libavcodec / Makefile @ 13b54752

History | View | Annotate | Download (1.9 KB)

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
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
# currently using mpglib for mpeg audio decoding
20
ifeq ($(CONFIG_MPGLIB),yes)
21
OBJS+= mpegaudiodec.o \
22
       mpglib/layer1.o mpglib/layer2.o mpglib/layer3.o \
23
       mpglib/dct64_i386.o mpglib/decode_i386.o  mpglib/tabinit.o
24
endif
25

    
26
# i386 mmx specific stuff
27
ifeq ($(TARGET_MMX),yes)
28
ASM_OBJS += i386/fdct_mmx.o i386/sad_mmx.o
29
OBJS += i386/fdctdata.o i386/cputest.o \
30
	i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
31
        i386/idct_mmx.o
32
endif
33

    
34
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
35

    
36
LIB= libavcodec.a
37
TESTS= imgresample-test dct-test
38

    
39
all: $(LIB)
40
tests: apiexample $(TESTS)
41

    
42
$(LIB): $(OBJS) $(ASM_OBJS)
43
	rm -f $@
44
	$(AR) rcs $@ $(OBJS) $(ASM_OBJS)
45

    
46
dsputil.o: dsputil.c dsputil.h
47

    
48
%.o: %.c
49
	$(CC) $(CFLAGS) -c -o $@ $< 
50

    
51
%.o: %.s
52
	nasm -f elf -o $@ $<
53

    
54
# depend only used by mplayer now
55
dep:	depend
56

    
57
depend:
58
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
59

    
60
clean: 
61
	rm -f *.o *~ *.a i386/*.o i386/*~ \
62
           libac3/*.o libac3/*~ \
63
           mpglib/*.o mpglib/*~ \
64
           apiexample $(TESTS)
65

    
66
distclean: clean
67
	rm -f Makefile.bak .depend
68

    
69
# api example program
70
apiexample: apiexample.c $(LIB)
71
	$(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
72

    
73
# testing progs
74

    
75
imgresample-test: imgresample.c
76
	$(CC) $(CFLAGS) -DTEST -o $@ $^ 
77

    
78
dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o \
79
          fdctref.o jrevdct.o i386/idct_mmx.o
80
	$(CC) -o $@ $^
81

    
82
#
83
# include dependency files if they exist
84
#
85
ifneq ($(wildcard .depend),)
86
include .depend
87
endif