kumquat-buildroot/package/multimedia/mplayer/mplayer.mk

124 lines
3.4 KiB
Makefile
Raw Normal View History

2007-07-23 10:12:39 +02:00
#############################################################
#
# mplayer
#
#############################################################
MPLAYER_VERSION:=1.0rc2
2007-07-23 14:40:43 +02:00
MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
2007-07-23 10:12:39 +02:00
MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
2007-07-23 14:40:43 +02:00
MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
2007-07-23 10:12:39 +02:00
MPLAYER_CAT:=$(BZCAT)
MPLAYER_BINARY:=mplayer
MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
MPLAYER_DEPENDENCIES = \
$(if $(BR2_PACKAGE_LIBMAD),libmad) \
$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)
2007-07-23 10:12:39 +02:00
ifeq ($(BR2_ENDIAN),"BIG")
MPLAYER_ENDIAN:=--enable-big-endian
else
MPLAYER_ENDIAN:=--disable-big-endian
endif
2009-01-20 10:29:50 +01:00
# mplayer unfortunately uses --disable-largefileS, so we cannot use
# DISABLE_LARGEFILE
ifeq ($(BR2_LARGEFILE),y)
MPLAYER_LARGEFILE:=--enable-largefiles
else
# dvdread/dvdcss requires largefile support
MPLAYER_LARGEFILE:=--disable-largefiles \
--disable-dvdread-internal \
--disable-libdvdcss-internal
2009-01-20 10:29:50 +01:00
endif
ifeq ($(BR2_PACKAGE_SDL),y)
MPLAYER_SDL:=--enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
MPLAYER_DEPENDENCIES += sdl
else
MPLAYER_SDL:=--disable-sdl
endif
ifeq ($(BR2_PACKAGE_FREETYPE),y)
MPLAYER_FREETYPE:= \
--enable-freetype \
--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config
MPLAYER_DEPENDENCIES += freetype
else
MPLAYER_FREETYPE:=--disable-freetype
endif
ifeq ($(BR2_i386),y)
# This seems to be required to compile some of the inline asm
MPLAYER_CFLAGS:=-fomit-frame-pointer
endif
2007-07-23 10:12:39 +02:00
$(DL_DIR)/$(MPLAYER_SOURCE):
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))
2007-07-23 10:12:39 +02:00
$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
$(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(MPLAYER_DIR) package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
$(CONFIG_UPDATE) $(MPLAYER_DIR)
2007-07-23 14:40:43 +02:00
touch $@
2007-07-23 10:12:39 +02:00
$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
(cd $(MPLAYER_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
2007-07-23 14:40:43 +02:00
$(TARGET_CONFIGURE_ARGS) \
CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
2007-07-23 10:12:39 +02:00
LDFLAGS="$(TARGET_LDFLAGS)" \
./configure \
--prefix=/usr \
--confdir=/etc \
--target=$(GNU_TARGET_NAME) \
--host-cc=$(HOSTCC) \
--cc="$(TARGET_CC)" \
2007-07-23 10:12:39 +02:00
--as=$(TARGET_CROSS)as \
--with-extraincdir=$(STAGING_DIR)/usr/include \
2007-07-23 10:12:39 +02:00
--with-extralibdir=$(STAGING_DIR)/lib \
--charset=UTF-8 \
2007-07-23 10:12:39 +02:00
--enable-mad \
--enable-fbdev \
$(MPLAYER_ENDIAN) \
2009-01-20 10:29:50 +01:00
$(MPLAYER_LARGEFILE) \
$(MPLAYER_SDL) \
$(MPLAYER_FREETYPE) \
2009-01-20 10:11:57 +01:00
--enable-cross-compile \
--disable-ivtv \
2007-07-23 10:12:39 +02:00
--disable-tv \
--disable-live \
2007-07-23 10:12:39 +02:00
--enable-dynamic-plugins \
)
2007-07-23 14:40:43 +02:00
touch $@
2007-07-23 10:12:39 +02:00
$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
$(MAKE1) -C $(MPLAYER_DIR)
2007-07-23 14:40:43 +02:00
touch -c $@
2007-07-23 10:12:39 +02:00
$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
$(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
2007-07-23 14:40:43 +02:00
touch -c $@
2007-07-23 10:12:39 +02:00
mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
2007-07-23 10:12:39 +02:00
mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
2007-07-23 10:12:39 +02:00
mplayer-clean:
rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
-$(MAKE) -C $(MPLAYER_DIR) clean
mplayer-dirclean:
rm -rf $(MPLAYER_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_MPLAYER),y)
2007-07-23 10:12:39 +02:00
TARGETS+=mplayer
endif