Mercurial > libavcodec.hg
annotate Makefile @ 418:b2fb2081dab5 libavcodec
* somewhat more advanced test suit for dsp code - for now i386 only
cd test ; make dsptest ; ./dsptest
author | kabi |
---|---|
date | Thu, 23 May 2002 13:34:22 +0000 |
parents | 8aba98b353f0 |
children | 718a22dc121f |
rev | line source |
---|---|
395 | 1 # |
2 # libavcodec Makefile | |
3 # (c) 2000, 2001, 2002 Gerard Lantau | |
4 # | |
2 | 5 include ../config.mak |
6 | |
395 | 7 VPATH=$(SRC_PATH)/libavcodec |
8 | |
410 | 9 CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H -I$(SRC_PATH) -I.. |
0 | 10 LDFLAGS= -g |
11 | |
12 OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \ | |
23 | 13 mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \ |
0 | 14 motion_est.o imgconvert.o imgresample.o msmpeg4.o \ |
329 | 15 mpeg12.o h263dec.o rv10.o mpegaudiodec.o pcm.o simple_idct.o \ |
16 ratecontrol.o | |
2 | 17 ASM_OBJS= |
0 | 18 |
338 | 19 # currently using liba52 for ac3 decoding |
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
20 ifeq ($(CONFIG_AC3),yes) |
338 | 21 OBJS+= a52dec.o |
22 endif | |
23 | |
24 # using builtin liba52 or runtime linked liba52.so.0 | |
25 ifeq ($(CONFIG_A52BIN),no) | |
26 OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \ | |
27 liba52/imdct.o liba52/parse.o | |
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
28 endif |
0 | 29 |
258
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
30 ifeq ($(CONFIG_MP3LAME),yes) |
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
31 OBJS += mp3lameaudio.o |
348 | 32 EXTRALIBS += -lmp3lame |
258
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
33 endif |
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
34 |
252
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
35 ifeq ($(TARGET_GPROF),yes) |
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
36 CFLAGS+=-p |
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
37 LDFLAGS+=-p |
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
38 endif |
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
39 |
0 | 40 # i386 mmx specific stuff |
2 | 41 ifeq ($(TARGET_MMX),yes) |
74 | 42 OBJS += i386/fdct_mmx.o i386/cputest.o \ |
32 | 43 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \ |
338 | 44 i386/idct_mmx.o i386/motion_est_mmx.o \ |
174
ac5075a55488
new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
138
diff
changeset
|
45 i386/simple_idct_mmx.o |
0 | 46 endif |
47 | |
62 | 48 # armv4l specific stuff |
49 ifeq ($(TARGET_ARCH_ARMV4L),yes) | |
50 ASM_OBJS += armv4l/jrevdct_arm.o | |
51 OBJS += armv4l/dsputil_arm.o | |
52 endif | |
53 | |
88 | 54 # sun mediaLib specific stuff |
55 # currently only works when libavcodec is used in mplayer | |
56 ifeq ($(HAVE_MLIB),yes) | |
57 OBJS += mlib/dsputil_mlib.o | |
58 CFLAGS += $(MLIB_INC) | |
59 endif | |
60 | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
61 # alpha specific stuff |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
62 ifeq ($(TARGET_ARCH_ALPHA),yes) |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
63 OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
64 CFLAGS += -Wa,-mpca56 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
65 endif |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
66 |
2 | 67 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) |
68 | |
0 | 69 LIB= libavcodec.a |
136 | 70 ifeq ($(BUILD_SHARED),yes) |
71 SLIB= libffmpeg-$(VERSION).so | |
72 endif | |
74 | 73 TESTS= imgresample-test dct-test motion-test |
0 | 74 |
136 | 75 all: $(LIB) $(SLIB) |
43 | 76 tests: apiexample cpuid_test $(TESTS) |
0 | 77 |
2 | 78 $(LIB): $(OBJS) $(ASM_OBJS) |
0 | 79 rm -f $@ |
356
e8ecb4413557
ar -s has portability problems, anyway rc is enough without s -- suggested by Atmosfear
arpi_esp
parents:
348
diff
changeset
|
80 $(AR) rc $@ $(OBJS) $(ASM_OBJS) |
0 | 81 |
136 | 82 $(SLIB): $(OBJS) $(ASM_OBJS) |
83 rm -f $@ | |
348 | 84 $(CC) -shared -o $@ $(OBJS) $(ASM_OBJS) $(EXTRALIBS) |
136 | 85 ln -sf $@ libffmpeg.so |
0 | 86 dsputil.o: dsputil.c dsputil.h |
87 | |
88 %.o: %.c | |
89 $(CC) $(CFLAGS) -c -o $@ $< | |
90 | |
62 | 91 %.o: %.S |
92 $(CC) $(CFLAGS) -c -o $@ $< | |
93 | |
2 | 94 # depend only used by mplayer now |
95 dep: depend | |
96 | |
97 depend: | |
98 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend | |
99 | |
0 | 100 clean: |
343 | 101 rm -f *.o *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ |
62 | 102 armv4l/*.o armv4l/*~ \ |
88 | 103 mlib/*.o mlib/*~ \ |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
104 alpha/*.o alpha/*~ \ |
338 | 105 liba52/*.o liba52/*~ \ |
106 apiexample $(TESTS) | |
0 | 107 |
2 | 108 distclean: clean |
109 rm -f Makefile.bak .depend | |
110 | |
0 | 111 # api example program |
112 apiexample: apiexample.c $(LIB) | |
113 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm | |
114 | |
43 | 115 # cpuid test |
116 cpuid_test: i386/cputest.c | |
117 $(CC) $(CFLAGS) -D__TEST__ -o $@ $< | |
118 | |
0 | 119 # testing progs |
120 | |
121 imgresample-test: imgresample.c | |
122 $(CC) $(CFLAGS) -DTEST -o $@ $^ | |
123 | |
74 | 124 dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \ |
32 | 125 fdctref.o jrevdct.o i386/idct_mmx.o |
0 | 126 $(CC) -o $@ $^ |
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
127 |
74 | 128 motion-test: motion_test.o $(LIB) |
129 $(CC) -o $@ $^ | |
130 | |
136 | 131 install: all |
137 | 132 # install -m 644 $(LIB) $(prefix)/lib |
136 | 133 ifeq ($(BUILD_SHARED),yes) |
134 install -s -m 755 $(SLIB) $(prefix)/lib | |
135 ln -sf $(prefix)/lib/$(SLIB) $(prefix)/lib/libffmpeg.so | |
136 ldconfig | |
137 | 137 mkdir -p $(prefix)/include/libffmpeg |
138 install -m 644 avcodec.h $(prefix)/include/libffmpeg/avcodec.h | |
138 | 139 install -m 644 common.h $(prefix)/include/libffmpeg/common.h |
136 | 140 endif |
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
141 # |
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
142 # include dependency files if they exist |
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
143 # |
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
144 ifneq ($(wildcard .depend),) |
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
145 include .depend |
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
146 endif |