3
CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H
7
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) -o $@
9
OBJS= common.lo utils.lo mpegvideo.lo h263.lo jrevdct.lo jfdctfst.lo \
10
mpegaudio.lo ac3enc.lo mjpeg.lo resample.lo dsputil.lo \
11
motion_est.lo imgconvert.lo imgresample.lo msmpeg4.lo \
12
mpeg12.lo h263dec.lo rv10.lo
15
# currently using libac3 for ac3 decoding
16
ifeq ($(CONFIG_AC3),yes)
18
libac3/bit_allocate.lo libac3/bitstream.lo libac3/downmix.lo \
19
libac3/imdct.lo libac3/parse.lo
22
# currently using mpglib for mpeg audio decoding
23
ifeq ($(CONFIG_MPGLIB),yes)
24
OBJS+= mpegaudiodec.lo \
25
mpglib/layer1.lo mpglib/layer2.lo mpglib/layer3.lo \
26
mpglib/dct64_i386.lo mpglib/decode_i386.lo mpglib/tabinit.lo
29
# i386 mmx specific stuff
30
ifeq ($(TARGET_MMX),yes)
31
ASM_OBJS += i386/fdct_mmx.lo i386/sad_mmx.lo
32
OBJS += i386/fdctdata.lo i386/cputest.lo \
33
i386/dsputil_mmx.lo i386/mpegvideo_mmx.lo \
37
# armv4l specific stuff
38
ifeq ($(TARGET_ARCH_ARMV4L),yes)
39
ASM_OBJS += armv4l/jrevdct_arm.lo
40
OBJS += armv4l/dsputil_arm.lo
43
SRCS = $(OBJS:.lo=.c) $(ASM_OBJS:.lo=.s)
46
TESTS= imgresample-test dct-test
49
tests: apiexample cpuid_test $(TESTS)
51
$(LIB): $(OBJS) $(ASM_OBJS)
53
$(LINK) $(OBJS) $(ASM_OBJS)
55
dsputil.o: dsputil.c dsputil.h
58
$(CC) $(CFLAGS) -c -o $@ $<
61
$(CC) $(CFLAGS) -c -o $@ $<
67
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
70
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
73
$(LIBTOOL) --mode=compile nasm -f elf -o $@ $<
75
# depend only used by mplayer now
79
$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
82
rm -f *.o *.lo *~ *.a i386/*.o i386/*~ \
83
armv4l/*.o armv4l/*~ \
84
libac3/*.o libac3/*~ \
85
mpglib/*.o mpglib/*~ \
89
rm -f Makefile.bak .depend
92
apiexample: apiexample.c $(LIB)
93
$(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
96
cpuid_test: i386/cputest.c
97
$(CC) $(CFLAGS) -D__TEST__ -o $@ $<
101
imgresample-test: imgresample.c
102
$(CC) $(CFLAGS) -DTEST -o $@ $^
104
dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o \
105
fdctref.o jrevdct.o i386/idct_mmx.o
109
# include dependency files if they exist
111
ifneq ($(wildcard .depend),)