mplayer.mk 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #############################################################
  2. #
  3. # mplayer
  4. #
  5. #############################################################
  6. MPLAYER_VERSION:=1.0rc2
  7. MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
  8. MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
  9. MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
  10. MPLAYER_CAT:=$(BZCAT)
  11. MPLAYER_BINARY:=mplayer
  12. MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
  13. ifeq ($(BR2_ENDIAN),"BIG")
  14. MPLAYER_ENDIAN:=--enable-big-endian
  15. else
  16. MPLAYER_ENDIAN:=--disable-big-endian
  17. endif
  18. # mplayer unfortunately uses --disable-largefileS, so we cannot use
  19. # DISABLE_LARGEFILE
  20. ifeq ($(BR2_LARGEFILE),y)
  21. MPLAYER_LARGEFILE:=--enable-largefiles
  22. else
  23. MPLAYER_LARGEFILE:=--disable-largefiles
  24. endif
  25. ifeq ($(BR2_i386),y)
  26. # This seems to be required to compile some of the inline asm
  27. MPLAYER_CFLAGS:=-fomit-frame-pointer
  28. endif
  29. $(DL_DIR)/$(MPLAYER_SOURCE):
  30. $(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))
  31. $(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
  32. $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  33. toolchain/patch-kernel.sh $(MPLAYER_DIR) package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
  34. $(CONFIG_UPDATE) $(MPLAYER_DIR)
  35. touch $@
  36. $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
  37. (cd $(MPLAYER_DIR); rm -rf config.cache; \
  38. $(TARGET_CONFIGURE_OPTS) \
  39. $(TARGET_CONFIGURE_ARGS) \
  40. CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
  41. LDFLAGS="$(TARGET_LDFLAGS)" \
  42. ./configure \
  43. --prefix=/usr \
  44. --confdir=/etc \
  45. --target=$(GNU_TARGET_NAME) \
  46. --host-cc=$(HOSTCC) \
  47. --cc=$(TARGET_CC) \
  48. --as=$(TARGET_CROSS)as \
  49. --with-extraincdir=$(STAGING_DIR)/usr/include \
  50. --with-extralibdir=$(STAGING_DIR)/lib \
  51. --charset=UTF-8 \
  52. --enable-mad \
  53. --enable-fbdev \
  54. $(MPLAYER_ENDIAN) \
  55. $(MPLAYER_LARGEFILE) \
  56. --enable-cross-compile \
  57. --disable-ivtv \
  58. --disable-tv \
  59. --disable-live \
  60. --enable-dynamic-plugins \
  61. )
  62. touch $@
  63. $(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
  64. $(MAKE) -C $(MPLAYER_DIR)
  65. touch -c $@
  66. $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
  67. $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  68. -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  69. touch -c $@
  70. mplayer: $(if $(BR2_PACKAGE_LIBMAD),libmad) $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  71. mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
  72. mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
  73. mplayer-clean:
  74. rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  75. -$(MAKE) -C $(MPLAYER_DIR) clean
  76. mplayer-dirclean:
  77. rm -rf $(MPLAYER_DIR)
  78. #############################################################
  79. #
  80. # Toplevel Makefile options
  81. #
  82. #############################################################
  83. ifeq ($(BR2_PACKAGE_MPLAYER),y)
  84. TARGETS+=mplayer
  85. endif