typo fix
[libav.git] / libavcodec / Makefile
CommitLineData
4cc281d9
FB
1#
2# libavcodec Makefile
6d6d7970 3# (c) 2000-2005 Fabrice Bellard
4cc281d9 4#
980fc7b8
FB
5include ../config.mak
6
ff4ec49e 7# NOTE: -I.. is needed to include config.h
f130fd46
DB
8CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil \
9 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS)
de6d9b64 10
caa336b4 11OBJS= bitstream.o utils.o mem.o allcodecs.o \
1d0d55da 12 mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
7b1fa7db 13 mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \
1d0d55da 14 motion_est.o imgconvert.o imgresample.o \
4f1bb8a9 15 mpeg12.o mpegaudiodec.o pcm.o simple_idct.o \
8b975b7c
MN
16 ratecontrol.o adpcm.o eval.o error_resilience.o \
17 fft.o mdct.o raw.o golomb.o cabac.o\
c11c2bc2 18 dpcm.o adx.o faandct.o parser.o g726.o \
689abe56 19 vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o \
348e52c9 20 opt.o
240c1657 21
d59518d4 22HEADERS = avcodec.h
8b2121e3 23
8b975b7c
MN
24ifeq ($(CONFIG_AASC_DECODER),yes)
25 OBJS+= aasc.o
26endif
27ifeq ($(CONFIG_ALAC_DECODER),yes)
28 OBJS+= alac.o
29endif
30ifneq ($(CONFIG_ASV1_DECODER)$(CONFIG_ASV1_ENCODER)$(CONFIG_ASV2_DECODER)$(CONFIG_ASV2_ENCODER),)
31 OBJS+= asv1.o
32endif
26376701
MM
33ifeq ($(CONFIG_AVS_DECODER),yes)
34 OBJS+= avs.o
35endif
b482e2d1
MN
36ifeq ($(CONFIG_CAVS_DECODER),yes)
37 OBJS+= cavs.o cavsdsp.o
38endif
8b975b7c
MN
39ifeq ($(CONFIG_CINEPAK_DECODER),yes)
40 OBJS+= cinepak.o
41endif
e0f7e329
BL
42ifeq ($(CONFIG_COOK_DECODER),yes)
43 OBJS+= cook.o
44endif
8b975b7c
MN
45ifneq ($(CONFIG_CLJR_DECODER)$(CONFIG_CLJR_ENCODER),)
46 OBJS+= cljr.o
47endif
48ifeq ($(CONFIG_CYUV_DECODER),yes)
49 OBJS+= cyuv.o
50endif
348e52c9
GP
51ifeq ($(CONFIG_DVBSUB_DECODER),yes)
52 OBJS+= dvbsubdec.o
53endif
54ifeq ($(CONFIG_DVBSUB_ENCODER),yes)
55 OBJS+= dvbsub.o
56endif
57ifeq ($(CONFIG_DVDSUB_DECODER),yes)
58 OBJS+= dvdsub.o
59endif
60ifeq ($(CONFIG_DVDSUB_ENCODER),yes)
61 OBJS+= dvdsubenc.o
62endif
8b975b7c
MN
63ifneq ($(CONFIG_DVVIDEO_DECODER)$(CONFIG_DVVIDEO_ENCODER),)
64 OBJS+= dv.o
65endif
66ifeq ($(CONFIG_EIGHTBPS_DECODER),yes)
67 OBJS+= 8bps.o
68endif
69ifneq ($(CONFIG_FFV1_DECODER)$(CONFIG_FFV1_ENCODER),)
70 OBJS+= ffv1.o
71endif
72ifeq ($(CONFIG_FLAC_DECODER),yes)
73 OBJS+= flac.o
74endif
9e96ab03
MN
75ifeq ($(CONFIG_FLAC_ENCODER),yes)
76 OBJS+= flacenc.o
77endif
8b975b7c
MN
78ifeq ($(CONFIG_FLIC_DECODER),yes)
79 OBJS+= flicvideo.o
80endif
81ifeq ($(CONFIG_FOURXM_DECODER),yes)
82 OBJS+= 4xm.o
83endif
b81f8949
MM
84ifeq ($(CONFIG_FRAPS_DECODER),yes)
85 OBJS+= fraps.o
86endif
8b975b7c
MN
87ifneq ($(CONFIG_H261_DECODER)$(CONFIG_H261_ENCODER),)
88 OBJS+= h261.o
89endif
90ifneq ($(CONFIG_H264_DECODER)$(CONFIG_SVQ3_DECODER),)
91 OBJS+= h264.o
92endif
93ifneq ($(CONFIG_HUFFYUV_DECODER)$(CONFIG_HUFFYUV_ENCODER)$(CONFIG_FFVHUFF_DECODER)$(CONFIG_FFVHUFF_ENCODER),)
94 OBJS+= huffyuv.o
95endif
96ifeq ($(CONFIG_IDCIN_DECODER),yes)
97 OBJS+= idcinvideo.o
98endif
99ifeq ($(CONFIG_INDEO2_DECODER),yes)
100 OBJS+= indeo2.o
101endif
102ifeq ($(CONFIG_INDEO3_DECODER),yes)
103 OBJS+= indeo3.o
104endif
105ifeq ($(CONFIG_INTERPLAY_VIDEO_DECODER),yes)
106 OBJS+= interplayvideo.o
107endif
fd7b1991
KS
108ifeq ($(CONFIG_KMVC_DECODER),yes)
109 OBJS+= kmvc.o
110endif
8b975b7c
MN
111ifneq ($(CONFIG_MSZH_DECODER)$(CONFIG_ZLIB_DECODER)$(CONFIG_ZLIB_ENCODER),)
112 OBJS+= lcl.o
113endif
114ifeq ($(CONFIG_LOCO_DECODER),yes)
115 OBJS+= loco.o
116endif
117ifneq ($(CONFIG_MACE3_DECODER)$(CONFIG_MACE6_DECODER),)
118 OBJS+= mace.o
119endif
120ifeq ($(CONFIG_MSRLE_DECODER),yes)
121 OBJS+= msrle.o
122endif
123ifeq ($(CONFIG_MSVIDEO1_DECODER),yes)
124 OBJS+= msvideo1.o
125endif
126ifneq ($(CONFIG_PNG_DECODER)$(CONFIG_PNG_ENCODER),)
127 OBJS+= png.o
128endif
c555392a
RT
129ifeq ($(CONFIG_QDM2_DECODER),yes)
130 OBJS+= qdm2.o
131endif
8b975b7c
MN
132ifeq ($(CONFIG_QDRAW_DECODER),yes)
133 OBJS+= qdrw.o
134endif
135ifeq ($(CONFIG_QPEG_DECODER),yes)
136 OBJS+= qpeg.o
137endif
138ifeq ($(CONFIG_QTRLE_DECODER),yes)
139 OBJS+= qtrle.o
140endif
141ifeq ($(CONFIG_RA_144_DECODER),yes)
142 OBJS+= ra144.o
143endif
144ifeq ($(CONFIG_RA_288_DECODER),yes)
145 OBJS+= ra288.o
146endif
147ifeq ($(CONFIG_ROQ_DECODER),yes)
148 OBJS+= roqvideo.o
149endif
150ifeq ($(CONFIG_RPZA_DECODER),yes)
151 OBJS+= rpza.o
152endif
153ifneq ($(CONFIG_RV10_DECODER)$(CONFIG_RV20_DECODER)$(CONFIG_RV10_ENCODER)$(CONFIG_RV20_ENCODER),)
154 OBJS+= rv10.o
155endif
156ifeq ($(CONFIG_SHORTEN_DECODER),yes)
157 OBJS+= shorten.o
158endif
348efc18
KS
159ifneq ($(CONFIG_SMACKER_DECODER)$(CONFIG_SMACKAUD_DECODER),)
160 OBJS+= smacker.o
161endif
8b975b7c
MN
162ifeq ($(CONFIG_SMC_DECODER),yes)
163 OBJS+= smc.o
164endif
0de1318a 165ifneq ($(CONFIG_SNOW_DECODER)$(CONFIG_SNOW_ENCODER),)
8b975b7c
MN
166 OBJS+= snow.o
167endif
168ifneq ($(CONFIG_SONIC_DECODER)$(CONFIG_SONIC_ENCODER)$(CONFIG_SONIC_LS_ENCODER),)
169 OBJS+= sonic.o
170endif
171ifneq ($(CONFIG_SVQ1_DECODER)$(CONFIG_SVQ1_ENCODER),)
172 OBJS+= svq1.o
173endif
174ifeq ($(CONFIG_TRUEMOTION1_DECODER),yes)
175 OBJS+= truemotion1.o
176endif
c555392a
RT
177ifeq ($(CONFIG_TRUEMOTION2_DECODER),yes)
178 OBJS+= truemotion2.o
179endif
bf3027c8
DB
180ifeq ($(CONFIG_TRUESPEECH_DECODER),yes)
181 OBJS+= truespeech.o
182endif
a24c4a2a
AB
183ifeq ($(CONFIG_TTA_DECODER),yes)
184 OBJS+= tta.o
185endif
8b975b7c
MN
186ifeq ($(CONFIG_TSCC_DECODER),yes)
187 OBJS+= tscc.o
188endif
e0f80bd7
RD
189ifeq ($(CONFIG_CSCD_DECODER),yes)
190 OBJS+= cscd.o
517840c6 191 OBJS+= lzo.o
e0f80bd7 192endif
dfca23e3
RD
193ifeq ($(CONFIG_NUV_DECODER),yes)
194 OBJS+= nuv.o
195 OBJS+= rtjpeg.o
196 OBJS+= lzo.o
197endif
8b975b7c
MN
198ifeq ($(CONFIG_ULTI_DECODER),yes)
199 OBJS+= ulti.o
200endif
10b9c374
KS
201ifneq ($(CONFIG_VC1_DECODER)$(CONFIG_WMV3_DECODER),)
202 OBJS+= vc1.o
8b975b7c
MN
203endif
204ifneq ($(CONFIG_VCR1_DECODER)$(CONFIG_VCR1_ENCODER),)
205 OBJS+= vcr1.o
206endif
207ifneq ($(CONFIG_VMDVIDEO_DECODER)$(CONFIG_VMDAUDIO_DECODER),)
208 OBJS+= vmdav.o
209endif
0bde73d9
MN
210ifeq ($(CONFIG_VORBIS_DECODER),yes)
211 OBJS+= vorbis.o
212endif
8b975b7c
MN
213ifneq ($(CONFIG_VP3_DECODER)$(CONFIG_THEORA_DECODER),)
214 OBJS+= vp3.o
215endif
216ifeq ($(CONFIG_VQA_DECODER),yes)
217 OBJS+= vqavideo.o
218endif
219ifneq ($(CONFIG_WMAV1_DECODER)$(CONFIG_WMAV2_DECODER),)
220 OBJS+= wmadec.o
221endif
222ifeq ($(CONFIG_WNV1_DECODER),yes)
223 OBJS+= wnv1.o
224endif
225ifeq ($(CONFIG_WS_SND1_DECODER),yes)
226 OBJS+= ws-snd1.o
227endif
228ifneq ($(CONFIG_XAN_WC3_DECODER)$(CONFIG_XAN_WC4_DECODER),)
229 OBJS+= xan.o
230endif
231ifeq ($(CONFIG_XL_DECODER),yes)
232 OBJS+= xl.o
233endif
9fa62f2a
MR
234ifeq ($(CONFIG_BMP_DECODER),yes)
235 OBJS+= bmp.o
236endif
4e114829
MM
237ifeq ($(CONFIG_MMVIDEO_DECODER),yes)
238 OBJS+= mmvideo.o
239endif
9c8d8e84
MM
240ifeq ($(CONFIG_ZMBV_DECODER),yes)
241 OBJS+= zmbv.o
242endif
0919e788
BL
243ifeq ($(CONFIG_FLASHSV_DECODER),yes)
244 OBJS+= flashsv.o
245endif
9fa62f2a 246
e0fb7e5b 247
60827a1a
DB
248ifeq ($(AMR),yes)
249OBJS+= amr.o
250endif
e0fb7e5b 251
891f64b3 252ifeq ($(AMR_NB),yes)
f130fd46
DB
253OBJS+= amr_float/sp_dec.o amr_float/sp_enc.o \
254 amr_float/interf_dec.o amr_float/interf_enc.o
6eb07e73
DB
255endif
256
bc634f6f 257ifeq ($(AMR_NB_FIXED),yes)
3ed410a6
DB
258EXTRAOBJS += amr/*.o
259EXTRADEPS=amrlibs
891f64b3 260endif
261
e0fb7e5b 262ifeq ($(AMR_WB),yes)
e0fb7e5b
DB
263OBJS+= amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o \
264 amrwb_float/dec_if.o amrwb_float/dec_lpc.o amrwb_float/dec_main.o \
265 amrwb_float/dec_rom.o amrwb_float/dec_util.o amrwb_float/enc_acelp.o \
266 amrwb_float/enc_dtx.o amrwb_float/enc_gain.o amrwb_float/enc_if.o \
267 amrwb_float/enc_lpc.o amrwb_float/enc_main.o amrwb_float/enc_rom.o \
268 amrwb_float/enc_util.o amrwb_float/if_rom.o
e0fb7e5b
DB
269endif
270
e0fb7e5b 271
9c3d33d6
MN
272ifeq ($(HAVE_PTHREADS),yes)
273OBJS+= pthread.o
274endif
275
16806499
MN
276ifeq ($(HAVE_W32THREADS),yes)
277OBJS+= w32thread.o
278endif
279
e2a5fd20
MN
280ifeq ($(HAVE_OS2THREADS),yes)
281OBJS+= os2thread.o
282endif
283
284
2450cff2
FR
285ifeq ($(HAVE_BEOSTHREADS),yes)
286OBJS+= beosthread.o
287endif
288
980fc7b8 289ASM_OBJS=
de6d9b64 290
4f1bb8a9
IK
291ifeq ($(HAVE_XVMC_ACCEL),yes)
292OBJS+= xvmcvideo.o
293endif
294
57514323 295# currently using liba52 for ac3 decoding
d771bcae 296ifeq ($(CONFIG_AC3),yes)
57514323 297OBJS+= a52dec.o
57514323
ZK
298
299# using builtin liba52 or runtime linked liba52.so.0
ff4ec49e 300ifneq ($(CONFIG_A52BIN),yes)
57514323 301OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
521221cf 302 liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o
d771bcae 303endif
ff4ec49e 304endif
de6d9b64 305
2cf30841 306EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
c11c2bc2 307
23c99253
MN
308# currently using libdts for dts decoding
309ifeq ($(CONFIG_DTS),yes)
310OBJS+= dtsdec.o
fe9a734c 311CFLAGS += $(DTS_INC)
23c99253
MN
312endif
313
280bd7b7
ZK
314ifeq ($(CONFIG_FAAD),yes)
315OBJS+= faad.o
316endif
317
29d48296
MN
318ifeq ($(CONFIG_FAAC),yes)
319OBJS+= faac.o
29d48296
MN
320endif
321
1ddadfa9
AT
322ifeq ($(CONFIG_XVID),yes)
323OBJS+= xvidff.o
64b7c5b6 324OBJS+= xvid_rc.o
1ddadfa9
AT
325endif
326
6662ec29
MN
327ifeq ($(CONFIG_X264),yes)
328OBJS+= x264.o
6662ec29
MN
329endif
330
5798368b
J
331ifeq ($(CONFIG_MP3LAME),yes)
332OBJS += mp3lameaudio.o
333endif
334
5c5dea3f 335ifeq ($(CONFIG_LIBOGG),yes)
5c5dea3f 336ifeq ($(CONFIG_LIBVORBIS),yes)
81e0d0b4 337OBJS += oggvorbis.o
81e0d0b4 338endif
5c5dea3f
NB
339ifeq ($(CONFIG_LIBTHEORA), yes)
340OBJS += oggtheora.o
5c5dea3f
NB
341endif
342endif
81e0d0b4 343
bb4c2140
MN
344ifeq ($(CONFIG_LIBGSM),yes)
345OBJS += libgsm.o
bb4c2140
MN
346endif
347
de6d9b64 348# i386 mmx specific stuff
980fc7b8 349ifeq ($(TARGET_MMX),yes)
4300403e 350OBJS += i386/fdct_mmx.o i386/cputest.o \
de1ee36a 351 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
57514323 352 i386/idct_mmx.o i386/motion_est_mmx.o \
38acbc3c 353 i386/simple_idct_mmx.o i386/fft_sse.o i386/vp3dsp_mmx.o \
4567b4bd 354 i386/vp3dsp_sse2.o i386/fft_3dn.o i386/fft_3dn2.o i386/snowdsp_mmx.o
84740d59
MN
355ifeq ($(CONFIG_GPL),yes)
356OBJS += i386/idct_mmx_xvid.o
357endif
87318d69 358ifeq ($(TARGET_BUILTIN_VECTOR),yes)
a968e365 359i386/fft_sse.o: CFLAGS+= -msse
148beec7 360depend: CFLAGS+= -msse
a968e365 361endif
87318d69 362ifeq ($(TARGET_BUILTIN_3DNOW),yes)
82eb4b0f 363i386/fft_3dn.o: CFLAGS+= -m3dnow
c2f69579
GP
364ifeq ($(TARGET_ARCH_X86),yes)
365i386/fft_3dn2.o: CFLAGS+= -march=athlon
366endif
367ifeq ($(TARGET_ARCH_X86_64),yes)
368i386/fft_3dn2.o: CFLAGS+= -march=k8
369endif
82eb4b0f 370endif
de6d9b64
FB
371endif
372
3d03c0a2
FB
373# armv4l specific stuff
374ifeq ($(TARGET_ARCH_ARMV4L),yes)
6ad1fa5a 375ASM_OBJS += armv4l/jrevdct_arm.o armv4l/simple_idct_arm.o armv4l/dsputil_arm_s.o
676e200c 376OBJS += armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o
6ad1fa5a
BR
377ifeq ($(TARGET_IWMMXT),yes)
378OBJS += armv4l/dsputil_iwmmxt.o armv4l/mpegvideo_iwmmxt.o
379endif
3d03c0a2
FB
380endif
381
c34270f5
FB
382# sun mediaLib specific stuff
383# currently only works when libavcodec is used in mplayer
384ifeq ($(HAVE_MLIB),yes)
385OBJS += mlib/dsputil_mlib.o
386CFLAGS += $(MLIB_INC)
387endif
388
6ad1fa5a
BR
389# Intel IPP specific stuff
390# currently only works when libavcodec is used in mplayer
391ifeq ($(HAVE_IPP),yes)
392CFLAGS += $(IPP_INC)
393endif
394
1e98dffb
NK
395# alpha specific stuff
396ifeq ($(TARGET_ARCH_ALPHA),yes)
8b313a47
FH
397OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o \
398 alpha/simple_idct_alpha.o alpha/motion_est_alpha.o
f9bb4bdf 399ASM_OBJS += alpha/dsputil_alpha_asm.o alpha/motion_est_mvi_asm.o
647b610c 400CFLAGS += -fforce-addr
1e98dffb
NK
401endif
402
59925ef2 403ifeq ($(TARGET_ARCH_POWERPC),yes)
05c4072b 404OBJS += ppc/dsputil_ppc.o ppc/mpegvideo_ppc.o
ab6c65f6
BF
405endif
406
d46aba26 407ifeq ($(TARGET_MMI),yes)
5917d17c 408OBJS += ps2/dsputil_mmi.o ps2/idct_mmi.o ps2/mpegvideo_mmi.o
d46aba26
LS
409endif
410
ab6c65f6 411ifeq ($(TARGET_ALTIVEC),yes)
8d268a7d 412OBJS += ppc/dsputil_altivec.o ppc/mpegvideo_altivec.o ppc/idct_altivec.o \
a6a12a8a 413 ppc/fft_altivec.o ppc/gmc_altivec.o ppc/fdct_altivec.o \
22b48b85 414 ppc/dsputil_h264_altivec.o ppc/dsputil_snow_altivec.o
59925ef2
BF
415endif
416
0c6bd2ea
B
417ifeq ($(TARGET_ARCH_SH4),yes)
418OBJS+= sh4/idct_sh4.o sh4/dsputil_sh4.o sh4/dsputil_align.o
419endif
420
bb476ff3 421ifeq ($(TARGET_ARCH_SPARC),yes)
44f54ceb 422OBJS+=sparc/dsputil_vis.o
bb476ff3 423sparc/%.o: sparc/%.c
bb428277 424 $(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
bb476ff3 425endif
980fc7b8 426
4bdd05e7 427NAME=avcodec
c11c2bc2 428LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
0fd94442 429ifeq ($(BUILD_SHARED),yes)
f3b60109
DB
430LIBVERSION=$(LAVCVERSION)
431LIBMAJOR=$(LAVCMAJOR)
0fd94442 432endif
6d2abd6b 433TESTS= imgresample-test dct-test motion-test fft-test
de6d9b64 434
8b2121e3
MR
435include $(SRC_PATH)/common.mak
436
bc634f6f
ZK
437amrlibs:
438 $(MAKE) -C amr spclib fipoplib
439
c10e9f70 440tests: apiexample cpuid_test $(TESTS)
de6d9b64 441
de6d9b64
FB
442dsputil.o: dsputil.c dsputil.h
443
c7f1a2f5 444clean::
8b2121e3 445 rm -f \
98013cc1 446 i386/*.o i386/*~ \
3d03c0a2 447 armv4l/*.o armv4l/*~ \
c34270f5 448 mlib/*.o mlib/*~ \
1e98dffb 449 alpha/*.o alpha/*~ \
59925ef2 450 ppc/*.o ppc/*~ \
d46aba26 451 ps2/*.o ps2/*~ \
0c6bd2ea 452 sh4/*.o sh4/*~ \
bb476ff3 453 sparc/*.o sparc/*~ \
57514323 454 liba52/*.o liba52/*~ \
c7f1a2f5 455 amr_float/*.o \
57514323 456 apiexample $(TESTS)
215e46e6
DB
457 -$(MAKE) -C amr clean
458 -$(MAKE) -C amrwb_float -f makefile.gcc clean
d663a1fd 459
de6d9b64
FB
460# api example program
461apiexample: apiexample.c $(LIB)
dc9cc5ed 462 $(CC) $(CFLAGS) -o $@ $< $(LIB) $(LIBAVUTIL) $(EXTRALIBS)
de6d9b64 463
c10e9f70
NK
464# cpuid test
465cpuid_test: i386/cputest.c
466 $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
467
de6d9b64
FB
468# testing progs
469
470imgresample-test: imgresample.c
6acce86b 471 $(CC) $(CFLAGS) -DTEST -o $@ $^ -lm
de6d9b64 472
9ebc63a9 473dct-test: dct-test.o fdctref.o $(LIB)
434df899 474 $(CC) -o $@ $^ -lm $(LIBAVUTIL)
d771bcae 475
4300403e 476motion-test: motion_test.o $(LIB)
6acce86b 477 $(CC) -o $@ $^ -lm
4300403e 478
923ceff8 479fft-test: fft-test.o $(LIB)
c11c2bc2 480 $(CC) -o $@ $^ $(LIBAVUTIL) -lm