stream: http: Allow setting custom http header
[mplayer/greg.git] / Makefile
blobf362a814eeff22062ed70483b0a3bacabad6fcc3
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
24 ###### variable declarations #######
26 SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c
27 SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c
28 SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
29 SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes)
30 SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c
31 SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \
32 stream/cdinfo.c
33 SRCS_COMMON-$(CDDB) += stream/stream_cddb.c
34 SRCS_COMMON-$(DVBIN) += stream/dvb_tune.c \
35 stream/stream_dvb.c
36 SRCS_COMMON-$(DVDNAV) += stream/stream_dvdnav.c
37 SRCS_COMMON-$(DVDNAV_INTERNAL) += libdvdnav/dvdnav.c \
38 libdvdnav/highlight.c \
39 libdvdnav/navigation.c \
40 libdvdnav/read_cache.c \
41 libdvdnav/remap.c \
42 libdvdnav/searching.c \
43 libdvdnav/settings.c \
44 libdvdnav/vm/decoder.c \
45 libdvdnav/vm/vm.c \
46 libdvdnav/vm/vmcmd.c \
48 SRCS_COMMON-$(DVDREAD) += stream/stream_dvd.c \
49 stream/stream_dvd_common.c
50 SRCS_COMMON-$(DVDREAD_INTERNAL) += libdvdread4/bitreader.c \
51 libdvdread4/dvd_input.c \
52 libdvdread4/dvd_reader.c \
53 libdvdread4/dvd_udf.c \
54 libdvdread4/ifo_print.c \
55 libdvdread4/ifo_read.c \
56 libdvdread4/md5.c \
57 libdvdread4/nav_print.c \
58 libdvdread4/nav_read.c \
60 SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c
61 SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c
62 SRCS_COMMON-$(FFMPEG) += libmpcodecs/vf_pp.c \
63 av_opts.c \
64 libaf/af_lavcac3enc.c \
65 libaf/af_lavcresample.c \
66 libmpcodecs/ad_ffmpeg.c \
67 libmpcodecs/vd_ffmpeg.c \
68 libmpcodecs/vf_lavc.c \
69 libmpcodecs/vf_lavcdeint.c \
70 libmpcodecs/vf_screenshot.c \
71 libmpcodecs/vf_uspp.c \
72 libmpdemux/demux_lavf.c \
73 stream/stream_ffmpeg.c \
74 sub/av_sub.c \
76 # Requires a new enough libavutil that installs eval.h
77 SRCS_COMMON-$(FFMPEG_EVAL_API) += libmpcodecs/vf_geq.c \
79 # These filters use private headers and do not work with shared libavcodec.
80 SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_fspp.c \
81 libmpcodecs/vf_geq.c \
82 libmpcodecs/vf_mcdeint.c \
83 libmpcodecs/vf_qp.c \
84 libmpcodecs/vf_spp.c \
86 SRCS_COMMON-$(FREETYPE) += sub/font_load_ft.c
87 SRCS_COMMON-$(FTP) += stream/stream_ftp.c
88 SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c
89 SRCS_COMMON-$(HAVE_POSIX_SELECT) += libmpcodecs/vf_bmovl.c
90 SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c
91 SRCS_COMMON-$(JPEG) += libmpcodecs/vd_ijpg.c
92 SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c
93 SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_liba52.c
94 SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \
95 sub/ass_mp.c \
96 sub/sd_ass.c \
98 SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c
99 SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c
100 SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
101 SRCS_COMMON-$(LIBDV) += libmpcodecs/ad_libdv.c \
102 libmpcodecs/vd_libdv.c \
103 libmpdemux/demux_rawdv.c
104 SRCS_COMMON-$(LIBDVDCSS_INTERNAL) += libdvdcss/css.c \
105 libdvdcss/device.c \
106 libdvdcss/error.c \
107 libdvdcss/ioctl.c \
108 libdvdcss/libdvdcss.c \
110 SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
112 SRCS_COMMON-$(LIBNEMESI) += libmpdemux/demux_nemesi.c \
113 stream/stream_nemesi.c
114 SRCS_COMMON-$(LIBNUT) += libmpdemux/demux_nut.c
115 SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
117 SRCS_COMMON-$(LIBTHEORA) += libmpcodecs/vd_theora.c
118 SRCS_COMMON-$(LIVE555) += libmpdemux/demux_rtp.cpp \
119 libmpdemux/demux_rtp_codec.cpp \
120 stream/stream_live555.c
121 SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.c
122 SRCS_COMMON-$(MNG) += libmpdemux/demux_mng.c
123 SRCS_COMMON-$(MPG123) += libmpcodecs/ad_mpg123.c
125 SRCS_COMMON-$(MUSEPACK) += libmpcodecs/ad_mpc.c \
126 libmpdemux/demux_mpc.c
127 SRCS_COMMON-$(NATIVE_RTSP) += stream/stream_rtsp.c \
128 stream/freesdp/common.c \
129 stream/freesdp/errorlist.c \
130 stream/freesdp/parser.c \
131 stream/librtsp/rtsp.c \
132 stream/librtsp/rtsp_rtp.c \
133 stream/librtsp/rtsp_session.c \
135 SRCS_COMMON-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c
136 SRCS_COMMON-$(NEED_GLOB) += osdep/glob-win.c
137 SRCS_COMMON-$(NEED_MMAP) += osdep/mmap-os2.c
138 SRCS_COMMON-$(NEED_SETENV) += osdep/setenv.c
139 SRCS_COMMON-$(NEED_SHMEM) += osdep/shmem.c
140 SRCS_COMMON-$(NEED_STRSEP) += osdep/strsep.c
141 SRCS_COMMON-$(NEED_SWAB) += osdep/swab.c
142 SRCS_COMMON-$(NEED_VSSCANF) += osdep/vsscanf.c
143 SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \
144 stream/asf_mmst_streaming.c \
145 stream/asf_streaming.c \
146 stream/cookies.c \
147 stream/http.c \
148 stream/network.c \
149 stream/pnm.c \
150 stream/rtp.c \
151 stream/udp.c \
152 stream/tcp.c \
153 stream/stream_rtp.c \
154 stream/stream_udp.c \
155 stream/librtsp/rtsp.c \
156 stream/realrtsp/asmrp.c \
157 stream/realrtsp/real.c \
158 stream/realrtsp/rmff.c \
159 stream/realrtsp/sdpplin.c \
160 stream/realrtsp/xbuffer.c \
162 SRCS_COMMON-$(PNG) += libmpcodecs/vd_mpng.c
163 SRCS_COMMON-$(PRIORITY) += osdep/priority.c
164 SRCS_COMMON-$(PVR) += stream/stream_pvr.c
165 SRCS_COMMON-$(QTX_CODECS) += libmpcodecs/ad_qtaudio.c \
166 libmpcodecs/vd_qtvideo.c
167 SRCS_COMMON-$(RADIO) += stream/stream_radio.c
168 SRCS_COMMON-$(RADIO_CAPTURE) += stream/audio_in.c
169 SRCS_COMMON-$(REAL_CODECS) += libmpcodecs/ad_realaud.c \
170 libmpcodecs/vd_realvid.c
171 SRCS_COMMON-$(SPEEX) += libmpcodecs/ad_speex.c
172 SRCS_COMMON-$(STREAM_CACHE) += stream/cache2.c
174 SRCS_COMMON-$(TV) += stream/stream_tv.c stream/tv.c \
175 stream/frequencies.c stream/tvi_dummy.c
176 SRCS_COMMON-$(TV_BSDBT848) += stream/tvi_bsdbt848.c
177 SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c \
178 loader/dshow/guids.c \
179 loader/dshow/mediatype.c \
181 SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c
182 SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
183 SRCS_COMMON-$(UNRAR_EXEC) += sub/unrar_exec.c
184 SRCS_COMMON-$(VCD) += stream/stream_vcd.c
185 SRCS_COMMON-$(VORBIS) += libmpcodecs/ad_libvorbis.c \
186 libmpdemux/demux_ogg.c
187 SRCS_COMMON-$(VSTREAM) += stream/stream_vstream.c
188 SRCS_QTX_EMULATION += loader/wrapper.S
189 SRCS_COMMON-$(QTX_EMULATION) += $(SRCS_QTX_EMULATION)
190 SRCS_WIN32_EMULATION += loader/elfdll.c \
191 loader/ext.c \
192 loader/ldt_keeper.c \
193 loader/module.c \
194 loader/pe_image.c \
195 loader/pe_resource.c \
196 loader/registry.c \
197 loader/resource.c \
198 loader/win32.c \
200 SRCS_COMMON-$(WIN32_EMULATION) += $(SRCS_WIN32_EMULATION)
202 SRCS_COMMON-$(WIN32DLL) += libmpcodecs/ad_acm.c \
203 libmpcodecs/ad_dmo.c \
204 libmpcodecs/ad_dshow.c \
205 libmpcodecs/ad_twin.c \
206 libmpcodecs/vd_dmo.c \
207 libmpcodecs/vd_dshow.c \
208 libmpcodecs/vd_vfw.c \
209 libmpcodecs/vd_vfwex.c \
210 libmpdemux/demux_avs.c \
211 loader/afl.c \
212 loader/drv.c \
213 loader/vfl.c \
214 loader/dshow/DS_AudioDecoder.c \
215 loader/dshow/DS_Filter.c \
216 loader/dshow/DS_VideoDecoder.c \
217 loader/dshow/allocator.c \
218 loader/dshow/cmediasample.c \
219 loader/dshow/graph.c \
220 loader/dshow/guids.c \
221 loader/dshow/inputpin.c \
222 loader/dshow/mediatype.c \
223 loader/dshow/outputpin.c \
224 loader/dmo/DMO_AudioDecoder.c \
225 loader/dmo/DMO_VideoDecoder.c \
226 loader/dmo/buffer.c \
227 loader/dmo/dmo.c \
228 loader/dmo/dmo_guids.c \
230 SRCS_COMMON-$(XANIM_CODECS) += libmpcodecs/vd_xanim.c
231 SRCS_COMMON-$(XMMS_PLUGINS) += libmpdemux/demux_xmms.c
232 SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c
233 SRCS_COMMON = asxparser.c \
234 av_log.c \
235 bstr.c \
236 codec-cfg.c \
237 cpudetect.c \
238 defaultopts.c \
239 edl.c \
240 fmt-conversion.c \
241 m_config.c \
242 m_option.c \
243 m_struct.c \
244 mp_msg.c \
245 mpcommon.c \
246 parser-cfg.c \
247 path.c \
248 playtree.c \
249 playtreeparser.c \
250 subopt-helper.c \
251 talloc.c \
252 libaf/af.c \
253 libaf/af_center.c \
254 libaf/af_channels.c \
255 libaf/af_comp.c \
256 libaf/af_delay.c \
257 libaf/af_dummy.c \
258 libaf/af_equalizer.c \
259 libaf/af_extrastereo.c \
260 libaf/af_format.c \
261 libaf/af_gate.c \
262 libaf/af_hrtf.c \
263 libaf/af_karaoke.c \
264 libaf/af_pan.c \
265 libaf/af_resample.c \
266 libaf/af_scaletempo.c \
267 libaf/af_sinesuppress.c \
268 libaf/af_stats.c \
269 libaf/af_sub.c \
270 libaf/af_surround.c \
271 libaf/af_sweep.c \
272 libaf/af_tools.c \
273 libaf/af_volnorm.c \
274 libaf/af_volume.c \
275 libaf/filter.c \
276 libaf/format.c \
277 libaf/reorder_ch.c \
278 libaf/window.c \
279 libmpcodecs/ad.c \
280 libmpcodecs/ad_alaw.c \
281 libmpcodecs/ad_dk3adpcm.c \
282 libmpcodecs/ad_dvdpcm.c \
283 libmpcodecs/ad_hwac3.c \
284 libmpcodecs/ad_hwmpa.c \
285 libmpcodecs/ad_imaadpcm.c \
286 libmpcodecs/ad_msadpcm.c \
287 libmpcodecs/ad_pcm.c \
288 libmpcodecs/dec_audio.c \
289 libmpcodecs/dec_teletext.c \
290 libmpcodecs/dec_video.c \
291 libmpcodecs/img_format.c \
292 libmpcodecs/mp_image.c \
293 libmpcodecs/pullup.c \
294 libmpcodecs/vd.c \
295 libmpcodecs/vd_hmblck.c \
296 libmpcodecs/vd_lzo.c \
297 libmpcodecs/vd_mpegpes.c \
298 libmpcodecs/vd_mtga.c \
299 libmpcodecs/vd_null.c \
300 libmpcodecs/vd_raw.c \
301 libmpcodecs/vd_sgi.c \
302 libmpcodecs/vf.c \
303 libmpcodecs/vf_1bpp.c \
304 libmpcodecs/vf_2xsai.c \
305 libmpcodecs/vf_blackframe.c \
306 libmpcodecs/vf_boxblur.c \
307 libmpcodecs/vf_crop.c \
308 libmpcodecs/vf_cropdetect.c \
309 libmpcodecs/vf_decimate.c \
310 libmpcodecs/vf_delogo.c \
311 libmpcodecs/vf_denoise3d.c \
312 libmpcodecs/vf_detc.c \
313 libmpcodecs/vf_dint.c \
314 libmpcodecs/vf_divtc.c \
315 libmpcodecs/vf_down3dright.c \
316 libmpcodecs/vf_dsize.c \
317 libmpcodecs/vf_dvbscale.c \
318 libmpcodecs/vf_eq.c \
319 libmpcodecs/vf_eq2.c \
320 libmpcodecs/vf_expand.c \
321 libmpcodecs/vf_field.c \
322 libmpcodecs/vf_fil.c \
323 libmpcodecs/vf_filmdint.c \
324 libmpcodecs/vf_fixpts.c \
325 libmpcodecs/vf_flip.c \
326 libmpcodecs/vf_format.c \
327 libmpcodecs/vf_framestep.c \
328 libmpcodecs/vf_gradfun.c \
329 libmpcodecs/vf_halfpack.c \
330 libmpcodecs/vf_harddup.c \
331 libmpcodecs/vf_hqdn3d.c \
332 libmpcodecs/vf_hue.c \
333 libmpcodecs/vf_il.c \
334 libmpcodecs/vf_ilpack.c \
335 libmpcodecs/vf_ivtc.c \
336 libmpcodecs/vf_kerndeint.c \
337 libmpcodecs/vf_mirror.c \
338 libmpcodecs/vf_noformat.c \
339 libmpcodecs/vf_noise.c \
340 libmpcodecs/vf_ow.c \
341 libmpcodecs/vf_palette.c \
342 libmpcodecs/vf_perspective.c \
343 libmpcodecs/vf_phase.c \
344 libmpcodecs/vf_pp7.c \
345 libmpcodecs/vf_pullup.c \
346 libmpcodecs/vf_rectangle.c \
347 libmpcodecs/vf_remove_logo.c \
348 libmpcodecs/vf_rgbtest.c \
349 libmpcodecs/vf_rotate.c \
350 libmpcodecs/vf_sab.c \
351 libmpcodecs/vf_scale.c \
352 libmpcodecs/vf_smartblur.c \
353 libmpcodecs/vf_softpulldown.c \
354 libmpcodecs/vf_stereo3d.c \
355 libmpcodecs/vf_softskip.c \
356 libmpcodecs/vf_swapuv.c \
357 libmpcodecs/vf_telecine.c \
358 libmpcodecs/vf_test.c \
359 libmpcodecs/vf_tfields.c \
360 libmpcodecs/vf_tile.c \
361 libmpcodecs/vf_tinterlace.c \
362 libmpcodecs/vf_unsharp.c \
363 libmpcodecs/vf_vo.c \
364 libmpcodecs/vf_yadif.c \
365 libmpcodecs/vf_yuvcsp.c \
366 libmpcodecs/vf_yvu9.c \
367 libmpdemux/aac_hdr.c \
368 libmpdemux/asfheader.c \
369 libmpdemux/aviheader.c \
370 libmpdemux/aviprint.c \
371 libmpdemux/demuxer.c \
372 libmpdemux/demux_aac.c \
373 libmpdemux/demux_asf.c \
374 libmpdemux/demux_audio.c \
375 libmpdemux/demux_avi.c \
376 libmpdemux/demux_demuxers.c \
377 libmpdemux/demux_film.c \
378 libmpdemux/demux_fli.c \
379 libmpdemux/demux_lmlm4.c \
380 libmpdemux/demux_mf.c \
381 libmpdemux/demux_mkv.c \
382 libmpdemux/demux_mov.c \
383 libmpdemux/demux_mpg.c \
384 libmpdemux/demux_nsv.c \
385 libmpdemux/demux_pva.c \
386 libmpdemux/demux_rawaudio.c \
387 libmpdemux/demux_rawvideo.c \
388 libmpdemux/demux_realaud.c \
389 libmpdemux/demux_real.c \
390 libmpdemux/demux_roq.c \
391 libmpdemux/demux_smjpeg.c \
392 libmpdemux/demux_ts.c \
393 libmpdemux/demux_ty.c \
394 libmpdemux/demux_viv.c \
395 libmpdemux/demux_vqf.c \
396 libmpdemux/demux_y4m.c \
397 libmpdemux/ebml.c \
398 libmpdemux/extension.c \
399 libmpdemux/mf.c \
400 libmpdemux/mp3_hdr.c \
401 libmpdemux/mp_taglists.c \
402 libmpdemux/mpeg_hdr.c \
403 libmpdemux/mpeg_packetizer.c \
404 libmpdemux/parse_es.c \
405 libmpdemux/parse_mp4.c \
406 libmpdemux/video.c \
407 libmpdemux/yuv4mpeg.c \
408 libmpdemux/yuv4mpeg_ratio.c \
409 libvo/osd.c \
410 osdep/findfiles.c \
411 osdep/numcores.c \
412 osdep/$(GETCH) \
413 osdep/$(TIMER) \
414 stream/open.c \
415 stream/stream.c \
416 stream/stream_cue.c \
417 stream/stream_file.c \
418 stream/stream_mf.c \
419 stream/stream_null.c \
420 stream/url.c \
421 sub/sub.c \
422 sub/sub_cc.c \
423 sub/dec_sub.c \
424 sub/find_sub.c \
425 sub/spudec.c \
426 sub/subassconvert.c \
427 sub/subreader.c \
428 sub/vobsub.c \
429 $(SRCS_COMMON-yes)
432 SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c
433 SRCS_MPLAYER-$(AA) += libvo/vo_aa.c
434 SRCS_MPLAYER-$(ALSA1X) += libao2/ao_alsa.c
435 SRCS_MPLAYER-$(ALSA5) += libao2/ao_alsa5.c
436 SRCS_MPLAYER-$(ALSA9) += libao2/ao_alsa.c
437 SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
438 SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
439 SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c
440 SRCS_MPLAYER-$(BL) += libvo/vo_bl.c
441 SRCS_MPLAYER-$(CACA) += libvo/vo_caca.c
442 SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_coreaudio.c
443 SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_corevideo.m libvo/osx_common.c
444 SRCS_MPLAYER-$(DART) += libao2/ao_dart.c
445 SRCS_MPLAYER-$(DGA) += libvo/vo_dga.c
446 SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c
447 SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c libvo/vo_dfbmga.c
448 SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c
449 SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
450 SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
451 SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c
452 SRCS_MPLAYER-$(FFMPEG) += libvo/vo_png.c
453 SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c
454 SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
455 SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \
456 libvo/vo_gl2.c libvo/csputils.c \
457 pnm_loader.c
458 SRCS_MPLAYER-$(GL_SDL) += libvo/sdl_common.c
459 SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c
460 SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c
461 SRCS_MPLAYER-$(MATRIXVIEW) += libvo/vo_matrixview.c libvo/matrixview.c
463 SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c
464 SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
465 SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
466 SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
467 SRCS_MPLAYER-$(KAI) += libao2/ao_kai.c
468 SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
469 SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
470 libmenu/menu_chapsel.c \
471 libmenu/menu_cmdlist.c \
472 libmenu/menu_console.c \
473 libmenu/menu_filesel.c \
474 libmenu/menu_list.c \
475 libmenu/menu_param.c \
476 libmenu/menu_pt.c \
477 libmenu/menu_txt.c \
478 libmenu/vf_menu.c \
480 SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c
481 SRCS_MPLAYER-$(LIRC) += input/lirc.c
482 SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
483 SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c
484 SRCS_MPLAYER-$(NAS) += libao2/ao_nas.c
485 SRCS_MPLAYER-$(OPENAL) += libao2/ao_openal.c
486 SRCS_MPLAYER-$(OSS) += libao2/ao_oss.c
487 SRCS_MPLAYER-$(PNM) += libvo/vo_pnm.c
488 SRCS_MPLAYER-$(PULSE) += libao2/ao_pulse.c
489 SRCS_MPLAYER-$(QUARTZ) += libvo/vo_quartz.c libvo/osx_common.c
490 SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
491 SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c
492 SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
493 SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
494 SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
495 SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
496 SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c
497 SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c
498 SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c
499 SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c
500 SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c
501 SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c
503 SRCS_MPLAYER-$(WII) += libvo/vo_wii.c
504 SRCS_MPLAYER-$(WIN32WAVEOUT) += libao2/ao_win32.c
505 SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/vo_xover.c \
506 libvo/x11_common.c
507 SRCS_MPLAYER-$(XMGA) += libvo/vo_xmga.c
508 SRCS_MPLAYER-$(XV) += libvo/vo_xv.c
509 SRCS_MPLAYER-$(XVMC) += libvo/vo_xvmc.c
510 SRCS_MPLAYER-$(XVR100) += libvo/vo_xvr100.c
511 SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c
513 SRCS_MPLAYER = command.c \
514 m_property.c \
515 mixer.c \
516 mp_fifo.c \
517 mplayer.c \
518 parser-mpcmd.c \
519 input/input.c \
520 libao2/ao_mpegpes.c \
521 libao2/ao_null.c \
522 libao2/ao_pcm.c \
523 libao2/audio_out.c \
524 libvo/aspect.c \
525 libvo/geometry.c \
526 libvo/old_vo_wrapper.c \
527 libvo/spuenc.c \
528 libvo/video_out.c \
529 libvo/vo_mpegpes.c \
530 libvo/vo_null.c \
531 $(SRCS_MPLAYER-yes)
533 COMMON_LIBS += $(COMMON_LIBS-yes)
535 OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
536 OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)))
537 OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
538 OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
540 MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
541 DEP_FILES = $(patsubst %.S,%.d,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d))))
543 ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
545 INSTALL_TARGETS-$(MPLAYER) += install-mplayer \
546 install-mplayer-man \
547 install-mplayer-msg
549 DIRS = . \
550 input \
551 libaf \
552 libao2 \
553 libdvdcss \
554 libdvdnav \
555 libdvdnav/vm \
556 libdvdread4 \
557 libmenu \
558 libmpcodecs \
559 libmpcodecs/native \
560 libmpdemux \
561 libvo \
562 loader \
563 loader/dshow \
564 loader/dmo \
565 loader/wine \
566 osdep \
567 stream \
568 stream/freesdp \
569 stream/librtsp \
570 stream/realrtsp \
571 sub \
572 TOOLS \
574 MOFILES := $(MSG_LANGS:%=locale/%/LC_MESSAGES/mplayer.mo)
576 ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h))
578 ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2)))
579 ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(DIRS))
580 ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
582 ###### generic rules #######
584 all: $(ALL_PRG-yes) locales
586 %.o: %.S
587 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
589 %.o: %.c
590 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
592 %.o: %.cpp
593 $(CC) $(DEPFLAGS) $(CXXFLAGS) -c -o $@ $<
595 %.o: %.m
596 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
598 %-rc.o: %.rc
599 $(WINDRES) -I. $< $@
601 mplayer$(EXESUF): $(MPLAYER_DEPS)
602 mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
603 mplayer$(EXESUF):
604 $(CC) -o $@ $^ $(EXTRALIBS)
606 codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h
607 $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $<
609 codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
610 ./$^ > $@
612 # ./configure must be rerun if it changed
613 config.mak: configure
614 @echo "############################################################"
615 @echo "####### Please run ./configure again - it's changed! #######"
616 @echo "############################################################"
618 version.h .version: version.sh
619 ./$<
621 # Force version.sh to run to potentially regenerate version.h
622 -include .version
624 %$(EXESUF): %.c
625 $(CC) $(CFLAGS) -o $@ $^
627 locales: $(MOFILES)
629 locale/%/LC_MESSAGES/mplayer.mo: po/%.po
630 mkdir -p $(dir $@)
631 msgfmt -c -o $@ $<
633 %.ho: %.h
634 $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
636 checkheaders: $(ALLHEADERS:.h=.ho)
640 ###### dependency declarations / specific CFLAGS ######
642 # Make sure all generated header files are created.
643 codec-cfg.o: codecs.conf.h
644 mpcommon.o osdep/mplayer-rc.o: version.h
646 # Files that depend on libswscale internals
647 libmpcodecs/vf_palette.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
649 # Files that depend on libavcodec internals
650 libmpcodecs/vf_fspp.o libmpcodecs/vf_geq.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_qp.o libmpcodecs/vf_spp.o libvo/jpeg_enc.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
652 osdep/mplayer-rc.o: osdep/mplayer.exe.manifest
654 libdvdcss/%: CFLAGS := -Ilibdvdcss -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)
655 libdvdnav/%: CFLAGS := -Ilibdvdnav -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)
656 libdvdread4/%: CFLAGS := -Ilibdvdread4 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS)
658 loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
659 #loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
660 loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
662 stream/stream_dvdnav%: CFLAGS := $(CFLAGS_LIBDVDNAV) $(CFLAGS)
666 ###### installation / clean / generic rules #######
668 install: $(INSTALL_TARGETS-yes)
670 install-dirs:
671 if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
672 if test ! -d $(CONFDIR) ; then $(INSTALL) -d $(CONFDIR) ; fi
673 if test ! -d $(LIBDIR) ; then $(INSTALL) -d $(LIBDIR) ; fi
675 install-%: %$(EXESUF) install-dirs
676 $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
678 install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang))
679 install-mplayer-msg: $(foreach lang,$(MSG_LANGS),install-mplayer-msg-$(lang))
681 install-mplayer-man-en:
682 if test ! -d $(MANDIR)/man1 ; then $(INSTALL) -d $(MANDIR)/man1 ; fi
683 $(INSTALL) -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
685 define MPLAYER_MAN_RULE
686 install-mplayer-man-$(lang):
687 if test ! -d $(MANDIR)/$(lang)/man1 ; then $(INSTALL) -d $(MANDIR)/$(lang)/man1 ; fi
688 $(INSTALL) -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
689 endef
691 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE)))
693 define MPLAYER_MSG_RULE
694 install-mplayer-msg-$(lang):
695 if test ! -d $(LOCALEDIR)/$(lang)/LC_MESSAGES ; then $(INSTALL) -d $(LOCALEDIR)/$(lang)/LC_MESSAGES ; fi
696 $(INSTALL) -m 644 locale/$(lang)/LC_MESSAGES/mplayer.mo $(LOCALEDIR)/$(lang)/LC_MESSAGES/
697 endef
699 $(foreach lang,$(MSG_LANG_ALL),$(eval $(MPLAYER_MSG_RULE)))
701 uninstall:
702 rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
703 rm -f $(prefix)/share/pixmaps/mplayer.xpm
704 rm -f $(prefix)/share/applications/mplayer.desktop
705 rm -f $(MANDIR)/man1/mplayer.1
706 rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1,$(MANDIR)/$(lang)/man1/$(man)))
707 rm -f $(foreach lang,$(MSG_LANGS),$(LOCALEDIR)/$(lang)/LC_MESSAGES/mplayer.1)
709 clean:
710 -rm -f $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~)
711 -rm -f $(call ADD_ALL_EXESUFS,mplayer)
712 -rm -f $(MOFILES)
714 distclean: clean testsclean toolsclean driversclean
715 -rm -rf DOCS/tech/doxygen
716 -rm -rf locale
717 -rm -f $(call ADD_ALL_DIRS,/*.d)
718 -rm -f config.log config.mak config.h codecs.conf.h \
719 version.h TAGS tags
720 -rm -f $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo)
722 doxygen:
723 doxygen DOCS/tech/Doxyfile
725 TAGS:
726 rm -f $@; find . -name '*.[chS]' -o -name '*.asm' | xargs etags -a
728 tags:
729 rm -f $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a
731 generated_ebml:
732 TOOLS/matroska.py --generate-header >libmpdemux/ebml_types.h
733 TOOLS/matroska.py --generate-definitions >libmpdemux/ebml_defs.c
735 ###### tests / tools #######
737 TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
739 codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h $(TEST_OBJS)
740 $(CC) -I. -DTESTING -o $@ $^
742 codecs2html$(EXESUF): codec-cfg.c $(TEST_OBJS)
743 $(CC) -I. -DCODECS2HTML -o $@ $^
745 libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
747 LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
749 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
750 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
752 TESTS = codecs2html codec-cfg-test libvo/aspecttest
754 ifdef ARCH_X86
755 TESTS += loader/qtx/list loader/qtx/qtxload
756 endif
758 tests: $(addsuffix $(EXESUF),$(TESTS))
760 testsclean:
761 -rm -f $(call ADD_ALL_EXESUFS,$(TESTS))
763 TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)
765 ifdef ARCH_X86
766 TOOLS += TOOLS/fastmemcpybench TOOLS/modify_reg
767 endif
769 ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc
771 tools: $(addsuffix $(EXESUF),$(TOOLS))
772 alltools: $(addsuffix $(EXESUF),$(ALLTOOLS))
774 toolsclean:
775 -rm -f $(call ADD_ALL_EXESUFS,$(ALLTOOLS))
776 -rm -f TOOLS/realcodecs/*.so.6.0
778 TOOLS/bmovl-test$(EXESUF): -lSDL_image
780 TOOLS/subrip$(EXESUF): sub/vobsub.o sub/spudec.o sub/unrar_exec.o \
781 libvo/aclib.o \ libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS)
783 TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
785 mplayer-nomain.o: mplayer.c
786 $(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
788 TOOLS/netstream$(EXESUF): TOOLS/netstream.c
789 TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
790 TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(OBJS_COMMON) $(COMMON_LIBS)
791 $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS)
793 REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
794 REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
796 realcodecs: $(REAL_TARGETS)
797 realcodecs: CFLAGS += -g
799 %.so.6.0: %.o
800 ld -shared -o $@ $< -ldl -lc
804 ###### drivers #######
806 KERNEL_INC = /lib/modules/`uname -r`/build/include
807 KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
808 KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h
809 KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o)
810 MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc
811 DRIVER_OBJS = $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test
813 drivers: $(DRIVER_OBJS)
815 $(DRIVER_OBJS): CFLAGS = $(KERNEL_CFLAGS)
816 drivers/mga_vid.o: drivers/mga_vid.c drivers/mga_vid.h
817 drivers/tdfx_vid.o: drivers/tdfx_vid.c drivers/3dfx.h
818 drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
819 drivers/radeon_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
820 drivers/rage128_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
821 $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
823 install-drivers: $(DRIVER_OBJS)
824 -mkdir -p $(MODULES_DIR)
825 install -m 644 $(KERNEL_OBJS) $(MODULES_DIR)
826 depmod -a
827 -mknod /dev/mga_vid c 178 0
828 -mknod /dev/tdfx_vid c 178 0
829 -mknod /dev/radeon_vid c 178 0
830 -ln -s /dev/radeon_vid /dev/rage128_vid
832 driversclean:
833 -rm -f $(DRIVER_OBJS) drivers/*~
837 -include $(DEP_FILES)
839 .PHONY: all doxygen locales *install* *tools drivers
840 .PHONY: checkheaders *clean tests .version
842 # Disable suffix rules. Most of the builtin rules are suffix rules,
843 # so this saves some time on slow systems.
844 .SUFFIXES:
846 # If a command returns failure but changed its target file, delete the
847 # (presumably malformed) file. Otherwise the file would be considered to
848 # be up to date if make is restarted.
850 .DELETE_ON_ERROR: