Makefile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= mplayer
  5. PKG_VERSION:= 1.0-32749
  6. PKG_RELEASE:= 4
  7. PKG_MD5SUM:= aadc5d8cca503c8b18b3ed00b3a52cf5
  8. PKG_DESCR:= popular video player
  9. PKG_SECTION:= multimedia
  10. PKG_DEPENDS:= alsa-lib libjpeg libfaad2 libmad libncurses
  11. PKG_DEPENDS+= libogg libpng libpthread libvorbis giflib
  12. PKG_DEPENDS+= libx11 libxau libxdmcp libxext libxv zlib
  13. PKG_DEPENDS+= libxscrnsaver libtheora libxvid libvpx
  14. PKG_BUILDDEP:= alsa-lib libmad libvorbis faad2 ncurses zlib
  15. PKG_BUILDDEP+= libX11 libXv libpng libXext jpeg libtheora
  16. PKG_BUILDDEP+= xvidcore libvpx
  17. PKG_URL:= http://www.mplayerhq.hu/
  18. PKG_SITES:= http://openadk.org/distfiles/
  19. PKG_ARCH_DEPENDS:= x86 mips arm
  20. PKG_FLAVOURS_MPLAYER:= WITH_DIRECTFB
  21. PKGFD_WITH_DIRECTFB:= enable DirectFB video output support
  22. PKGFS_WITH_DIRECTFB:= directfb
  23. PKGFB_WITH_DIRECTFB:= DirectFB
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,MPLAYER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  27. # gcc 4.5 produces internal compiler error with -Os
  28. TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS))
  29. CONFIG_STYLE:= minimal
  30. FAKE_FLAGS+= INSTALLSTRIP=''
  31. ifeq (${ADK_TARGET_SYSTEM_LEMOTE_YEELONG},y)
  32. EXTRA_CFLAGS:= -DARCH_MIPS64
  33. endif
  34. # Somehow this include path is missing here, although other
  35. # applications build fine against DirectFB. There is also a
  36. # related patch to allow configure to find out the DirectFB
  37. # version number.
  38. ifeq (${ADK_PACKAGE_MPLAYER_WITH_DIRECTFB},y)
  39. TARGET_CPPFLAGS+= -I${STAGING_TARGET_DIR}/usr/include/directfb
  40. endif
  41. ifeq (${ADK_TARGET_CPU_WITH_MMX},y)
  42. CONFIGURE_CPU_OPTS:= --enable-mmx
  43. else
  44. CONFIGURE_CPU_OPTS:= --disable-mmx
  45. endif
  46. ifeq (${ADK_TARGET_CPU_WITH_MMXEXT},y)
  47. CONFIGURE_CPU_OPTS+= --enable-mmxext
  48. else
  49. CONFIGURE_CPU_OPTS+= --disable-mmxext
  50. endif
  51. ifeq (${ADK_TARGET_CPU_WITH_SSE},y)
  52. CONFIGURE_CPU_OPTS+= --enable-sse
  53. else
  54. CONFIGURE_CPU_OPTS+= --disable-sse
  55. endif
  56. ifeq (${ADK_TARGET_CPU_WITH_SSE2},y)
  57. CONFIGURE_CPU_OPTS+= --enable-sse2
  58. else
  59. CONFIGURE_CPU_OPTS+= --disable-sse2
  60. endif
  61. #ifeq (${ADK_TARGET_CPU_WITH_IWMMXT},y)
  62. #CONFIGURE_CPU_OPTS+= --enable-iwmmxt
  63. #else
  64. #CONFIGURE_CPU_OPTS+= --disable-iwmmxt
  65. #endif
  66. ifeq ($(ADK_DEBUG),y)
  67. CONFIGURE_DEBUG= --enable-debug
  68. endif
  69. ifeq (${ADK_PACKAGE_MPLAYER_WITH_DIRECTFB},y)
  70. CONFIGURE_DIRECTFB= --enable-directfb
  71. else
  72. CONFIGURE_DIRECTFB= --disable-directfb
  73. endif
  74. CONFIGURE_ARGS:= --prefix=/usr \
  75. --enable-x11 \
  76. --confdir=/etc \
  77. --enable-cross-compile \
  78. --target=${ARCH}-linux \
  79. --cc='$(TARGET_CC)' \
  80. --host-cc=$(CC_FOR_BUILD) \
  81. --yasm='' \
  82. --disable-mencoder \
  83. --enable-fbdev \
  84. --enable-alsa \
  85. --enable-tv \
  86. --enable-v4l2 \
  87. --enable-png \
  88. --enable-jpeg \
  89. --enable-mad \
  90. --enable-libvorbis \
  91. --enable-faac \
  92. --enable-theora \
  93. --enable-xvid \
  94. --disable-ossaudio \
  95. --disable-vm \
  96. --disable-iconv \
  97. --disable-lirc \
  98. --disable-radio-v4l2 \
  99. --disable-speex \
  100. --disable-libdv \
  101. --disable-live \
  102. --disable-pvr \
  103. --disable-ftp \
  104. --disable-ivtv \
  105. --disable-dvdread-internal \
  106. --disable-libdvdcss-internal \
  107. --disable-freetype \
  108. --disable-mpg123 \
  109. --disable-tremor-internal \
  110. --disable-arts \
  111. --disable-esd \
  112. --disable-jack \
  113. --disable-openal \
  114. --disable-nas \
  115. --disable-sgiaudio \
  116. --disable-sunaudio \
  117. --disable-win32waveout \
  118. --disable-tga \
  119. --disable-pnm \
  120. --disable-md5sum \
  121. --disable-liblzo \
  122. --disable-sdl \
  123. --disable-xinerama \
  124. --disable-vidix \
  125. --disable-gl \
  126. --extra-cflags="${EXTRA_CFLAGS}" \
  127. ${CONFIGURE_CPU_OPTS} \
  128. ${CONFIGURE_DEBUG} \
  129. ${CONFIGURE_DIRECTFB}
  130. XAKE_FLAGS+= AR="${TARGET_CROSS}ar" RANLIB="${TARGET_CROSS}ranlib"
  131. TARGET_LDFLAGS+= -lxvidcore
  132. post-install:
  133. ${INSTALL_DIR} ${IDIR_MPLAYER}/usr/bin
  134. ${CP} ${WRKINST}/usr/bin/mplayer ${IDIR_MPLAYER}/usr/bin
  135. include ${TOPDIR}/mk/pkg-bottom.mk