mplayer.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #############################################################
  2. #
  3. # mplayer
  4. #
  5. #############################################################
  6. MPLAYER_VERSION:=1.0rc1
  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. $(DL_DIR)/$(MPLAYER_SOURCE):
  19. $(WGET) -P $(DL_DIR) $(MPLAYER_SITE)/$(MPLAYER_SOURCE)
  20. $(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
  21. $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  22. toolchain/patch-kernel.sh $(MPLAYER_DIR) package/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
  23. touch $@
  24. $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
  25. (cd $(MPLAYER_DIR); rm -rf config.cache; \
  26. $(TARGET_CONFIGURE_OPTS) \
  27. $(TARGET_CONFIGURE_ARGS) \
  28. CFLAGS="$(TARGET_CFLAGS)" \
  29. LDFLAGS="$(TARGET_LDFLAGS)" \
  30. ./configure \
  31. --prefix=/usr \
  32. --confdir=/etc \
  33. --target=$(GNU_TARGET_NAME) \
  34. --host-cc=$(HOSTCC) \
  35. --cc=$(TARGET_CC) \
  36. --as=$(TARGET_CROSS)as \
  37. --with-extraincdir=$(STAGING_DIR)/usr/include \
  38. --with-extralibdir=$(STAGING_DIR)/lib \
  39. --enable-mad \
  40. --enable-fbdev \
  41. $(MPLAYER_ENDIAN) \
  42. --disable-mpdvdkit \
  43. --disable-tv \
  44. --enable-dynamic-plugins \
  45. )
  46. touch $@
  47. $(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
  48. $(MAKE) -C $(MPLAYER_DIR)
  49. touch -c $@
  50. $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
  51. $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  52. -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  53. touch -c $@
  54. mplayer: uclibc libmad $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  55. mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
  56. mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
  57. mplayer-clean:
  58. rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
  59. -$(MAKE) -C $(MPLAYER_DIR) clean
  60. mplayer-dirclean:
  61. rm -rf $(MPLAYER_DIR)
  62. #############################################################
  63. #
  64. # Toplevel Makefile options
  65. #
  66. #############################################################
  67. ifeq ($(strip $(BR2_PACKAGE_MPLAYER)),y)
  68. TARGETS+=mplayer
  69. endif