Merge svn changes up to r28204
[mplayer/glamo.git] / Makefile
blob2f0db04b35b2b1fd3b0b1f94dce70314e400935a
1 # MPlayer Makefile
3 # copyright (c) 2008 Diego Biurrun
4 # Rewritten entirely from a set of Makefiles written by Arpi and many others.
6 # This file is part of MPlayer.
8 # MPlayer is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # MPlayer is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with MPlayer; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 include config.mak
25 ###### variable declarations #######
27 COMMON_LDFLAGS += $(EXTRA_LIB)\
28 $(EXTRALIBS) \
30 LDFLAGS_MPLAYER = $(EXTRALIBS_MPLAYER) \
31 $(COMMON_LDFLAGS) \
33 LDFLAGS_MENCODER = $(EXTRALIBS_MENCODER) \
34 $(COMMON_LDFLAGS) \
36 SRCS_COMMON = asxparser.c \
37 codec-cfg.c \
38 cpudetect.c \
39 defaultopts.c \
40 edl.c \
41 find_sub.c \
42 get_path.c \
43 m_config.c \
44 m_option.c \
45 m_struct.c \
46 mpcommon.c \
47 parser-cfg.c \
48 playtree.c \
49 playtreeparser.c \
50 spudec.c \
51 sub_cc.c \
52 subopt-helper.c \
53 subreader.c \
54 talloc.c \
55 vobsub.c \
56 libaf/af.c \
57 libaf/af_center.c \
58 libaf/af_channels.c \
59 libaf/af_comp.c \
60 libaf/af_delay.c \
61 libaf/af_dummy.c \
62 libaf/af_equalizer.c \
63 libaf/af_extrastereo.c \
64 libaf/af_format.c \
65 libaf/af_gate.c \
66 libaf/af_hrtf.c \
67 libaf/af_karaoke.c \
68 libaf/af_pan.c \
69 libaf/af_resample.c \
70 libaf/af_scaletempo.c \
71 libaf/af_sinesuppress.c \
72 libaf/af_sub.c \
73 libaf/af_surround.c \
74 libaf/af_sweep.c \
75 libaf/af_tools.c \
76 libaf/af_volnorm.c \
77 libaf/af_volume.c \
78 libaf/filter.c \
79 libaf/format.c \
80 libaf/reorder_ch.c \
81 libaf/window.c \
82 libmpcodecs/ad.c \
83 libmpcodecs/ad_alaw.c \
84 libmpcodecs/ad_dk3adpcm.c \
85 libmpcodecs/ad_dvdpcm.c \
86 libmpcodecs/ad_hwmpa.c \
87 libmpcodecs/ad_imaadpcm.c \
88 libmpcodecs/ad_msadpcm.c \
89 libmpcodecs/ad_msgsm.c \
90 libmpcodecs/ad_pcm.c \
91 libmpcodecs/dec_audio.c \
92 libmpcodecs/dec_video.c \
93 libmpcodecs/img_format.c \
94 libmpcodecs/mp_image.c \
95 libmpcodecs/native/nuppelvideo.c \
96 libmpcodecs/native/rtjpegn.c \
97 libmpcodecs/native/xa_gsm.c \
98 libmpcodecs/pullup.c \
99 libmpcodecs/vd.c \
100 libmpcodecs/vd_hmblck.c \
101 libmpcodecs/vd_lzo.c \
102 libmpcodecs/vd_mpegpes.c \
103 libmpcodecs/vd_mtga.c \
104 libmpcodecs/vd_null.c \
105 libmpcodecs/vd_nuv.c \
106 libmpcodecs/vd_raw.c \
107 libmpcodecs/vd_sgi.c \
108 libmpcodecs/vf.c \
109 libmpcodecs/vf_1bpp.c \
110 libmpcodecs/vf_2xsai.c \
111 libmpcodecs/vf_blackframe.c \
112 libmpcodecs/vf_boxblur.c \
113 libmpcodecs/vf_crop.c \
114 libmpcodecs/vf_cropdetect.c \
115 libmpcodecs/vf_decimate.c \
116 libmpcodecs/vf_delogo.c \
117 libmpcodecs/vf_denoise3d.c \
118 libmpcodecs/vf_detc.c \
119 libmpcodecs/vf_dint.c \
120 libmpcodecs/vf_divtc.c \
121 libmpcodecs/vf_down3dright.c \
122 libmpcodecs/vf_dsize.c \
123 libmpcodecs/vf_dvbscale.c \
124 libmpcodecs/vf_eq.c \
125 libmpcodecs/vf_eq2.c \
126 libmpcodecs/vf_expand.c \
127 libmpcodecs/vf_field.c \
128 libmpcodecs/vf_fil.c \
129 libmpcodecs/vf_filmdint.c \
130 libmpcodecs/vf_flip.c \
131 libmpcodecs/vf_format.c \
132 libmpcodecs/vf_framestep.c \
133 libmpcodecs/vf_halfpack.c \
134 libmpcodecs/vf_harddup.c \
135 libmpcodecs/vf_hqdn3d.c \
136 libmpcodecs/vf_hue.c \
137 libmpcodecs/vf_il.c \
138 libmpcodecs/vf_ilpack.c \
139 libmpcodecs/vf_ivtc.c \
140 libmpcodecs/vf_kerndeint.c \
141 libmpcodecs/vf_mirror.c \
142 libmpcodecs/vf_noformat.c \
143 libmpcodecs/vf_noise.c \
144 libmpcodecs/vf_ow.c \
145 libmpcodecs/vf_palette.c \
146 libmpcodecs/vf_perspective.c \
147 libmpcodecs/vf_phase.c \
148 libmpcodecs/vf_pp7.c \
149 libmpcodecs/vf_pullup.c \
150 libmpcodecs/vf_rectangle.c \
151 libmpcodecs/vf_remove_logo.c \
152 libmpcodecs/vf_rgb2bgr.c \
153 libmpcodecs/vf_rgbtest.c \
154 libmpcodecs/vf_rotate.c \
155 libmpcodecs/vf_sab.c \
156 libmpcodecs/vf_scale.c \
157 libmpcodecs/vf_smartblur.c \
158 libmpcodecs/vf_softpulldown.c \
159 libmpcodecs/vf_softskip.c \
160 libmpcodecs/vf_swapuv.c \
161 libmpcodecs/vf_telecine.c \
162 libmpcodecs/vf_test.c \
163 libmpcodecs/vf_tfields.c \
164 libmpcodecs/vf_tile.c \
165 libmpcodecs/vf_tinterlace.c \
166 libmpcodecs/vf_unsharp.c \
167 libmpcodecs/vf_vo.c \
168 libmpcodecs/vf_yadif.c \
169 libmpcodecs/vf_yuvcsp.c \
170 libmpcodecs/vf_yuy2.c \
171 libmpcodecs/vf_yvu9.c \
172 libmpdemux/aac_hdr.c \
173 libmpdemux/asfheader.c \
174 libmpdemux/aviheader.c \
175 libmpdemux/aviprint.c \
176 libmpdemux/demuxer.c \
177 libmpdemux/demux_aac.c \
178 libmpdemux/demux_asf.c \
179 libmpdemux/demux_audio.c \
180 libmpdemux/demux_avi.c \
181 libmpdemux/demux_demuxers.c \
182 libmpdemux/demux_film.c \
183 libmpdemux/demux_fli.c \
184 libmpdemux/demux_lmlm4.c \
185 libmpdemux/demux_mf.c \
186 libmpdemux/demux_mkv.c \
187 libmpdemux/demux_mov.c \
188 libmpdemux/demux_mpg.c \
189 libmpdemux/demux_nsv.c \
190 libmpdemux/demux_nuv.c \
191 libmpdemux/demux_pva.c \
192 libmpdemux/demux_rawaudio.c \
193 libmpdemux/demux_rawvideo.c \
194 libmpdemux/demux_realaud.c \
195 libmpdemux/demux_real.c \
196 libmpdemux/demux_roq.c \
197 libmpdemux/demux_smjpeg.c \
198 libmpdemux/demux_ts.c \
199 libmpdemux/demux_ty.c \
200 libmpdemux/demux_ty_osd.c \
201 libmpdemux/demux_viv.c \
202 libmpdemux/demux_vqf.c \
203 libmpdemux/demux_y4m.c \
204 libmpdemux/ebml.c \
205 libmpdemux/extension.c \
206 libmpdemux/mf.c \
207 libmpdemux/mp3_hdr.c \
208 libmpdemux/mp_taglists.c \
209 libmpdemux/mpeg_hdr.c \
210 libmpdemux/mpeg_packetizer.c \
211 libmpdemux/parse_es.c \
212 libmpdemux/parse_mp4.c \
213 libmpdemux/video.c \
214 libmpdemux/yuv4mpeg.c \
215 libmpdemux/yuv4mpeg_ratio.c \
216 libvo/aclib.c \
217 libvo/osd.c \
218 libvo/sub.c \
219 osdep/$(GETCH) \
220 osdep/$(TIMER) \
221 stream/open.c \
222 stream/stream.c \
223 stream/stream_cue.c \
224 stream/stream_file.c \
225 stream/stream_mf.c \
226 stream/stream_null.c \
227 stream/url.c \
229 SRCS_COMMON-$(AUDIO_INPUT)-$(ALSA1X) += stream/ai_alsa1x.c
230 SRCS_COMMON-$(AUDIO_INPUT)-$(ALSA9) += stream/ai_alsa.c
231 SRCS_COMMON-$(AUDIO_INPUT)-$(OSS) += stream/ai_oss.c
232 SRCS_COMMON-$(BITMAP_FONT) += libvo/font_load.c
233 SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \
234 stream/cdinfo.c
235 SRCS_COMMON-$(CDDB) += stream/stream_cddb.c
236 SRCS_COMMON-$(DVBIN) += stream/dvb_tune.c \
237 stream/stream_dvb.c
238 SRCS_COMMON-$(DVDNAV) += stream/stream_dvdnav.c
239 SRCS_COMMON-$(DVDREAD) += stream/stream_dvd.c \
240 stream/stream_dvd_common.c
241 SRCS_COMMON-$(DVDREAD_INTERNAL) += libdvdread/cmd_print.c \
242 libdvdread/dvd_input.c \
243 libdvdread/dvd_reader.c \
244 libdvdread/dvd_udf.c \
245 libdvdread/ifo_print.c \
246 libdvdread/ifo_read.c \
247 libdvdread/md5.c \
248 libdvdread/nav_print.c \
249 libdvdread/nav_read.c \
251 SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c
252 SRCS_COMMON-$(FAAD_INTERNAL) += libfaad2/bits.c \
253 libfaad2/cfft.c \
254 libfaad2/common.c \
255 libfaad2/decoder.c \
256 libfaad2/drc.c \
257 libfaad2/drm_dec.c \
258 libfaad2/error.c \
259 libfaad2/filtbank.c \
260 libfaad2/hcr.c \
261 libfaad2/huffman.c \
262 libfaad2/ic_predict.c \
263 libfaad2/is.c \
264 libfaad2/lt_predict.c \
265 libfaad2/mdct.c \
266 libfaad2/mp4.c \
267 libfaad2/ms.c \
268 libfaad2/output.c \
269 libfaad2/pns.c \
270 libfaad2/ps_dec.c \
271 libfaad2/ps_syntax.c \
272 libfaad2/pulse.c \
273 libfaad2/rvlc.c \
274 libfaad2/sbr_dct.c \
275 libfaad2/sbr_dec.c \
276 libfaad2/sbr_e_nf.c \
277 libfaad2/sbr_fbt.c \
278 libfaad2/sbr_hfadj.c \
279 libfaad2/sbr_hfgen.c \
280 libfaad2/sbr_huff.c \
281 libfaad2/sbr_qmf.c \
282 libfaad2/sbr_syntax.c \
283 libfaad2/sbr_tf_grid.c \
284 libfaad2/specrec.c \
285 libfaad2/ssr.c \
286 libfaad2/ssr_fb.c \
287 libfaad2/ssr_ipqf.c \
288 libfaad2/syntax.c \
289 libfaad2/tns.c \
291 SRCS_COMMON-$(FREETYPE) += libvo/font_load_ft.c
292 SRCS_COMMON-$(FTP) += stream/stream_ftp.c
293 SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c
294 SRCS_COMMON-$(HAVE_POSIX_SELECT) += libmpcodecs/vf_bmovl.c
295 SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c
296 SRCS_COMMON-$(JPEG) += libmpcodecs/vd_ijpg.c
297 SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c
298 SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_hwac3.c \
299 libmpcodecs/ad_liba52.c
300 SRCS_COMMON-$(LIBA52_INTERNAL) += liba52/crc.c \
301 liba52/resample.c \
302 liba52/bit_allocate.c \
303 liba52/bitstream.c \
304 liba52/downmix.c \
305 liba52/imdct.c \
306 liba52/parse.c \
308 SRCS_COMMON-$(LIBASS) += libass/ass.c \
309 libass/ass_bitmap.c \
310 libass/ass_cache.c \
311 libass/ass_font.c \
312 libass/ass_fontconfig.c \
313 libass/ass_library.c \
314 libass/ass_mp.c \
315 libass/ass_render.c \
316 libass/ass_utils.c \
317 libmpcodecs/vf_ass.c \
319 SRCS_COMMON-$(LIBAVCODEC) += av_opts.c \
320 libaf/af_lavcresample.c \
321 libmpcodecs/ad_ffmpeg.c \
322 libmpcodecs/vd_ffmpeg.c \
323 libmpcodecs/vf_lavc.c \
324 libmpcodecs/vf_lavcdeint.c \
325 libmpcodecs/vf_screenshot.c \
327 # These filters use private headers and do not work with shared libavcodec.
328 SRCS_COMMON-$(LIBAVCODEC_A) += libaf/af_lavcac3enc.c \
329 libmpcodecs/vf_fspp.c \
330 libmpcodecs/vf_geq.c \
331 libmpcodecs/vf_mcdeint.c \
332 libmpcodecs/vf_qp.c \
333 libmpcodecs/vf_spp.c \
334 libmpcodecs/vf_uspp.c \
336 SRCS_COMMON-$(LIBAVFORMAT) += libmpdemux/demux_lavf.c
337 SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
338 SRCS_COMMON-$(LIBDV) += libmpcodecs/ad_libdv.c \
339 libmpcodecs/vd_libdv.c \
340 libmpdemux/demux_rawdv.c
341 SRCS_COMMON-$(LIBDVDCSS_INTERNAL) += libdvdcss/css.c \
342 libdvdcss/device.c \
343 libdvdcss/error.c \
344 libdvdcss/ioctl.c \
345 libdvdcss/libdvdcss.c \
347 SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
348 SRCS_COMMON-$(LIBMPEG2) += libmpcodecs/vd_libmpeg2.c \
349 libmpeg2/alloc.c \
350 libmpeg2/cpu_accel.c\
351 libmpeg2/cpu_state.c \
352 libmpeg2/decode.c \
353 libmpeg2/header.c \
354 libmpeg2/idct.c \
355 libmpeg2/motion_comp.c \
356 libmpeg2/slice.c
357 SRCS_COMMON-$(LIBMPEG2)-$(ARCH_ALPHA) += libmpeg2/idct_alpha.c \
358 libmpeg2/motion_comp_alpha.c
359 SRCS_COMMON-$(LIBMPEG2)-$(ARCH_ARM) += libmpeg2/motion_comp_arm.c \
360 libmpeg2/motion_comp_arm_s.S
361 SRCS_COMMON-$(LIBMPEG2)-$(HAVE_ALTIVEC) += libmpeg2/idct_altivec.c \
362 libmpeg2/motion_comp_altivec.c
363 SRCS_COMMON-$(LIBMPEG2)-$(HAVE_MMX) += libmpeg2/idct_mmx.c \
364 libmpeg2/motion_comp_mmx.c
365 SRCS_COMMON-$(LIBMPEG2)-$(HAVE_VIS) += libmpeg2/motion_comp_vis.c
366 SRCS_COMMON-$(LIBNEMESI) += libmpdemux/demux_nemesi.c \
367 stream/stream_nemesi.c
368 SRCS_COMMON-$(LIBNUT) += libmpdemux/demux_nut.c
369 SRCS_COMMON-$(LIBPOSTPROC) += libmpcodecs/vf_pp.c
370 SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
371 SRCS_COMMON-$(LIBTHEORA) += libmpcodecs/vd_theora.c
372 SRCS_COMMON-$(LIBVORBIS) += libmpcodecs/ad_libvorbis.c \
373 libmpdemux/demux_ogg.c
374 SRCS_COMMON-$(LIVE555) += libmpdemux/demux_rtp.cpp \
375 libmpdemux/demux_rtp_codec.cpp \
376 stream/stream_live555.c
377 SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.c
378 SRCS_COMMON-$(MNG) += libmpdemux/demux_mng.c
379 SRCS_COMMON-$(MP3LIB) += libmpcodecs/ad_mp3lib.c mp3lib/sr1.c
380 SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32) += mp3lib/decode_i586.c
381 SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOW) += mp3lib/dct36_3dnow.c \
382 mp3lib/dct64_3dnow.c
383 SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOWEX) += mp3lib/dct36_k7.c \
384 mp3lib/dct64_k7.c
385 SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_MMX) += mp3lib/dct64_mmx.c
386 SRCS_COMMON-$(MP3LIB)-$(HAVE_ALTIVEC) += mp3lib/dct64_altivec.c
387 SRCS_COMMON-$(MP3LIB)-$(HAVE_MMX) += mp3lib/decode_mmx.c
388 SRCS_COMMON-$(MP3LIB)-$(HAVE_SSE) += mp3lib/dct64_sse.c
389 SRCS_COMMON-$(MUSEPACK) += libmpcodecs/ad_mpc.c \
390 libmpdemux/demux_mpc.c
391 SRCS_COMMON-$(NATIVE_RTSP) += stream/stream_rtsp.c \
392 stream/freesdp/common.c \
393 stream/freesdp/errorlist.c \
394 stream/freesdp/parser.c \
395 stream/librtsp/rtsp.c \
396 stream/librtsp/rtsp_rtp.c \
397 stream/librtsp/rtsp_session.c \
399 SRCS_COMMON-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c
400 SRCS_COMMON-$(NEED_GLOB) += osdep/glob-win.c
401 SRCS_COMMON-$(NEED_MMAP) += osdep/mmap-os2.c
402 SRCS_COMMON-$(NEED_SETENV) += osdep/setenv.c
403 SRCS_COMMON-$(NEED_SHMEM) += osdep/shmem.c
404 SRCS_COMMON-$(NEED_STRSEP) += osdep/strsep.c
405 SRCS_COMMON-$(NEED_SWAB) += osdep/swab.c
406 SRCS_COMMON-$(NEED_VSSCANF) += osdep/vsscanf.c
407 SRCS_COMMON-$(NETWORK) += stream/stream_netstream.c \
408 stream/asf_mmst_streaming.c \
409 stream/asf_streaming.c \
410 stream/cookies.c \
411 stream/http.c \
412 stream/network.c \
413 stream/pnm.c \
414 stream/rtp.c \
415 stream/udp.c \
416 stream/tcp.c \
417 stream/stream_rtp.c \
418 stream/stream_udp.c \
419 stream/librtsp/rtsp.c \
420 stream/realrtsp/asmrp.c \
421 stream/realrtsp/real.c \
422 stream/realrtsp/rmff.c \
423 stream/realrtsp/sdpplin.c \
424 stream/realrtsp/xbuffer.c \
426 SRCS_COMMON-$(PNG) += libmpcodecs/vd_mpng.c
427 SRCS_COMMON-$(PVR) += stream/stream_pvr.c
428 SRCS_COMMON-$(QTX_CODECS) += libmpcodecs/ad_qtaudio.c \
429 libmpcodecs/vd_qtvideo.c
430 SRCS_COMMON-$(QTX_EMULATION) += loader/wrapper.S
431 SRCS_COMMON-$(RADIO) += stream/stream_radio.c
432 SRCS_COMMON-$(RADIO_CAPTURE) += stream/audio_in.c
433 SRCS_COMMON-$(REAL_CODECS) += libmpcodecs/ad_realaud.c \
434 libmpcodecs/vd_realvid.c
435 SRCS_COMMON-$(SPEEX) += libmpcodecs/ad_speex.c
436 SRCS_COMMON-$(STREAM_CACHE) += stream/cache2.c
438 SRCS_COMMON-$(TREMOR_INTERNAL) += tremor/bitwise.c \
439 tremor/block.c \
440 tremor/codebook.c \
441 tremor/floor0.c \
442 tremor/floor1.c \
443 tremor/framing.c \
444 tremor/info.c \
445 tremor/mapping0.c \
446 tremor/mdct.c \
447 tremor/registry.c \
448 tremor/res012.c \
449 tremor/sharedbook.c \
450 tremor/synthesis.c \
451 tremor/window.c \
453 SRCS_COMMON-$(TV) += stream/stream_tv.c stream/tv.c \
454 stream/frequencies.c stream/tvi_dummy.c
455 SRCS_COMMON-$(TV_BSDBT848) += stream/tvi_bsdbt848.c
456 SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c
457 SRCS_COMMON-$(TV_TELETEXT) += stream/tvi_vbi.c
458 SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c
459 SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
460 SRCS_COMMON-$(UNRAR_EXEC) += unrar_exec.c
461 SRCS_COMMON-$(VCD) += stream/stream_vcd.c
462 SRCS_COMMON-$(VSTREAM) += stream/stream_vstream.c
463 SRCS_COMMON-$(WIN32_EMULATION) += loader/elfdll.c \
464 loader/ext.c \
465 loader/ldt_keeper.c \
466 loader/module.c \
467 loader/pe_image.c \
468 loader/pe_resource.c \
469 loader/registry.c \
470 loader/resource.c \
471 loader/win32.c \
473 SRCS_COMMON-$(WIN32DLL) += libmpcodecs/ad_acm.c \
474 libmpcodecs/ad_dmo.c \
475 libmpcodecs/ad_dshow.c \
476 libmpcodecs/ad_twin.c \
477 libmpcodecs/vd_dmo.c \
478 libmpcodecs/vd_dshow.c \
479 libmpcodecs/vd_vfw.c \
480 libmpcodecs/vd_vfwex.c \
481 libmpdemux/demux_avs.c \
482 loader/afl.c \
483 loader/drv.c \
484 loader/vfl.c \
485 loader/dshow/DS_AudioDecoder.c \
486 loader/dshow/DS_Filter.c \
487 loader/dshow/DS_VideoDecoder.c \
488 loader/dshow/allocator.c \
489 loader/dshow/cmediasample.c \
490 loader/dshow/guids.c \
491 loader/dshow/inputpin.c \
492 loader/dshow/mediatype.c \
493 loader/dshow/outputpin.c \
494 loader/dmo/DMO_AudioDecoder.c \
495 loader/dmo/DMO_VideoDecoder.c \
496 loader/dmo/buffer.c \
497 loader/dmo/dmo.c \
498 loader/dmo/dmo_guids.c \
500 SRCS_COMMON-$(XANIM_CODECS) += libmpcodecs/vd_xanim.c
501 SRCS_COMMON-$(XMMS_PLUGINS) += libmpdemux/demux_xmms.c
502 SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c
503 SRCS_COMMON-$(ZR) += libmpcodecs/vd_zrmjpeg.c \
504 libmpcodecs/vf_zrmjpeg.c
506 SRCS_MPLAYER = mplayer.c \
507 m_property.c \
508 mp_fifo.c \
509 mp_msg.c \
510 mixer.c \
511 parser-mpcmd.c \
512 command.c \
513 input/input.c \
514 libao2/audio_out.c \
515 libao2/ao_mpegpes.c \
516 libao2/ao_null.c \
517 libao2/ao_pcm.c \
518 libvo/aspect.c \
519 libvo/geometry.c \
520 libvo/old_vo_wrapper.c \
521 libvo/spuenc.c \
522 libvo/video_out.c \
523 libvo/vo_mpegpes.c \
524 libvo/vo_null.c \
526 SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c
527 SRCS_MPLAYER-$(AA) += libvo/vo_aa.c
528 SRCS_MPLAYER-$(ALSA1X) += libao2/ao_alsa.c
529 SRCS_MPLAYER-$(ALSA5) += libao2/ao_alsa5.c
530 SRCS_MPLAYER-$(ALSA9) += libao2/ao_alsa.c
531 SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
532 SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
533 SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c
534 SRCS_MPLAYER-$(BL) += libvo/vo_bl.c
535 SRCS_MPLAYER-$(CACA) += libvo/vo_caca.c
536 SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_macosx.c
537 SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_macosx.m
538 SRCS_MPLAYER-$(DFBMGA) += libvo/vo_dfbmga.c
539 SRCS_MPLAYER-$(DGA) += libvo/vo_dga.c
540 SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c
541 SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c
542 SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c
543 SRCS_MPLAYER-$(DXR2) += libao2/ao_dxr2.c libvo/vo_dxr2.c
544 SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
545 SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
546 SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c
547 SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c
548 SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
549 SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c libvo/vo_gl2.c
550 SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c
551 SRCS_MPLAYER-$(GUI) += gui/bitmap.c
552 SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \
553 gui/cfg.c \
554 gui/interface.c \
555 gui/mplayer/gui_common.c \
556 gui/mplayer/menu.c \
557 gui/mplayer/mw.c \
558 gui/mplayer/pb.c \
559 gui/mplayer/play.c \
560 gui/mplayer/sw.c \
561 gui/mplayer/widgets.c \
562 gui/mplayer/gtk/about.c \
563 gui/mplayer/gtk/eq.c \
564 gui/mplayer/gtk/fs.c \
565 gui/mplayer/gtk/gtk_common.c \
566 gui/mplayer/gtk/gtk_url.c \
567 gui/mplayer/gtk/mb.c \
568 gui/mplayer/gtk/menu.c \
569 gui/mplayer/gtk/opts.c \
570 gui/mplayer/gtk/pl.c \
571 gui/mplayer/gtk/sb.c \
572 gui/skin/cut.c \
573 gui/skin/font.c \
574 gui/skin/skin.c \
575 gui/wm/ws.c \
576 gui/wm/wsxdnd.c \
578 SRCS_MPLAYER-$(GUI_WIN32) += gui/win32/dialogs.c \
579 gui/win32/gui.c \
580 gui/win32/interface.c \
581 gui/win32/playlist.c \
582 gui/win32/preferences.c \
583 gui/win32/skinload.c \
584 gui/win32/widgetrender.c \
585 gui/win32/wincfg.c \
587 SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c
588 SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
589 SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
590 SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
591 SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
592 libmenu/menu_chapsel.c \
593 libmenu/menu_cmdlist.c \
594 libmenu/menu_console.c \
595 libmenu/menu_filesel.c \
596 libmenu/menu_list.c \
597 libmenu/menu_param.c \
598 libmenu/menu_pt.c \
599 libmenu/menu_txt.c \
600 libmenu/vf_menu.c \
602 SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c
603 SRCS_MPLAYER-$(LIRC) += input/lirc.c
604 SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
605 SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c
606 SRCS_MPLAYER-$(NAS) += libao2/ao_nas.c
607 SRCS_MPLAYER-$(OPENAL) += libao2/ao_openal.c
608 SRCS_MPLAYER-$(OSS) += libao2/ao_oss.c
609 SRCS_MPLAYER-$(PNG) += libvo/vo_png.c
610 SRCS_MPLAYER-$(PNM) += libvo/vo_pnm.c
611 SRCS_MPLAYER-$(PULSE) += libao2/ao_pulse.c
612 SRCS_MPLAYER-$(QUARTZ) += libvo/vo_quartz.c
613 SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
614 SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c
615 SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
616 SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
617 SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
618 SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
619 SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c
620 SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c
621 SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c
622 SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c
623 SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c
624 SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \
625 libvo/vosub_vidix.c \
626 vidix/vidix.c \
627 vidix/drivers.c \
628 vidix/dha.c \
629 vidix/mtrr.c \
630 vidix/pci.c \
631 vidix/pci_names.c \
632 vidix/pci_dev_ids.c\
634 SRCS_MPLAYER-$(VIDIX_CYBERBLADE) += vidix/cyberblade_vid.c
635 SRCS_MPLAYER-$(VIDIX_IVTV) += vidix/ivtv_vid.c
636 SRCS_MPLAYER-$(VIDIX_MACH64) += vidix/mach64_vid.c
637 SRCS_MPLAYER-$(VIDIX_MGA) += vidix/mga_vid.c
638 SRCS_MPLAYER-$(VIDIX_MGA_CRTC2) += vidix/mga_crtc2_vid.c
639 SRCS_MPLAYER-$(VIDIX_NVIDIA) += vidix/nvidia_vid.c
640 SRCS_MPLAYER-$(VIDIX_PM2) += vidix/pm2_vid.c
641 SRCS_MPLAYER-$(VIDIX_PM3) += vidix/pm3_vid.c
642 SRCS_MPLAYER-$(VIDIX_RADEON) += vidix/radeon_vid.c
643 SRCS_MPLAYER-$(VIDIX_RAGE128) += vidix/rage128_vid.c
644 SRCS_MPLAYER-$(VIDIX_S3) += vidix/s3_vid.c
645 SRCS_MPLAYER-$(VIDIX_SH_VEU) += vidix/sh_veu_vid.c
646 SRCS_MPLAYER-$(VIDIX_SIS) += vidix/sis_vid.c vidix/sis_bridge.c
647 SRCS_MPLAYER-$(VIDIX_UNICHROME) += vidix/unichrome_vid.c
648 SRCS_MPLAYER-$(WII) += libvo/vo_wii.c
649 SRCS_MPLAYER-$(WIN32WAVEOUT) += libao2/ao_win32.c
650 SRCS_MPLAYER-$(WINVIDIX) += libvo/vo_winvidix.c
651 SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/vo_xover.c libvo/x11_common.c
652 SRCS_MPLAYER-$(XMGA) += libvo/vo_xmga.c
653 SRCS_MPLAYER-$(XV) += libvo/vo_xv.c
654 SRCS_MPLAYER-$(XVIDIX) += libvo/vo_xvidix.c
655 SRCS_MPLAYER-$(XVMC) += libvo/vo_xvmc.c
656 SRCS_MPLAYER-$(XVR100) += libvo/vo_xvr100.c
657 SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c
658 SRCS_MPLAYER-$(ZR) += libvo/jpeg_enc.c libvo/vo_zr.c libvo/vo_zr2.c
660 SRCS_MENCODER = mencoder.c \
661 mp_msg-mencoder.c \
662 parser-mecmd.c \
663 xvid_vbr.c \
664 libmpcodecs/ae.c \
665 libmpcodecs/ae_pcm.c \
666 libmpcodecs/ve.c \
667 libmpcodecs/ve_raw.c \
668 libmpdemux/muxer.c \
669 libmpdemux/muxer_avi.c \
670 libmpdemux/muxer_mpeg.c \
671 libmpdemux/muxer_rawaudio.c \
672 libmpdemux/muxer_rawvideo.c \
674 SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c
675 SRCS_MENCODER-$(LIBAVCODEC) += libmpcodecs/ae_lavc.c libmpcodecs/ve_lavc.c
676 SRCS_MENCODER-$(LIBAVFORMAT) += libmpdemux/muxer_lavf.c
677 SRCS_MENCODER-$(LIBDV) += libmpcodecs/ve_libdv.c
678 SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c
679 SRCS_MENCODER-$(MP3LAME) += libmpcodecs/ae_lame.c
680 SRCS_MENCODER-$(QTX_CODECS_WIN32) += libmpcodecs/ve_qtvideo.c
681 SRCS_MENCODER-$(TOOLAME) += libmpcodecs/ae_toolame.c
682 SRCS_MENCODER-$(TWOLAME) += libmpcodecs/ae_twolame.c
683 SRCS_MENCODER-$(WIN32DLL) += libmpcodecs/ve_vfw.c
684 SRCS_MENCODER-$(X264) += libmpcodecs/ve_x264.c
685 SRCS_MENCODER-$(XVID4) += libmpcodecs/ve_xvid4.c
687 SRCS_COMMON += $(SRCS_COMMON-yes) $(SRCS_COMMON-yes-yes) $(SRCS_COMMON-yes-yes-yes)
688 SRCS_MENCODER += $(SRCS_MENCODER-yes)
689 SRCS_MPLAYER += $(SRCS_MPLAYER-yes)
691 COMMON_LIBS-$(LIBAVFORMAT_A) += ffmpeg/libavformat/libavformat.a
692 COMMON_LIBS-$(LIBAVCODEC_A) += ffmpeg/libavcodec/libavcodec.a
693 COMMON_LIBS-$(LIBAVUTIL_A) += ffmpeg/libavutil/libavutil.a
694 COMMON_LIBS-$(LIBPOSTPROC_A) += ffmpeg/libpostproc/libpostproc.a
695 COMMON_LIBS-$(LIBSWSCALE_A) += libswscale/libswscale.a
696 COMMON_LIBS += $(COMMON_LIBS-yes)
698 OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
699 OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)))
700 OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)))
701 OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
702 OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
704 MENCODER_DEPS = $(OBJS_MENCODER) $(OBJS_COMMON) $(COMMON_LIBS)
705 MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
706 DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d) $(SRCS_MENCODER))))
708 ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
709 ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
711 INSTALL_TARGETS-$(GUI) += install-gui
712 INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mencoder-man
713 INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man
715 DIRS = . \
716 gui \
717 gui/mplayer \
718 gui/mplayer/gtk \
719 gui/skin \
720 gui/wm \
721 gui/win32 \
722 input \
723 liba52 \
724 libaf \
725 libao2 \
726 libass \
727 ffmpeg/libavcodec \
728 ffmpeg/libavcodec/alpha \
729 ffmpeg/libavcodec/arm \
730 ffmpeg/libavcodec/bfin \
731 ffmpeg/libavcodec/x86 \
732 ffmpeg/libavcodec/mlib \
733 ffmpeg/libavcodec/ppc \
734 ffmpeg/libavcodec/sh4 \
735 ffmpeg/libavcodec/sparc \
736 ffmpeg/libavformat \
737 ffmpeg/libavutil \
738 libdvdcss \
739 libdvdread \
740 libfaad2 \
741 libmenu \
742 libmpcodecs \
743 libmpcodecs/native \
744 libmpdemux \
745 libmpeg2 \
746 ffmpeg/libpostproc \
747 libswscale \
748 libvo \
749 loader \
750 loader/dshow \
751 loader/dmo \
752 mp3lib \
753 osdep \
754 stream \
755 stream/freesdp \
756 stream/librtsp \
757 stream/realrtsp \
758 tremor \
759 TOOLS \
760 vidix \
762 ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h))
764 PARTS = ffmpeg/libavcodec \
765 ffmpeg/libavformat \
766 ffmpeg/libavutil \
767 ffmpeg/libpostproc \
768 libswscale \
770 FFMPEGLIBS = $(foreach part, $(PARTS), $(part)/$(notdir $(part)).a)
771 FFMPEGFILES = $(foreach part, $(PARTS), $(part)/*.[choS]) ffmpeg/libavcodec/*/*.[choS] ffmpeg/libavcodec/*/*.asm
775 ###### generic rules #######
777 all: $(ALL_PRG-yes)
779 %.o: %.c
780 $(CC) $(CFLAGS) -c -o $@ -MD -MP -MF $*.d $<
782 %.o: %.cpp
783 $(CXX) $(CXXFLAGS) -c -o $@ -MD -MP -MF $*.d $<
785 %.o: %.m
786 $(CC) $(CFLAGS) -c -o $@ -MD -MP -MF $*.d $<
788 %.ho: %.h
789 $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
791 %-rc.o: %.rc
792 $(WINDRES) -I. $< $@
794 checkheaders: $(ALLHEADERS:.h=.ho)
796 dep depend: $(DEPS)
797 for part in $(PARTS); do $(MAKE) -C $$part depend; done
799 # dummy to prevent default build rules from being used for FFMPEGFILES
800 $(FFMPEGFILES):
801 echo "this shouldn't run"
803 $(FFMPEGLIBS): $(FFMPEGFILES) config.h
804 $(MAKE) -C $(@D)
805 touch $@
807 mencoder$(EXESUF): $(MENCODER_DEPS)
808 $(CC) -o $@ $^ $(LDFLAGS_MENCODER)
810 mplayer$(EXESUF): $(MPLAYER_DEPS)
811 $(CC) -o $@ $^ $(LDFLAGS_MPLAYER)
813 codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
814 $(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $<
816 codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
817 ./$^ > $@
819 # ./configure must be rerun if it changed
820 config.mak: configure
821 @echo "############################################################"
822 @echo "####### Please run ./configure again - it's changed! #######"
823 @echo "############################################################"
825 help_mp.h: help/help_mp-en.h $(HELP_FILE)
826 help/help_create.sh $(HELP_FILE) $(CHARSET)
828 # rebuild version.h each time the working copy is updated
829 ifeq ($(wildcard .svn/entries),.svn/entries)
830 version.h: .svn/entries
831 endif
832 version.h:
833 ./version.sh `$(CC) -dumpversion`
835 %(EXESUF): %.c
839 ###### dependency declarations / specific CFLAGS ######
841 codec-cfg.o: codecs.conf.h
842 mencoder.o mplayer.o vobsub.o gui/win32/gui.o libmpdemux/muxer_avi.o osdep/mplayer-rc.o stream/network.o stream/stream_cddb.o: version.h
843 $(DEPS): help_mp.h
845 libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\" $(CFLAGS_LIBDVDCSS)
846 libdvdread/%.o libdvdread/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD)
847 libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED)
849 loader/% loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
850 #loader/%.o loader/%.d: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
851 loader/win32.o loader/win32.d: CFLAGS += $(CFLAGS_STACKREALIGN)
853 mp3lib/decode_i586.o: CFLAGS += -fomit-frame-pointer
855 tremor/%.o tremor/%.d: CFLAGS += $(CFLAGS_TREMOR_LOW)
857 vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER)
859 VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \
860 vidix/pci_names.h vidix/pci_vendors.h
862 $(VIDIX_PCI_FILES): vidix/pci.db vidix/pci_db2c.awk
863 awk -f vidix/pci_db2c.awk $< $(VIDIX_PCIDB)
865 VIDIX_DEPS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.d))
866 VIDIX_OBJS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.o))
868 $(VIDIX_DEPS) $(VIDIX_OBJS): $(VIDIX_PCI_FILES)
872 ###### installation / clean / generic rules #######
874 install: $(INSTALL_TARGETS-yes)
876 install-dirs:
877 if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
878 if test ! -d $(CONFDIR) ; then $(INSTALL) -d $(CONFDIR) ; fi
879 if test ! -d $(LIBDIR) ; then $(INSTALL) -d $(LIBDIR) ; fi
881 install-%: %$(EXESUF) install-dirs
882 $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
884 install-gui: install-mplayer
885 -ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
886 $(INSTALL) -d $(DATADIR)/skins $(prefix)/share/pixmaps $(prefix)/share/applications
887 $(INSTALL) -m 644 etc/mplayer.xpm $(prefix)/share/pixmaps/
888 $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/
890 install-mencoder-man: $(foreach lang,$(MAN_LANGS),install-mencoder-man-$(lang))
891 install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang))
893 install-mencoder-man-en: install-mplayer-man-en
894 cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1
896 install-mplayer-man-en:
897 if test ! -d $(MANDIR)/man1 ; then $(INSTALL) -d $(MANDIR)/man1 ; fi
898 $(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
900 define MENCODER_MAN_RULE
901 install-mencoder-man-$(lang): install-mplayer-man-$(lang)
902 cd $(MANDIR)/$(lang)/man1 && ln -sf mplayer.1 mencoder.1
903 endef
905 define MPLAYER_MAN_RULE
906 install-mplayer-man-$(lang):
907 if test ! -d $(MANDIR)/$(lang)/man1 ; then $(INSTALL) -d $(MANDIR)/$(lang)/man1 ; fi
908 $(INSTALL) -c -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
909 endef
911 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MENCODER_MAN_RULE)))
912 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE)))
914 uninstall:
915 rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
916 rm -f $(BINDIR)/mencoder$(EXESUF)
917 rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1
918 rm -f $(prefix)/share/pixmaps/mplayer.xpm
919 rm -f $(prefix)/share/applications/mplayer.desktop
920 rm -f $(MANDIR)/man1/mplayer.1 $(MANDIR)/man1/mencoder.1
921 rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man)))
923 clean:
924 rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.o /*.a /*.ho /*~, $(addsuffix $(suffix),$(dir))))
925 rm -f mplayer$(EXESUF) mencoder$(EXESUF)
927 distclean: clean testsclean toolsclean driversclean dhahelperclean dhahelperwinclean
928 rm -rf DOCS/tech/doxygen
929 rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
930 rm -f configure.log config.mak config.h codecs.conf.h help_mp.h \
931 version.h $(VIDIX_PCI_FILES) \
932 codec-cfg$(EXESUF) cpuinfo$(EXESUF) TAGS tags
934 doxygen:
935 doxygen DOCS/tech/Doxyfile
937 TAGS:
938 rm -f $@; ( find -name '*.[chS]' -o -name '*.asm' -print ) | xargs etags -a
940 tags:
941 rm -f $@; ( find -name '*.[chS]' -o -name '*.asm' -print ) | xargs ctags -a
945 ###### tests / tools #######
947 TEST_OBJS = mp_msg-mencoder.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
949 codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h codec-cfg.h $(TEST_OBJS)
950 $(CC) -I. -DTESTING -o $@ $^
952 codecs2html$(EXESUF): codec-cfg.c $(TEST_OBJS)
953 $(CC) -I. -DCODECS2HTML -o $@ $^
955 liba52/test$(EXESUF): cpudetect.o $(filter liba52/%,$(SRCS_COMMON:.c=.o)) -lm
957 libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
959 LOADER_TEST_OBJS = $(filter loader/%,$(SRCS_COMMON:.c=.o)) libmpdemux/aviprint.o osdep/mmap_anon.o cpudetect.o $(TEST_OBJS)
961 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
962 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
964 mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF): $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS)
966 TESTS = codecs2html$(EXESUF) codec-cfg-test$(EXESUF) \
967 liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \
968 mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF)
970 ifdef ARCH_X86
971 TESTS += loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF)
972 endif
974 tests: $(TESTS)
976 testsclean:
977 rm -f $(TESTS)
979 TOOLS = TOOLS/alaw-gen$(EXESUF) \
980 TOOLS/asfinfo$(EXESUF) \
981 TOOLS/avi-fix$(EXESUF) \
982 TOOLS/avisubdump$(EXESUF) \
983 TOOLS/compare$(EXESUF) \
984 TOOLS/dump_mp4$(EXESUF) \
985 TOOLS/movinfo$(EXESUF) \
986 TOOLS/netstream$(EXESUF) \
987 TOOLS/subrip$(EXESUF) \
988 TOOLS/vivodump$(EXESUF) \
990 ifdef ARCH_X86
991 TOOLS += TOOLS/modify_reg$(EXESUF)
992 endif
994 ALLTOOLS = $(TOOLS) \
995 TOOLS/bmovl-test$(EXESUF) \
996 TOOLS/vfw2menc$(EXESUF) \
998 tools: $(TOOLS)
999 alltools: $(ALLTOOLS)
1001 toolsclean:
1002 rm -f $(ALLTOOLS) TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
1004 TOOLS/bmovl-test$(EXESUF): -lSDL_image
1006 TOOLS/subrip$(EXESUF): vobsub.o spudec.o unrar_exec.o libvo/aclib.o \
1007 libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS)
1009 TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
1011 mplayer-nomain.o: mplayer.c
1012 $(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
1014 TOOLS/netstream$(EXESUF): TOOLS/netstream.c
1015 TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
1016 TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS)
1017 $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS)
1019 fastmemcpybench: TOOLS/fastmemcpybench.c
1020 $(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX
1021 $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_3DNOW
1022 $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
1023 $(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
1024 $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DCONFIG_MGA -DHAVE_MMX
1025 $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_3DNOW
1026 $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
1027 $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DCONFIG_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
1029 REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
1030 REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
1032 realcodecs: $(REAL_TARGETS)
1034 fastmemcpybench realcodecs: CFLAGS += -g
1036 %.so.6.0: %.o
1037 ld -shared -o $@ $< -ldl -lc
1041 ###### drivers #######
1043 KERNEL_INC = /lib/modules/`uname -r`/build/include
1044 KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
1045 KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h
1046 KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o)
1047 MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc
1048 DRIVER_OBJS = $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test
1050 drivers: $(DRIVER_OBJS)
1052 $(DRIVER_OBJS): CFLAGS = $(KERNEL_CFLAGS)
1053 drivers/mga_vid.o: drivers/mga_vid.c drivers/mga_vid.h
1054 drivers/tdfx_vid.o: drivers/tdfx_vid.c drivers/3dfx.h
1055 drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
1056 drivers/radeon_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
1057 drivers/rage128_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
1058 $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
1060 install-drivers: $(DRIVER_OBJS)
1061 -mkdir -p $(MODULES_DIR)
1062 install -m 644 $(KERNEL_OBJS) $(MODULES_DIR)
1063 depmod -a
1064 -mknod /dev/mga_vid c 178 0
1065 -mknod /dev/tdfx_vid c 178 0
1066 -mknod /dev/radeon_vid c 178 0
1067 -ln -s /dev/radeon_vid /dev/rage128_vid
1069 driversclean:
1070 rm -f $(DRIVER_OBJS) drivers/*~
1072 dhahelper: vidix/dhahelper/dhahelper.o vidix/dhahelper/test
1074 vidix/dhahelper/dhahelper.o vidix/dhahelper/test: CFLAGS = $(KERNEL_CFLAGS)
1075 vidix/dhahelper/dhahelper.o: vidix/dhahelper/dhahelper.c vidix/dhahelper/dhahelper.h
1077 install-dhahelper: vidix/dhahelper/dhahelper.o
1078 -mkdir -p $(MODULES_DIR)
1079 install -m 644 $< $(MODULES_DIR)
1080 depmod -a
1081 -mknod /dev/dhahelper c 180 0
1083 dhahelperclean:
1084 rm -f vidix/dhahelper/*.o vidix/dhahelper/*~ vidix/dhahelper/test
1086 dhahelperwin: vidix/dhahelperwin/dhasetup.exe vidix/dhahelperwin/dhahelper.sys
1088 vidix/dhahelperwin/dhasetup.exe: vidix/dhahelperwin/dhasetup.c
1089 $(CC) -o $@ $<
1091 vidix/dhahelperwin/dhahelper.o: vidix/dhahelperwin/dhahelper.c vidix/dhahelperwin/dhahelper.h
1092 $(CC) -Wall -Os -c $< -o $@
1094 vidix/dhahelperwin/dhahelper-rc.o: vidix/dhahelperwin/common.ver vidix/dhahelperwin/ntverp.h
1096 vidix/dhahelperwin/base.tmp: vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o
1097 $(CC) -Wl,--base-file,$@ -Wl,--entry,_DriverEntry@8 -nostartfiles \
1098 -nostdlib -o vidix/dhahelperwin/junk.tmp $^ -lntoskrnl
1099 -rm -f vidix/dhahelperwin/junk.tmp
1101 vidix/dhahelperwin/temp.exp: vidix/dhahelperwin/base.tmp
1102 dlltool --dllname vidix/dhahelperwin/dhahelper.sys --base-file $< --output-exp $@
1104 vidix/dhahelperwin/dhahelper.sys: vidix/dhahelperwin/temp.exp vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o
1105 $(CC) -Wl,--subsystem,native -Wl,--image-base,0x10000 \
1106 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 \
1107 -Wl,--entry,_DriverEntry@8 -Wl,$< -mdll -nostartfiles -nostdlib \
1108 -o $@ vidix/dhahelperwin/dhahelper.o \
1109 vidix/dhahelperwin/dhahelper-rc.o -lntoskrnl
1110 strip $@
1112 install-dhahelperwin:
1113 vidix/dhahelperwin/dhasetup.exe install
1115 dhahelperwinclean:
1116 rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp)
1120 # Do not include dependencies when they are about to be removed anyway.
1121 ifneq ($(MAKECMDGOALS),distclean)
1122 -include $(DEPS)
1123 endif
1125 .PHONY: all doxygen *install* *tools drivers dhahelper*
1126 .PHONY: checkheaders *clean dep depend tests