3 CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H
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 mpegaudiodec.o pcm.o
12 # currently using libac3 for ac3 decoding
13 ifeq ($(CONFIG_AC3),yes)
15 libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
16 libac3/imdct.o libac3/parse.o
19 # i386 mmx specific stuff
20 ifeq ($(TARGET_MMX),yes)
21 OBJS += i386/fdct_mmx.o i386/cputest.o \
22 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
23 i386/idct_mmx.o i386/motion_est_mmx.o
26 # armv4l specific stuff
27 ifeq ($(TARGET_ARCH_ARMV4L),yes)
28 ASM_OBJS += armv4l/jrevdct_arm.o
29 OBJS += armv4l/dsputil_arm.o
32 # sun mediaLib specific stuff
33 # currently only works when libavcodec is used in mplayer
34 ifeq ($(HAVE_MLIB),yes)
35 OBJS += mlib/dsputil_mlib.o
39 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
42 TESTS= imgresample-test dct-test motion-test
45 tests: apiexample cpuid_test $(TESTS)
47 $(LIB): $(OBJS) $(ASM_OBJS)
49 $(AR) rcs $@ $(OBJS) $(ASM_OBJS)
51 dsputil.o: dsputil.c dsputil.h
54 $(CC) $(CFLAGS) -c -o $@ $<
57 $(CC) $(CFLAGS) -c -o $@ $<
59 # depend only used by mplayer now
63 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
66 rm -f *.o *~ *.a i386/*.o i386/*~ \
67 armv4l/*.o armv4l/*~ \
69 libac3/*.o libac3/*~ \
73 rm -f Makefile.bak .depend
76 apiexample: apiexample.c $(LIB)
77 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm
80 cpuid_test: i386/cputest.c
81 $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
85 imgresample-test: imgresample.c
86 $(CC) $(CFLAGS) -DTEST -o $@ $^
88 dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \
89 fdctref.o jrevdct.o i386/idct_mmx.o
92 motion-test: motion_test.o $(LIB)
96 # include dependency files if they exist
98 ifneq ($(wildcard .depend),)