Statistics
| Branch: | Revision:

ffmpeg / libavcodec / Makefile @ d771bcae

History | View | Annotate | Download (1.78 KB)

1 980fc7b8 Fabrice Bellard
include ../config.mak
2
3
CFLAGS= $(OPTFLAGS) -Wall -g
4 de6d9b64 Fabrice Bellard
LDFLAGS= -g
5
6
OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \
7
      mpegaudio.o ac3enc.o mjpegenc.o resample.o dsputil.o \
8
      motion_est.o imgconvert.o imgresample.o msmpeg4.o \
9
      mpeg12.o h263dec.o rv10.o
10 980fc7b8 Fabrice Bellard
ASM_OBJS=
11 de6d9b64 Fabrice Bellard
12
# currently using libac3 for ac3 decoding
13 d771bcae Fabrice Bellard
ifeq ($(CONFIG_AC3),yes)
14 de6d9b64 Fabrice Bellard
OBJS+= ac3dec.o \
15
       libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
16
       libac3/imdct.o  libac3/parse.o
17 d771bcae Fabrice Bellard
endif
18 de6d9b64 Fabrice Bellard
19
# currently using mpglib for mpeg audio decoding
20 d771bcae Fabrice Bellard
ifeq ($(CONFIG_MPGLIB),yes)
21 de6d9b64 Fabrice Bellard
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 d771bcae Fabrice Bellard
endif
25 de6d9b64 Fabrice Bellard
26
# i386 mmx specific stuff
27 980fc7b8 Fabrice Bellard
ifeq ($(TARGET_MMX),yes)
28
ASM_OBJS += i386/fdct_mmx.o i386/sad_mmx.o
29
OBJS += i386/fdctdata.o i386/cputest.o \
30 de6d9b64 Fabrice Bellard
	i386/dsputil_mmx.o
31
endif
32
33 980fc7b8 Fabrice Bellard
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
34
35 de6d9b64 Fabrice Bellard
LIB= libavcodec.a
36
TESTS= imgresample-test dct-test
37
38
all: $(LIB) apiexample
39
40 980fc7b8 Fabrice Bellard
$(LIB): $(OBJS) $(ASM_OBJS)
41 de6d9b64 Fabrice Bellard
	rm -f $@
42 980fc7b8 Fabrice Bellard
	$(AR) rcs $@ $(OBJS) $(ASM_OBJS)
43 de6d9b64 Fabrice Bellard
44
dsputil.o: dsputil.c dsputil.h
45
46
%.o: %.c
47
	$(CC) $(CFLAGS) -c -o $@ $< 
48
49
%.o: %.s
50
	nasm -f elf -o $@ $<
51
52 980fc7b8 Fabrice Bellard
# depend only used by mplayer now
53
dep:	depend
54
55
depend:
56
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
57
58 de6d9b64 Fabrice Bellard
clean: 
59
	rm -f *.o *~ *.a i386/*.o i386/*~ \
60
           libac3/*.o libac3/*~ \
61
           mpglib/*.o mpglib/*~ \
62
           apiexample $(TESTS)
63
64 980fc7b8 Fabrice Bellard
distclean: clean
65
	rm -f Makefile.bak .depend
66
67 de6d9b64 Fabrice Bellard
# api example program
68
apiexample: apiexample.c $(LIB)
69
	$(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
70
71
# testing progs
72
73
imgresample-test: imgresample.c
74
	$(CC) $(CFLAGS) -DTEST -o $@ $^ 
75
76
dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
77
	$(CC) -o $@ $^
78 d771bcae Fabrice Bellard
79
#
80
# include dependency files if they exist
81
#
82
ifneq ($(wildcard .depend),)
83
include .depend
84
endif