Old versions of mplayer for IRIX contributed by various Nekochanners (see README)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1182 lines
49 KiB

  1. # MPlayer Makefile
  2. #
  3. # copyright (c) 2008 Diego Biurrun
  4. # Rewritten entirely from a set of Makefiles written by Arpi and many others.
  5. #
  6. # This file is part of MPlayer.
  7. #
  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.
  12. #
  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.
  17. #
  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.
  21. include config.mak
  22. ###### variable declarations #######
  23. # local fallbacks for missing operating system features
  24. OS_FEATURE-$(GETTIMEOFDAY) += osdep/gettimeofday.c
  25. OS_FEATURE-$(GLOB_WIN) += osdep/glob-win.c
  26. OS_FEATURE-$(MMAP) += osdep/mmap-os2.c
  27. OS_FEATURE-$(SETENV) += osdep/setenv.c
  28. OS_FEATURE-$(SHMEM) += osdep/shmem.c
  29. OS_FEATURE-$(STRSEP) += osdep/strsep.c
  30. OS_FEATURE-$(VSSCANF) += osdep/vsscanf.c
  31. # conditional source declarations
  32. SRCS_AUDIO_INPUT-$(ALSA) += stream/ai_alsa.c
  33. SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
  34. SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes)
  35. SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c
  36. SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \
  37. stream/cdinfo.c
  38. SRCS_COMMON-$(CDDB) += stream/stream_cddb.c
  39. SRCS_COMMON-$(DVBIN) += stream/dvb_tune.c \
  40. stream/stream_dvb.c
  41. SRCS_COMMON-$(DVDNAV) += stream/stream_dvdnav.c
  42. SRCS_COMMON-$(DVDNAV_INTERNAL) += libdvdnav/dvdnav.c \
  43. libdvdnav/highlight.c \
  44. libdvdnav/navigation.c \
  45. libdvdnav/read_cache.c \
  46. libdvdnav/remap.c \
  47. libdvdnav/searching.c \
  48. libdvdnav/settings.c \
  49. libdvdnav/vm/decoder.c \
  50. libdvdnav/vm/vm.c \
  51. libdvdnav/vm/vmcmd.c \
  52. SRCS_COMMON-$(DVDREAD) += stream/stream_dvd.c \
  53. stream/stream_dvd_common.c
  54. SRCS_COMMON-$(DVDREAD_INTERNAL) += libdvdread4/bitreader.c \
  55. libdvdread4/dvd_input.c \
  56. libdvdread4/dvd_reader.c \
  57. libdvdread4/dvd_udf.c \
  58. libdvdread4/ifo_print.c \
  59. libdvdread4/ifo_read.c \
  60. libdvdread4/md5.c \
  61. libdvdread4/nav_print.c \
  62. libdvdread4/nav_read.c \
  63. SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c
  64. SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c
  65. SRCS_COMMON-$(FFMPEG) += av_helpers.c \
  66. av_opts.c \
  67. libaf/af_lavcac3enc.c \
  68. libaf/af_lavcresample.c \
  69. libmpcodecs/ad_ffmpeg.c \
  70. libmpcodecs/ad_spdif.c \
  71. libmpcodecs/vd_ffmpeg.c \
  72. libmpcodecs/vf_geq.c \
  73. libmpcodecs/vf_lavc.c \
  74. libmpcodecs/vf_lavcdeint.c \
  75. libmpcodecs/vf_screenshot.c \
  76. libmpdemux/demux_lavf.c \
  77. stream/stream_ffmpeg.c \
  78. sub/av_sub.c \
  79. SRCS_COMMON-$(CONFIG_VF_LAVFI) += libmpcodecs/vf_lavfi.c
  80. # These filters use private headers and do not work with shared FFmpeg.
  81. SRCS_COMMON-$(FFMPEG_A) += libmpcodecs/vf_fspp.c \
  82. libmpcodecs/vf_mcdeint.c \
  83. libmpcodecs/vf_qp.c \
  84. libmpcodecs/vf_spp.c \
  85. libmpcodecs/vf_uspp.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/subassconvert.c \
  97. SRCS_COMMON-$(LIBASS_INTERNAL) += libass/ass.c \
  98. libass/ass_bitmap.c \
  99. libass/ass_cache.c \
  100. libass/ass_drawing.c \
  101. libass/ass_font.c \
  102. libass/ass_fontconfig.c \
  103. libass/ass_library.c \
  104. libass/ass_parse.c \
  105. libass/ass_render.c \
  106. libass/ass_render_api.c \
  107. libass/ass_shaper.c \
  108. libass/ass_strtod.c \
  109. libass/ass_utils.c \
  110. SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c
  111. SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c
  112. SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
  113. SRCS_COMMON-$(LIBDV) += libmpcodecs/ad_libdv.c \
  114. libmpcodecs/vd_libdv.c \
  115. libmpdemux/demux_rawdv.c
  116. SRCS_COMMON-$(LIBDVDCSS_INTERNAL) += libdvdcss/css.c \
  117. libdvdcss/device.c \
  118. libdvdcss/error.c \
  119. libdvdcss/ioctl.c \
  120. libdvdcss/libdvdcss.c \
  121. SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
  122. SRCS_COMMON-$(LIBMPEG2) += libmpcodecs/vd_libmpeg2.c
  123. SRCS_LIBMPEG2-INTERNAL-$(ARCH_ALPHA) += libmpeg2/idct_alpha.c \
  124. libmpeg2/motion_comp_alpha.c
  125. SRCS_LIBMPEG2-INTERNAL-$(ARCH_ARM) += libmpeg2/motion_comp_arm.c \
  126. libmpeg2/motion_comp_arm_s.S
  127. SRCS_LIBMPEG2-INTERNAL-$(HAVE_ALTIVEC) += libmpeg2/idct_altivec.c \
  128. libmpeg2/motion_comp_altivec.c
  129. SRCS_LIBMPEG2-INTERNAL-$(HAVE_MMX) += libmpeg2/idct_mmx.c \
  130. libmpeg2/motion_comp_mmx.c
  131. SRCS_LIBMPEG2-INTERNAL-$(HAVE_VIS) += libmpeg2/motion_comp_vis.c
  132. SRCS_COMMON-$(LIBMPEG2_INTERNAL) += libmpeg2/alloc.c \
  133. libmpeg2/cpu_accel.c\
  134. libmpeg2/cpu_state.c \
  135. libmpeg2/decode.c \
  136. libmpeg2/header.c \
  137. libmpeg2/idct.c \
  138. libmpeg2/motion_comp.c \
  139. libmpeg2/slice.c \
  140. $(SRCS_LIBMPEG2-INTERNAL-yes)
  141. SRCS_COMMON-$(LIBNEMESI) += libmpdemux/demux_nemesi.c \
  142. stream/stream_nemesi.c
  143. SRCS_COMMON-$(LIBNUT) += libmpdemux/demux_nut.c
  144. SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
  145. SRCS_COMMON-$(LIBTHEORA) += libmpcodecs/vd_theora.c
  146. SRCS_COMMON-$(LIVE555) += libmpdemux/demux_rtp.cpp \
  147. libmpdemux/demux_rtp_codec.cpp \
  148. stream/stream_live555.c
  149. SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.c
  150. SRCS_COMMON-$(MNG) += libmpdemux/demux_mng.c
  151. SRCS_COMMON-$(MPG123) += libmpcodecs/ad_mpg123.c
  152. SRCS_MP3LIB-X86-$(HAVE_AMD3DNOW) += mp3lib/dct36_3dnow.c \
  153. mp3lib/dct64_3dnow.c
  154. SRCS_MP3LIB-X86-$(HAVE_AMD3DNOWEXT) += mp3lib/dct36_k7.c \
  155. mp3lib/dct64_k7.c
  156. SRCS_MP3LIB-X86-$(HAVE_MMX) += mp3lib/dct64_mmx.c
  157. SRCS_MP3LIB-$(ARCH_X86_32) += mp3lib/decode_i586.c \
  158. $(SRCS_MP3LIB-X86-yes)
  159. SRCS_MP3LIB-$(HAVE_ALTIVEC) += mp3lib/dct64_altivec.c
  160. SRCS_MP3LIB-$(HAVE_MMX) += mp3lib/decode_mmx.c
  161. SRCS_MP3LIB-$(HAVE_SSE) += mp3lib/dct64_sse.c
  162. SRCS_MP3LIB += mp3lib/sr1.c \
  163. $(SRCS_MP3LIB-yes)
  164. SRCS_COMMON-$(MP3LIB) += libmpcodecs/ad_mp3lib.c \
  165. $(SRCS_MP3LIB)
  166. SRCS_COMMON-$(MUSEPACK) += libmpcodecs/ad_mpc.c \
  167. libmpdemux/demux_mpc.c
  168. SRCS_COMMON-$(NATIVE_RTSP) += stream/stream_rtsp.c \
  169. stream/freesdp/common.c \
  170. stream/freesdp/errorlist.c \
  171. stream/freesdp/parser.c \
  172. stream/librtsp/rtsp.c \
  173. stream/librtsp/rtsp_rtp.c \
  174. stream/librtsp/rtsp_session.c \
  175. SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \
  176. stream/asf_mmst_streaming.c \
  177. stream/asf_streaming.c \
  178. stream/cookies.c \
  179. stream/http.c \
  180. stream/network.c \
  181. stream/pnm.c \
  182. stream/rtp.c \
  183. stream/udp.c \
  184. stream/tcp.c \
  185. stream/stream_rtp.c \
  186. stream/stream_udp.c \
  187. stream/librtsp/rtsp.c \
  188. stream/realrtsp/asmrp.c \
  189. stream/realrtsp/real.c \
  190. stream/realrtsp/rmff.c \
  191. stream/realrtsp/sdpplin.c \
  192. stream/realrtsp/xbuffer.c \
  193. SRCS_COMMON-$(PNG) += libmpcodecs/vd_mpng.c
  194. SRCS_COMMON-$(POSTPROC) += libmpcodecs/vf_pp.c
  195. SRCS_COMMON-$(PRIORITY) += osdep/priority.c
  196. SRCS_COMMON-$(PVR) += stream/stream_pvr.c
  197. SRCS_COMMON-$(QTX_CODECS) += libmpcodecs/ad_qtaudio.c \
  198. libmpcodecs/vd_qtvideo.c
  199. SRCS_COMMON-$(RADIO) += stream/stream_radio.c
  200. SRCS_COMMON-$(RADIO_CAPTURE) += stream/audio_in.c
  201. SRCS_COMMON-$(REAL_CODECS) += libmpcodecs/ad_realaud.c \
  202. libmpcodecs/vd_realvid.c
  203. SRCS_COMMON-$(SPEEX) += libmpcodecs/ad_speex.c
  204. SRCS_COMMON-$(STREAM_CACHE) += stream/cache2.c
  205. SRCS_COMMON-$(TREMOR_INTERNAL) += tremor/bitwise.c \
  206. tremor/block.c \
  207. tremor/codebook.c \
  208. tremor/floor0.c \
  209. tremor/floor1.c \
  210. tremor/framing.c \
  211. tremor/info.c \
  212. tremor/mapping0.c \
  213. tremor/mdct.c \
  214. tremor/registry.c \
  215. tremor/res012.c \
  216. tremor/sharedbook.c \
  217. tremor/synthesis.c \
  218. tremor/window.c \
  219. SRCS_COMMON-$(TV) += stream/stream_tv.c stream/tv.c \
  220. stream/frequencies.c stream/tvi_dummy.c
  221. SRCS_COMMON-$(TV_BSDBT848) += stream/tvi_bsdbt848.c
  222. SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c \
  223. loader/dshow/guids.c \
  224. loader/dshow/mediatype.c \
  225. SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c
  226. SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
  227. SRCS_COMMON-$(UNRAR_EXEC) += sub/unrar_exec.c
  228. SRCS_COMMON-$(VCD) += stream/stream_vcd.c
  229. SRCS_COMMON-$(VORBIS) += libmpcodecs/ad_libvorbis.c \
  230. libmpdemux/demux_ogg.c
  231. SRCS_COMMON-$(VSTREAM) += stream/stream_vstream.c
  232. SRCS_QTX_EMULATION += loader/wrapper.S
  233. SRCS_COMMON-$(QTX_EMULATION) += $(SRCS_QTX_EMULATION)
  234. SRCS_WIN32_EMULATION += loader/elfdll.c \
  235. loader/ext.c \
  236. loader/ldt_keeper.c \
  237. loader/module.c \
  238. loader/pe_image.c \
  239. loader/pe_resource.c \
  240. loader/registry.c \
  241. loader/resource.c \
  242. loader/win32.c \
  243. SRCS_COMMON-$(WIN32_EMULATION) += $(SRCS_WIN32_EMULATION)
  244. SRCS_COMMON-$(WIN32DLL) += libmpcodecs/ad_acm.c \
  245. libmpcodecs/ad_dmo.c \
  246. libmpcodecs/ad_dshow.c \
  247. libmpcodecs/ad_twin.c \
  248. libmpcodecs/vd_dmo.c \
  249. libmpcodecs/vd_dshow.c \
  250. libmpcodecs/vd_vfw.c \
  251. libmpcodecs/vd_vfwex.c \
  252. libmpdemux/demux_avs.c \
  253. loader/afl.c \
  254. loader/drv.c \
  255. loader/vfl.c \
  256. loader/dshow/DS_AudioDecoder.c \
  257. loader/dshow/DS_Filter.c \
  258. loader/dshow/DS_VideoDecoder.c \
  259. loader/dshow/allocator.c \
  260. loader/dshow/cmediasample.c \
  261. loader/dshow/graph.c \
  262. loader/dshow/guids.c \
  263. loader/dshow/inputpin.c \
  264. loader/dshow/mediatype.c \
  265. loader/dshow/outputpin.c \
  266. loader/dmo/DMO_AudioDecoder.c \
  267. loader/dmo/DMO_VideoDecoder.c \
  268. loader/dmo/buffer.c \
  269. loader/dmo/dmo.c \
  270. loader/dmo/dmo_guids.c \
  271. SRCS_COMMON-$(XANIM_CODECS) += libmpcodecs/vd_xanim.c
  272. SRCS_COMMON-$(XMMS_PLUGINS) += libmpdemux/demux_xmms.c
  273. SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c
  274. SRCS_COMMON-$(ZR) += libmpcodecs/vd_zrmjpeg.c \
  275. libmpcodecs/vf_zrmjpeg.c
  276. SRCS_COMMON = asxparser.c \
  277. bstr.c \
  278. codec-cfg.c \
  279. cpudetect.c \
  280. edl.c \
  281. fmt-conversion.c \
  282. m_config.c \
  283. m_option.c \
  284. m_struct.c \
  285. mp_msg.c \
  286. mp_strings.c \
  287. mpcommon.c \
  288. parser-cfg.c \
  289. path.c \
  290. playtree.c \
  291. playtreeparser.c \
  292. subopt-helper.c \
  293. libaf/af.c \
  294. libaf/af_center.c \
  295. libaf/af_channels.c \
  296. libaf/af_comp.c \
  297. libaf/af_delay.c \
  298. libaf/af_dummy.c \
  299. libaf/af_equalizer.c \
  300. libaf/af_extrastereo.c \
  301. libaf/af_format.c \
  302. libaf/af_gate.c \
  303. libaf/af_hrtf.c \
  304. libaf/af_karaoke.c \
  305. libaf/af_pan.c \
  306. libaf/af_resample.c \
  307. libaf/af_scaletempo.c \
  308. libaf/af_sinesuppress.c \
  309. libaf/af_stats.c \
  310. libaf/af_sub.c \
  311. libaf/af_surround.c \
  312. libaf/af_sweep.c \
  313. libaf/af_tools.c \
  314. libaf/af_volnorm.c \
  315. libaf/af_volume.c \
  316. libaf/filter.c \
  317. libaf/format.c \
  318. libaf/reorder_ch.c \
  319. libaf/window.c \
  320. libmpcodecs/ad.c \
  321. libmpcodecs/ad_alaw.c \
  322. libmpcodecs/ad_dk3adpcm.c \
  323. libmpcodecs/ad_dvdpcm.c \
  324. libmpcodecs/ad_hwac3.c \
  325. libmpcodecs/ad_hwmpa.c \
  326. libmpcodecs/ad_imaadpcm.c \
  327. libmpcodecs/ad_msadpcm.c \
  328. libmpcodecs/ad_pcm.c \
  329. libmpcodecs/dec_audio.c \
  330. libmpcodecs/dec_teletext.c \
  331. libmpcodecs/dec_video.c \
  332. libmpcodecs/img_format.c \
  333. libmpcodecs/mp_image.c \
  334. libmpcodecs/pullup.c \
  335. libmpcodecs/vd.c \
  336. libmpcodecs/vd_hmblck.c \
  337. libmpcodecs/vd_lzo.c \
  338. libmpcodecs/vd_mpegpes.c \
  339. libmpcodecs/vd_mtga.c \
  340. libmpcodecs/vd_null.c \
  341. libmpcodecs/vd_raw.c \
  342. libmpcodecs/vd_sgi.c \
  343. libmpcodecs/vf.c \
  344. libmpcodecs/vf_1bpp.c \
  345. libmpcodecs/vf_2xsai.c \
  346. libmpcodecs/vf_blackframe.c \
  347. libmpcodecs/vf_boxblur.c \
  348. libmpcodecs/vf_crop.c \
  349. libmpcodecs/vf_cropdetect.c \
  350. libmpcodecs/vf_decimate.c \
  351. libmpcodecs/vf_delogo.c \
  352. libmpcodecs/vf_denoise3d.c \
  353. libmpcodecs/vf_detc.c \
  354. libmpcodecs/vf_dint.c \
  355. libmpcodecs/vf_divtc.c \
  356. libmpcodecs/vf_down3dright.c \
  357. libmpcodecs/vf_dsize.c \
  358. libmpcodecs/vf_dvbscale.c \
  359. libmpcodecs/vf_eq.c \
  360. libmpcodecs/vf_eq2.c \
  361. libmpcodecs/vf_expand.c \
  362. libmpcodecs/vf_field.c \
  363. libmpcodecs/vf_fil.c \
  364. libmpcodecs/vf_filmdint.c \
  365. libmpcodecs/vf_fixpts.c \
  366. libmpcodecs/vf_flip.c \
  367. libmpcodecs/vf_format.c \
  368. libmpcodecs/vf_framestep.c \
  369. libmpcodecs/vf_gradfun.c \
  370. libmpcodecs/vf_halfpack.c \
  371. libmpcodecs/vf_harddup.c \
  372. libmpcodecs/vf_hqdn3d.c \
  373. libmpcodecs/vf_hue.c \
  374. libmpcodecs/vf_il.c \
  375. libmpcodecs/vf_ilpack.c \
  376. libmpcodecs/vf_ivtc.c \
  377. libmpcodecs/vf_kerndeint.c \
  378. libmpcodecs/vf_mirror.c \
  379. libmpcodecs/vf_noformat.c \
  380. libmpcodecs/vf_noise.c \
  381. libmpcodecs/vf_ow.c \
  382. libmpcodecs/vf_palette.c \
  383. libmpcodecs/vf_perspective.c \
  384. libmpcodecs/vf_phase.c \
  385. libmpcodecs/vf_pp7.c \
  386. libmpcodecs/vf_pullup.c \
  387. libmpcodecs/vf_rectangle.c \
  388. libmpcodecs/vf_remove_logo.c \
  389. libmpcodecs/vf_rgbtest.c \
  390. libmpcodecs/vf_rotate.c \
  391. libmpcodecs/vf_sab.c \
  392. libmpcodecs/vf_scale.c \
  393. libmpcodecs/vf_smartblur.c \
  394. libmpcodecs/vf_softpulldown.c \
  395. libmpcodecs/vf_stereo3d.c \
  396. libmpcodecs/vf_softskip.c \
  397. libmpcodecs/vf_swapuv.c \
  398. libmpcodecs/vf_telecine.c \
  399. libmpcodecs/vf_test.c \
  400. libmpcodecs/vf_tfields.c \
  401. libmpcodecs/vf_tile.c \
  402. libmpcodecs/vf_tinterlace.c \
  403. libmpcodecs/vf_unsharp.c \
  404. libmpcodecs/vf_vo.c \
  405. libmpcodecs/vf_yadif.c \
  406. libmpcodecs/vf_yuvcsp.c \
  407. libmpcodecs/vf_yvu9.c \
  408. libmpdemux/aac_hdr.c \
  409. libmpdemux/asfheader.c \
  410. libmpdemux/aviheader.c \
  411. libmpdemux/aviprint.c \
  412. libmpdemux/demuxer.c \
  413. libmpdemux/demux_aac.c \
  414. libmpdemux/demux_asf.c \
  415. libmpdemux/demux_audio.c \
  416. libmpdemux/demux_avi.c \
  417. libmpdemux/demux_demuxers.c \
  418. libmpdemux/demux_film.c \
  419. libmpdemux/demux_fli.c \
  420. libmpdemux/demux_lmlm4.c \
  421. libmpdemux/demux_mf.c \
  422. libmpdemux/demux_mkv.c \
  423. libmpdemux/demux_mov.c \
  424. libmpdemux/demux_mpg.c \
  425. libmpdemux/demux_nsv.c \
  426. libmpdemux/demux_pva.c \
  427. libmpdemux/demux_rawaudio.c \
  428. libmpdemux/demux_rawvideo.c \
  429. libmpdemux/demux_realaud.c \
  430. libmpdemux/demux_real.c \
  431. libmpdemux/demux_roq.c \
  432. libmpdemux/demux_smjpeg.c \
  433. libmpdemux/demux_ts.c \
  434. libmpdemux/demux_ty.c \
  435. libmpdemux/demux_ty_osd.c \
  436. libmpdemux/demux_viv.c \
  437. libmpdemux/demux_vqf.c \
  438. libmpdemux/demux_y4m.c \
  439. libmpdemux/ebml.c \
  440. libmpdemux/extension.c \
  441. libmpdemux/mf.c \
  442. libmpdemux/mp3_hdr.c \
  443. libmpdemux/mp_taglists.c \
  444. libmpdemux/mpeg_hdr.c \
  445. libmpdemux/mpeg_packetizer.c \
  446. libmpdemux/parse_es.c \
  447. libmpdemux/parse_mp4.c \
  448. libmpdemux/video.c \
  449. libmpdemux/yuv4mpeg.c \
  450. libmpdemux/yuv4mpeg_ratio.c \
  451. osdep/$(GETCH) \
  452. osdep/$(TIMER) \
  453. stream/open.c \
  454. stream/stream.c \
  455. stream/stream_bd.c \
  456. stream/stream_cue.c \
  457. stream/stream_file.c \
  458. stream/stream_mf.c \
  459. stream/stream_null.c \
  460. stream/url.c \
  461. sub/eosd.c \
  462. sub/find_sub.c \
  463. sub/osd.c \
  464. sub/spudec.c \
  465. sub/sub.c \
  466. sub/sub_cc.c \
  467. sub/subreader.c \
  468. sub/vobsub.c \
  469. $(SRCS_COMMON-yes) \
  470. $(OS_FEATURE-no)
  471. SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c
  472. SRCS_MPLAYER-$(AA) += libvo/vo_aa.c
  473. SRCS_MPLAYER-$(ALSA) += libao2/ao_alsa.c
  474. SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
  475. SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
  476. SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c
  477. SRCS_MPLAYER-$(BL) += libvo/vo_bl.c
  478. SRCS_MPLAYER-$(CACA) += libvo/vo_caca.c
  479. SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_coreaudio.c
  480. SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_corevideo.m libvo/osx_common.c
  481. SRCS_MPLAYER-$(DART) += libao2/ao_dart.c
  482. SRCS_MPLAYER-$(DGA) += libvo/vo_dga.c
  483. SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c
  484. SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c libvo/vo_dfbmga.c
  485. SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c
  486. SRCS_MPLAYER-$(DXR2) += libao2/ao_dxr2.c libvo/vo_dxr2.c
  487. SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
  488. SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
  489. SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c
  490. SRCS_MPLAYER-$(FFMPEG) += libvo/vo_png.c
  491. SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c
  492. SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
  493. SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \
  494. libvo/csputils.c
  495. SRCS_MPLAYER-$(GL_SDL) += libvo/sdl_common.c
  496. SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c libvo/vo_gl2.c
  497. SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c libvo/vo_gl2.c
  498. SRCS_MPLAYER-$(MATRIXVIEW) += libvo/vo_matrixview.c libvo/matrixview.c
  499. SRCS_MPLAYER-$(GUI) += gui/util/bitmap.c \
  500. gui/util/list.c \
  501. gui/util/string.c
  502. SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \
  503. gui/cfg.c \
  504. gui/interface.c \
  505. gui/skin/font.c \
  506. gui/skin/skin.c \
  507. gui/ui/actions.c \
  508. gui/ui/gtk/about.c \
  509. gui/ui/gtk/equalizer.c \
  510. gui/ui/gtk/fileselect.c \
  511. gui/ui/gtk/menu.c \
  512. gui/ui/gtk/msgbox.c \
  513. gui/ui/gtk/playlist.c \
  514. gui/ui/gtk/preferences.c \
  515. gui/ui/gtk/skinbrowser.c \
  516. gui/ui/gtk/tools.c \
  517. gui/ui/gtk/url.c \
  518. gui/ui/main.c \
  519. gui/ui/menu.c \
  520. gui/ui/playbar.c \
  521. gui/ui/render.c \
  522. gui/ui/video.c \
  523. gui/ui/widgets.c \
  524. gui/util/cut.c \
  525. gui/wm/ws.c \
  526. gui/wm/wsxdnd.c \
  527. SRCS_MPLAYER-$(GUI_WIN32) += gui/win32/dialogs.c \
  528. gui/win32/gui.c \
  529. gui/win32/interface.c \
  530. gui/win32/playlist.c \
  531. gui/win32/preferences.c \
  532. gui/win32/skinload.c \
  533. gui/win32/widgetrender.c \
  534. gui/win32/wincfg.c \
  535. SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c
  536. SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
  537. SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
  538. SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
  539. SRCS_MPLAYER-$(KAI) += libao2/ao_kai.c
  540. SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
  541. SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
  542. libmenu/menu_chapsel.c \
  543. libmenu/menu_cmdlist.c \
  544. libmenu/menu_console.c \
  545. libmenu/menu_filesel.c \
  546. libmenu/menu_list.c \
  547. libmenu/menu_param.c \
  548. libmenu/menu_pt.c \
  549. libmenu/menu_txt.c \
  550. libmenu/vf_menu.c \
  551. SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c
  552. SRCS_MPLAYER-$(LIRC) += input/lirc.c
  553. SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
  554. SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c
  555. SRCS_MPLAYER-$(MNG) += libvo/vo_mng.c
  556. SRCS_MPLAYER-$(NAS) += libao2/ao_nas.c
  557. SRCS_MPLAYER-$(NETWORKING) += udp_sync.c
  558. SRCS_MPLAYER-$(OPENAL) += libao2/ao_openal.c
  559. SRCS_MPLAYER-$(OSS) += libao2/ao_oss.c
  560. SRCS_MPLAYER-$(PNM) += libvo/vo_pnm.c
  561. SRCS_MPLAYER-$(PULSE) += libao2/ao_pulse.c
  562. SRCS_MPLAYER-$(QUARTZ) += libvo/vo_quartz.c libvo/osx_common.c
  563. SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
  564. SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c
  565. SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
  566. SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
  567. SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
  568. SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
  569. SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c
  570. SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c
  571. SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c
  572. SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c
  573. SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c
  574. SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c
  575. SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \
  576. libvo/vosub_vidix.c \
  577. vidix/vidix.c \
  578. vidix/drivers.c \
  579. vidix/dha.c \
  580. vidix/mtrr.c \
  581. vidix/pci.c \
  582. vidix/pci_names.c \
  583. vidix/pci_dev_ids.c\
  584. SRCS_MPLAYER-$(VIDIX_CYBERBLADE) += vidix/cyberblade_vid.c
  585. SRCS_MPLAYER-$(VIDIX_IVTV) += vidix/ivtv_vid.c
  586. SRCS_MPLAYER-$(VIDIX_MACH64) += vidix/mach64_vid.c
  587. SRCS_MPLAYER-$(VIDIX_MGA) += vidix/mga_vid.c
  588. SRCS_MPLAYER-$(VIDIX_MGA_CRTC2) += vidix/mga_crtc2_vid.c
  589. SRCS_MPLAYER-$(VIDIX_NVIDIA) += vidix/nvidia_vid.c
  590. SRCS_MPLAYER-$(VIDIX_PM2) += vidix/pm2_vid.c
  591. SRCS_MPLAYER-$(VIDIX_PM3) += vidix/pm3_vid.c
  592. SRCS_MPLAYER-$(VIDIX_RADEON) += vidix/radeon_vid.c
  593. SRCS_MPLAYER-$(VIDIX_RAGE128) += vidix/rage128_vid.c
  594. SRCS_MPLAYER-$(VIDIX_S3) += vidix/s3_vid.c
  595. SRCS_MPLAYER-$(VIDIX_SH_VEU) += vidix/sh_veu_vid.c
  596. SRCS_MPLAYER-$(VIDIX_SIS) += vidix/sis_vid.c vidix/sis_bridge.c
  597. SRCS_MPLAYER-$(VIDIX_UNICHROME) += vidix/unichrome_vid.c
  598. SRCS_MPLAYER-$(WII) += libvo/vo_wii.c
  599. SRCS_MPLAYER-$(WIN32WAVEOUT) += libao2/ao_win32.c
  600. SRCS_MPLAYER-$(WINVIDIX) += libvo/vo_winvidix.c
  601. SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/vo_xover.c \
  602. libvo/x11_common.c
  603. SRCS_MPLAYER-$(XMGA) += libvo/vo_xmga.c
  604. SRCS_MPLAYER-$(XV) += libvo/vo_xv.c
  605. SRCS_MPLAYER-$(XVIDIX) += libvo/vo_xvidix.c
  606. SRCS_MPLAYER-$(XVMC) += libvo/vo_xvmc.c
  607. SRCS_MPLAYER-$(XVR100) += libvo/vo_xvr100.c
  608. SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c
  609. SRCS_MPLAYER-$(ZR) += libvo/jpeg_enc.c libvo/vo_zr.c libvo/vo_zr2.c
  610. SRCS_MPLAYER = command.c \
  611. m_property.c \
  612. mixer.c \
  613. mp_fifo.c \
  614. mplayer.c \
  615. parser-mpcmd.c \
  616. pnm_loader.c \
  617. input/input.c \
  618. libao2/ao_mpegpes.c \
  619. libao2/ao_null.c \
  620. libao2/ao_pcm.c \
  621. libao2/audio_out.c \
  622. libvo/aspect.c \
  623. libvo/geometry.c \
  624. libvo/video_out.c \
  625. libvo/vo_mpegpes.c \
  626. libvo/vo_null.c \
  627. sub/spuenc.c \
  628. $(SRCS_MPLAYER-yes)
  629. SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c
  630. SRCS_MENCODER-$(FFMPEG) += libmpcodecs/ae_lavc.c \
  631. libmpcodecs/ve_lavc.c \
  632. libmpdemux/muxer_lavf.c
  633. SRCS_MENCODER-$(LIBDV) += libmpcodecs/ve_libdv.c
  634. SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c \
  635. libmpcodecs/native/rtjpegn.c
  636. SRCS_MENCODER-$(MP3LAME) += libmpcodecs/ae_lame.c
  637. SRCS_MENCODER-$(QTX_CODECS_WIN32) += libmpcodecs/ve_qtvideo.c
  638. SRCS_MENCODER-$(TOOLAME) += libmpcodecs/ae_toolame.c
  639. SRCS_MENCODER-$(TWOLAME) += libmpcodecs/ae_twolame.c
  640. SRCS_MENCODER-$(WIN32DLL) += libmpcodecs/ve_vfw.c
  641. SRCS_MENCODER-$(X264) += libmpcodecs/ve_x264.c
  642. SRCS_MENCODER-$(XVID4) += libmpcodecs/ve_xvid4.c
  643. SRCS_MENCODER = mencoder.c \
  644. parser-mecmd.c \
  645. xvid_vbr.c \
  646. libmpcodecs/ae.c \
  647. libmpcodecs/ae_pcm.c \
  648. libmpcodecs/ve.c \
  649. libmpcodecs/ve_raw.c \
  650. libmpdemux/muxer.c \
  651. libmpdemux/muxer_avi.c \
  652. libmpdemux/muxer_mpeg.c \
  653. libmpdemux/muxer_rawaudio.c \
  654. libmpdemux/muxer_rawvideo.c \
  655. $(SRCS_MENCODER-yes)
  656. # (linking) order matters for these libraries
  657. FFMPEGPARTS_ALL = libpostproc libavfilter libavformat libavcodec libswscale libswresample libavutil
  658. FFMPEGPARTS = $(foreach part, $(FFMPEGPARTS_ALL), $(if $(wildcard ffmpeg/$(part)), $(part)))
  659. FFMPEGLIBS = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
  660. FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS] /*/*.[chS] /*/*.asm)))
  661. COMMON_LIBS-$(FFMPEG_A) += $(FFMPEGLIBS)
  662. COMMON_LIBS += $(COMMON_LIBS-yes)
  663. OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
  664. OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)))
  665. OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)))
  666. OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
  667. OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
  668. MENCODER_DEPS = $(OBJS_MENCODER) $(OBJS_COMMON) $(COMMON_LIBS)
  669. MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
  670. DEP_FILES = $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER)
  671. $(foreach suffix,.c .cpp .m .S,$(eval DEP_FILES := $(DEP_FILES:$(suffix)=.d)))
  672. ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
  673. ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
  674. INSTALL_TARGETS-$(GUI) += install-gui
  675. INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mencoder-man
  676. INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man
  677. DIRS = . \
  678. gui \
  679. gui/skin \
  680. gui/ui \
  681. gui/ui/gtk \
  682. gui/util \
  683. gui/win32 \
  684. gui/wm \
  685. input \
  686. libaf \
  687. libao2 \
  688. libmenu \
  689. libmpcodecs \
  690. libmpcodecs/native \
  691. libmpdemux \
  692. libvo \
  693. loader \
  694. loader/dmo \
  695. loader/dshow \
  696. loader/wine \
  697. mp3lib \
  698. osdep \
  699. stream \
  700. stream/freesdp \
  701. stream/librtsp \
  702. stream/realrtsp \
  703. sub \
  704. TOOLS \
  705. vidix \
  706. ALL_DIRS = $(DIRS) \
  707. libass \
  708. libdvdcss \
  709. libdvdnav \
  710. libdvdnav/vm \
  711. libdvdread4 \
  712. libmpeg2 \
  713. tremor \
  714. ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h))
  715. ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2)))
  716. ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(ALL_DIRS))
  717. ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
  718. GUI_ICONSIZES = 16x16 22x22 24x24 32x32 48x48 256x256
  719. ###### generic rules #######
  720. all: $(ALL_PRG-yes)
  721. %.o: %.S
  722. $(CC) $(CC_DEPFLAGS) $(CFLAGS) -c -o $@ $<
  723. %.o: %.c
  724. $(CC) $(CC_DEPFLAGS) $(CFLAGS) -c -o $@ $<
  725. %.o: %.cpp
  726. $(CC) $(CC_DEPFLAGS) $(CXXFLAGS) -c -o $@ $<
  727. %.o: %.m
  728. $(CC) $(CC_DEPFLAGS) $(CFLAGS) -c -o $@ $<
  729. %-rc.o: %.rc
  730. $(WINDRES) -I. $< -o $@
  731. $(FFMPEGLIBS): $(FFMPEGFILES) config.h
  732. $(MAKE) -C ffmpeg $(@:ffmpeg/%=%)
  733. mencoder$(EXESUF): $(MENCODER_DEPS)
  734. mencoder$(EXESUF): EXTRALIBS += $(EXTRALIBS_MENCODER)
  735. mplayer$(EXESUF): $(MPLAYER_DEPS)
  736. mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
  737. mencoder$(EXESUF) mplayer$(EXESUF):
  738. $(CC) -o $@ $^ $(EXTRALIBS)
  739. codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
  740. $(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $<
  741. codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
  742. ./$^ > $@
  743. checksums: $(MPLAYER_DEPS) $(MENCODER_DEPS) mplayer$(EXESUF) mencoder$(EXESUF)
  744. md5sum $^ > checksums
  745. check_checksums: $(MPLAYER_DEPS) $(MENCODER_DEPS) mplayer$(EXESUF) mencoder$(EXESUF)
  746. md5sum -c checksums
  747. # ./configure must be rerun if it changed
  748. config.mak: configure
  749. @echo "############################################################"
  750. @echo "####### Please run ./configure again - it's changed! #######"
  751. @echo "############################################################"
  752. checkhelp: help/help_mp*.h
  753. help/help_check.sh $(CC) $^
  754. help_mp.h: help/help_mp-en.h $(HELP_FILE)
  755. help/help_create.sh $(HELP_FILE) $(CHARSET)
  756. # rebuild version.h each time the working copy is updated
  757. version.h: version.sh $(wildcard .svn/entries .git/logs/HEAD)
  758. ./$< `$(CC) -dumpversion`
  759. %$(EXESUF): %.c
  760. $(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^
  761. %.ho: %.h
  762. $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
  763. checkheaders: $(ALLHEADERS:.h=.ho)
  764. ###### XML documentation ######
  765. doc: html-chunked html-single
  766. html-chunked: $(addprefix html-chunked-,$(DOC_LANGS))
  767. html-single: $(addprefix html-single-,$(DOC_LANGS))
  768. xmllint: $(addprefix xmllint-,$(DOC_LANGS))
  769. define lang-def
  770. html-chunked-$(lang): DOCS/HTML/$(lang)/dummy.html
  771. html-single-$(lang): DOCS/HTML/$(lang)/MPlayer.html
  772. DOCS/HTML/$(lang)/dummy.html DOCS/HTML/$(lang)/MPlayer.html: DOCS/xml/$(lang)/main.xml $(wildcard DOCS/xml/$(lang)/*.xml) DOCS/xml/html-common.xsl DOCS/HTML/$(lang)/default.css
  773. DOCS/HTML/$(lang)/default.css:
  774. mkdir -p $$(@D)
  775. cp -f DOCS/xml/default.css $$(@D)
  776. DOCS/HTML/$(lang)/dummy.html:
  777. SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ DOCS/xml/html-chunk.xsl $$<
  778. DOCS/HTML/$(lang)/MPlayer.html:
  779. SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ DOCS/xml/html-single.xsl $$<
  780. xmllint-$(lang):
  781. SGML_CATALOG_FILES=$(CATALOG) $(XMLLINT_COMMAND) DOCS/xml/$(lang)/main.xml
  782. endef
  783. $(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def)))
  784. ###### dependency declarations / specific CFLAGS ######
  785. # Make sure all generated header files are created.
  786. codec-cfg.o: codecs.conf.h
  787. $(DEP_FILES) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h
  788. mpcommon.o osdep/mplayer-rc.o gui/ui/gtk/about.o gui/win32/gui.o: version.h
  789. osdep/mplayer-rc.o: osdep/mplayer.exe.manifest
  790. gui/%: CFLAGS += -Wno-strict-prototypes
  791. libdvdcss/%: CFLAGS := -Ilibdvdcss -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)
  792. libdvdnav/%: CFLAGS := -Ilibdvdnav -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)
  793. libdvdread4/%: CFLAGS := -Ilibdvdread4 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS)
  794. loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
  795. #loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
  796. loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
  797. mp3lib/decode_i586%: CFLAGS += -fomit-frame-pointer
  798. stream/stream_dvdnav%: CFLAGS := $(CFLAGS_LIBDVDNAV) $(CFLAGS)
  799. tremor/%: CFLAGS += $(CFLAGS_TREMOR_LOW)
  800. vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER)
  801. VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \
  802. vidix/pci_vendors.h
  803. $(VIDIX_PCI_FILES): vidix/pci_db2c.awk vidix/pci.db
  804. awk -f $^ $(VIDIX_PCIDB)
  805. VIDIX_OBJS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.o))
  806. $(VIDIX_OBJS): $(VIDIX_PCI_FILES)
  807. ###### installation / clean / generic rules #######
  808. install: $(INSTALL_TARGETS-yes)
  809. install-dirs:
  810. $(INSTALL) -d $(BINDIR) $(CONFDIR) $(LIBDIR)
  811. install-%: %$(EXESUF) install-dirs
  812. $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
  813. install-gui: install-mplayer install-gui-icons
  814. -ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
  815. $(INSTALL) -d $(DATADIR)/skins $(prefix)/share/applications
  816. $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/
  817. install-gui-icons: $(foreach size,$(GUI_ICONSIZES),install-gui-icon-$(size))
  818. install-gui-man: $(foreach lang,$(MAN_LANGS),install-gui-man-$(lang))
  819. install-mencoder-man: $(foreach lang,$(MAN_LANGS),install-mencoder-man-$(lang))
  820. install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang))
  821. install-gui-man-en: install-mplayer-man-en
  822. cd $(MANDIR)/man1/ && ln -sf mplayer.1 gmplayer.1
  823. install-mencoder-man-en: install-mplayer-man-en
  824. cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1
  825. install-mplayer-man-en:
  826. $(INSTALL) -d $(MANDIR)/man1
  827. $(INSTALL) -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
  828. define GUI_ICON_RULE
  829. install-gui-icon-$(size):
  830. $(INSTALL) -d $(prefix)/share/icons/hicolor/$(size)/apps
  831. $(INSTALL) -m 644 etc/mplayer$(size).png $(prefix)/share/icons/hicolor/$(size)/apps/mplayer.png
  832. endef
  833. define GUI_MAN_RULE
  834. install-gui-man-$(lang): install-mplayer-man-$(lang)
  835. cd $(MANDIR)/$(lang)/man1/ && ln -sf mplayer.1 gmplayer.1
  836. endef
  837. define MENCODER_MAN_RULE
  838. install-mencoder-man-$(lang): install-mplayer-man-$(lang)
  839. cd $(MANDIR)/$(lang)/man1 && ln -sf mplayer.1 mencoder.1
  840. endef
  841. define MPLAYER_MAN_RULE
  842. install-mplayer-man-$(lang):
  843. $(INSTALL) -d $(MANDIR)/$(lang)/man1
  844. $(INSTALL) -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
  845. endef
  846. $(foreach size,$(GUI_ICONSIZES),$(eval $(GUI_ICON_RULE)))
  847. $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(GUI_MAN_RULE)))
  848. $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MENCODER_MAN_RULE)))
  849. $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE)))
  850. uninstall:
  851. rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
  852. rm -f $(BINDIR)/mencoder$(EXESUF)
  853. rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1
  854. rm -f $(foreach size,$(GUI_ICONSIZES),$(prefix)/share/icons/hicolor/$(size)/apps/mplayer.png)
  855. rm -f $(prefix)/share/applications/mplayer.desktop
  856. rm -f $(MANDIR)/man1/mplayer.1 $(MANDIR)/man1/mencoder.1
  857. rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man)))
  858. clean:
  859. -$(MAKE) -C ffmpeg $@
  860. -rm -rf tests/res
  861. -rm -f $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~)
  862. -rm -f $(call ADD_ALL_EXESUFS,mplayer mencoder)
  863. -rm -rf DOCS/tech/doxygen DOCS/HTML
  864. distclean: clean testsclean toolsclean driversclean dhahelperclean
  865. -$(MAKE) -C ffmpeg $@
  866. -rm -f DOCS/xml/html-chunk.xsl DOCS/xml/html-single.xsl
  867. -rm -f $(call ADD_ALL_DIRS,/*.d)
  868. -rm -f config.* codecs.conf.h help_mp.h version.h TAGS tags
  869. -rm -f $(VIDIX_PCI_FILES)
  870. -rm -f $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo)
  871. doxygen:
  872. doxygen DOCS/tech/Doxyfile
  873. TAGS:
  874. rm -f $@; find . -name '*.[chS]' -o -name '*.asm' | xargs etags -a
  875. tags:
  876. rm -f $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a
  877. ###### regression tests #######
  878. BROKEN_SAMPLES = \
  879. h264-conformance/FM1_BT_B.h264 \
  880. h264-conformance/FM1_FT_E.264 \
  881. h264-conformance/FM2_SVA_B.264 \
  882. pva/PVA_test-partial.pva \
  883. wmv8/wmv_drm.wmv \
  884. wtv/law-and-order-partial.wtv \
  885. AUDIO_ONLY_SAMPLES = \
  886. aac/% ac3/% amrnb/% amrwb/% atrac1/% atrac3/% bink/binkaudio% \
  887. creative/% dts/% duck/%-audio-only.avi eac3/% gsm/% imc/% \
  888. lossless-audio/% mp3-conformance/% musepack/% nellymoser/% \
  889. qcp/% \
  890. qt-surge-suite/% real/ra% sipr/% truespeech/% vorbis/% \
  891. vqf/% w64/% wmapro/% wmavoice/% \
  892. # running wildcard with empty FATE_SAMPLES seems to cause a lot of issues
  893. ifdef FATE_SAMPLES
  894. ALLSAMPLES_FULLPATH = $(wildcard $(FATE_SAMPLES)/*/*.*)
  895. ALLSAMPLES = $(patsubst $(FATE_SAMPLES)/%,%,$(ALLSAMPLES_FULLPATH))
  896. SAMPLES := $(filter-out $(BROKEN_SAMPLES),$(ALLSAMPLES))
  897. SAMPLES := $(filter-out $(AUDIO_ONLY_SAMPLES),$(SAMPLES))
  898. RESULTS = $(patsubst %,tests/res/%.md5,$(SAMPLES))
  899. fatetest: $(RESULTS)
  900. tests/res/%.md5: mplayer$(EXESUF) $(FATE_SAMPLES)/%
  901. @tests/faterun.sh $*
  902. else
  903. fatetest:
  904. @echo "You need to set FATE_SAMPLES for fatetest to work"
  905. endif
  906. ###### tests / tools #######
  907. TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
  908. codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h help_mp.h $(TEST_OBJS)
  909. $(CC) -I. -Iffmpeg -DTESTING -o $@ $^
  910. codecs2html$(EXESUF): codec-cfg.c help_mp.h
  911. $(CC) -I. -Iffmpeg -DCODECS2HTML -o $@ $^
  912. libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
  913. LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) ffmpeg/libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
  914. loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
  915. loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
  916. mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF): $(SRCS_MP3LIB:.c=.o) libvo/aclib.o cpudetect.o $(TEST_OBJS)
  917. TESTS = codecs2html codec-cfg-test libvo/aspecttest mp3lib/test mp3lib/test2
  918. ifdef ARCH_X86_32
  919. TESTS += loader/qtx/list loader/qtx/qtxload
  920. endif
  921. TESTS_DEP_FILES = $(addsuffix .d,$(TESTS))
  922. tests: $(addsuffix $(EXESUF),$(TESTS))
  923. testsclean:
  924. -rm -f $(call ADD_ALL_EXESUFS,$(TESTS))
  925. TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)
  926. ifdef ARCH_X86
  927. TOOLS += TOOLS/fastmemcpybench TOOLS/modify_reg
  928. endif
  929. ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc
  930. TOOLS_DEP_FILES = $(addsuffix .d,$(ALLTOOLS))
  931. tools: $(addsuffix $(EXESUF),$(TOOLS))
  932. alltools: $(addsuffix $(EXESUF),$(ALLTOOLS))
  933. toolsclean:
  934. -rm -f $(call ADD_ALL_EXESUFS,$(ALLTOOLS))
  935. -rm -f TOOLS/realcodecs/*.so.6.0
  936. TOOLS/bmovl-test$(EXESUF): -lSDL_image
  937. TOOLS/subrip$(EXESUF): path.o sub/vobsub.o sub/spudec.o sub/unrar_exec.o \
  938. ffmpeg/libswscale/libswscale.a ffmpeg/libavutil/libavutil.a $(TEST_OBJS)
  939. TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
  940. mplayer-nomain.o: mplayer.c
  941. $(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
  942. TOOLS/netstream$(EXESUF): TOOLS/netstream.c
  943. TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
  944. TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS)
  945. $(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(EXTRALIBS)
  946. REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
  947. REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
  948. realcodecs: $(REAL_TARGETS)
  949. realcodecs: CFLAGS += -g
  950. %.so.6.0: %.o
  951. ld -shared -o $@ $< -ldl -lc
  952. ###### drivers #######
  953. KERNEL_INC = /lib/modules/`uname -r`/build/include
  954. KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
  955. KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h
  956. KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o)
  957. MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc
  958. DRIVER_OBJS = $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test
  959. DRIVER_DEP_FILES = $(KERNEL_OBJS:.o=.d) drivers/mga_vid_test.d drivers/tdfx_vid_test.d
  960. drivers: $(DRIVER_OBJS)
  961. $(DRIVER_OBJS): CFLAGS = $(KERNEL_CFLAGS)
  962. drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
  963. install-drivers: $(DRIVER_OBJS)
  964. -mkdir -p $(MODULES_DIR)
  965. $(INSTALL) -m 644 $(KERNEL_OBJS) $(MODULES_DIR)
  966. depmod -a
  967. -mknod /dev/mga_vid c 178 0
  968. -mknod /dev/tdfx_vid c 178 0
  969. -mknod /dev/radeon_vid c 178 0
  970. -ln -s /dev/radeon_vid /dev/rage128_vid
  971. driversclean:
  972. -rm -f $(DRIVER_OBJS) drivers/*~
  973. DHAHELPER_DEP_FILES = vidix/dhahelper/dhahelper.d vidix/dhahelper/test.d vidix/dhahelperwin/dhahelper.d vidix/dhahelperwin/dhasetup.d
  974. dhahelper: vidix/dhahelper/dhahelper.o vidix/dhahelper/test
  975. vidix/dhahelper/dhahelper.o vidix/dhahelper/test: CFLAGS = $(KERNEL_CFLAGS)
  976. install-dhahelper: vidix/dhahelper/dhahelper.o
  977. -mkdir -p $(MODULES_DIR)
  978. $(INSTALL) -m 644 $< $(MODULES_DIR)
  979. depmod -a
  980. -mknod /dev/dhahelper c 180 0
  981. dhahelperwin: vidix/dhahelperwin/dhasetup.exe vidix/dhahelperwin/dhahelper.sys
  982. vidix/dhahelperwin/dhahelper-rc.o: vidix/dhahelperwin/common.ver vidix/dhahelperwin/ntverp.h
  983. vidix/dhahelperwin/base.tmp: vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o
  984. $(CC) -Wl,--base-file,$@ -Wl,--entry,_DriverEntry@8 -nostartfiles \
  985. -nostdlib -o $(@D)/junk.tmp $^ -lntoskrnl
  986. -rm -f $(@D)/junk.tmp
  987. vidix/dhahelperwin/temp.exp: vidix/dhahelperwin/base.tmp
  988. dlltool --dllname $(@D)/dhahelper.sys --base-file $< --output-exp $@
  989. vidix/dhahelperwin/dhahelper.sys: vidix/dhahelperwin/temp.exp vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o
  990. $(CC) -Wl,--subsystem,native -Wl,--image-base,0x10000 \
  991. -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 \
  992. -Wl,--entry,_DriverEntry@8 -Wl,$< -mdll -nostartfiles -nostdlib \
  993. -o $@ $(@:.sys=.o) $(@:.sys=-rc.o) -lntoskrnl
  994. strip $@
  995. install-dhahelperwin:
  996. vidix/dhahelperwin/dhasetup.exe install
  997. dhahelperclean:
  998. -rm -f vidix/dhahelper/*.o vidix/dhahelper/*~ vidix/dhahelper/test
  999. -rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp)
  1000. -include $(DEP_FILES) $(DRIVER_DEP_FILES) $(TESTS_DEP_FILES) $(TOOLS_DEP_FILES) $(DHAHELPER_DEP_FILES)
  1001. .PHONY: all doxygen *install* *tools drivers dhahelper*
  1002. .PHONY: checkheaders *clean tests check_checksums fatetest checkhelp
  1003. .PHONY: doc html-chunked* html-single* xmllint*
  1004. # Disable suffix rules. Most of the builtin rules are suffix rules,
  1005. # so this saves some time on slow systems.
  1006. .SUFFIXES: