Makefile 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= mplayer
  5. PKG_VERSION:= 1.1.1
  6. PKG_RELEASE:= 3
  7. PKG_HASH:= ce8fc7c3179e6a57eb3a58cb7d1604388756b8a61764cc93e095e7aff3798c76
  8. PKG_DESCR:= popular video player
  9. PKG_SECTION:= mm/video
  10. PKG_DEPENDS:= alsa-lib libjpeg-turbo 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 libjpeg-turbo libtheora
  16. PKG_BUILDDEP+= xvidcore libvpx gettext-tiny
  17. PKG_URL:= http://www.mplayerhq.hu/
  18. PKG_SITES:= http://www.mplayerhq.hu/MPlayer/releases/
  19. PKG_BUILDDEP_IBM_X40:= yasm-host
  20. DISTFILES:= MPlayer-$(PKG_VERSION).tar.xz
  21. WRKDIST= ${WRKDIR}/MPlayer-${PKG_VERSION}
  22. PKG_ARCH_DEPENDS:= x86 x86_64 mips arm
  23. PKG_FLAVOURS_MPLAYER:= WITH_DIRECTFB
  24. PKGFD_WITH_DIRECTFB:= enable DirectFB video output support
  25. PKGFS_WITH_DIRECTFB:= directfb
  26. PKGFB_WITH_DIRECTFB:= DirectFB
  27. include ${ADK_TOPDIR}/mk/package.mk
  28. $(eval $(call PKG_template,MPLAYER,mplayer,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  29. TARGET_CC:= ${TARGET_COMPILER_PREFIX}gcc
  30. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  31. TARGET_CFLAGS+= -D_POSIX_SOURCE -D_GNU_SOURCE
  32. CONFIG_STYLE:= minimal
  33. FAKE_FLAGS+= INSTALLSTRIP=''
  34. ifeq (${ADK_TARGET_SYSTEM_LEMOTE_YEELONG},y)
  35. EXTRA_CFLAGS:= -DARCH_MIPS64
  36. endif
  37. # Somehow this include path is missing here, although other
  38. # applications build fine against DirectFB. There is also a
  39. # related patch to allow configure to find out the DirectFB
  40. # version number.
  41. ifeq (${ADK_PACKAGE_MPLAYER_WITH_DIRECTFB},y)
  42. TARGET_CPPFLAGS+= -I${STAGING_TARGET_DIR}/usr/include/directfb
  43. endif
  44. ifeq (${ADK_TARGET_CPU_WITH_MMX},y)
  45. CONFIGURE_CPU_OPTS:= --enable-mmx
  46. else
  47. CONFIGURE_CPU_OPTS:= --disable-mmx
  48. endif
  49. ifeq (${ADK_TARGET_CPU_WITH_MMXEXT},y)
  50. CONFIGURE_CPU_OPTS+= --enable-mmxext
  51. else
  52. CONFIGURE_CPU_OPTS+= --disable-mmxext
  53. endif
  54. ifeq (${ADK_TARGET_CPU_WITH_SSE},y)
  55. CONFIGURE_CPU_OPTS+= --enable-sse
  56. else
  57. CONFIGURE_CPU_OPTS+= --disable-sse
  58. endif
  59. ifeq (${ADK_TARGET_CPU_WITH_SSE2},y)
  60. CONFIGURE_CPU_OPTS+= --enable-sse2
  61. else
  62. CONFIGURE_CPU_OPTS+= --disable-sse2
  63. endif
  64. #ifeq (${ADK_TARGET_CPU_WITH_IWMMXT},y)
  65. #CONFIGURE_CPU_OPTS+= --enable-iwmmxt
  66. #else
  67. #CONFIGURE_CPU_OPTS+= --disable-iwmmxt
  68. #endif
  69. ifeq ($(ADK_DEBUG),y)
  70. CONFIGURE_DEBUG= --enable-debug
  71. endif
  72. ifeq (${ADK_PACKAGE_MPLAYER_WITH_DIRECTFB},y)
  73. CONFIGURE_DIRECTFB= --enable-directfb
  74. else
  75. CONFIGURE_DIRECTFB= --disable-directfb
  76. endif
  77. ifeq ($(ADK_TARGET_SYSTEM_IBM_X40),y)
  78. --yasm=${STAGING_HOST_DIR}/usr/bin/yasm
  79. else
  80. --yasm=''
  81. endif
  82. CONFIGURE_ARGS:= --prefix=/usr \
  83. --enable-x11 \
  84. --confdir=/etc \
  85. --enable-cross-compile \
  86. --target=${ADK_TARGET_ARCH}-linux \
  87. --cc='$(TARGET_CC)' \
  88. --host-cc=$(CC_FOR_BUILD) \
  89. --enable-fbdev \
  90. --enable-alsa \
  91. --enable-tv \
  92. --enable-v4l2 \
  93. --enable-png \
  94. --enable-jpeg \
  95. --enable-mad \
  96. --enable-libvorbis \
  97. --enable-faac \
  98. --enable-theora \
  99. --enable-xvid \
  100. --enable-x264 \
  101. --enable-x264-lavc \
  102. --disable-mencoder \
  103. --disable-ossaudio \
  104. --disable-caca \
  105. --disable-vm \
  106. --disable-iconv \
  107. --disable-lirc \
  108. --disable-radio-v4l2 \
  109. --disable-speex \
  110. --disable-libdv \
  111. --disable-live \
  112. --disable-pvr \
  113. --disable-ftp \
  114. --disable-ivtv \
  115. --disable-dvdread-internal \
  116. --disable-libdvdcss-internal \
  117. --disable-freetype \
  118. --disable-mpg123 \
  119. --disable-tremor-internal \
  120. --disable-arts \
  121. --disable-esd \
  122. --disable-jack \
  123. --disable-openal \
  124. --disable-nas \
  125. --disable-sgiaudio \
  126. --disable-sunaudio \
  127. --disable-win32waveout \
  128. --disable-tga \
  129. --disable-pnm \
  130. --disable-md5sum \
  131. --disable-liblzo \
  132. --disable-sdl \
  133. --disable-xinerama \
  134. --disable-vidix \
  135. --disable-gl \
  136. --disable-ssse3 \
  137. --extra-cflags="${EXTRA_CFLAGS}" \
  138. ${CONFIGURE_CPU_OPTS} \
  139. ${CONFIGURE_DEBUG} \
  140. ${CONFIGURE_DIRECTFB}
  141. XAKE_FLAGS+= AR="${TARGET_CROSS}ar" RANLIB="${TARGET_CROSS}ranlib"
  142. TARGET_LDFLAGS+= -lxvidcore -lX11 -lXext -lvorbis
  143. mplayer-install:
  144. ${INSTALL_DIR} ${IDIR_MPLAYER}/usr/bin
  145. ${CP} ${WRKINST}/usr/bin/mplayer ${IDIR_MPLAYER}/usr/bin
  146. include ${ADK_TOPDIR}/mk/pkg-bottom.mk