2007-05-10 11:20:20 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# madplay
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-28 17:57:09 +02:00
|
|
|
MADPLAY_VERSION:=0.15.2b
|
|
|
|
MADPLAY_SOURCE:=madplay-$(MADPLAY_VERSION).tar.gz
|
|
|
|
MADPLAY_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mad
|
2007-05-10 11:20:20 +02:00
|
|
|
MADPLAY_CAT:=$(ZCAT)
|
2007-07-28 17:57:09 +02:00
|
|
|
MADPLAY_DIR:=$(BUILD_DIR)/madplay-$(MADPLAY_VERSION)
|
|
|
|
MADPLAY_BIN:=madplay
|
|
|
|
MADPLAY_TARGET_BIN:=usr/bin/$(MADPLAY_BIN)
|
|
|
|
|
|
|
|
# Check if ALSA is built, then we should configure after alsa-lib so
|
|
|
|
# ./configure can find alsa-lib.
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_MADPLAY_ALSA)),y)
|
|
|
|
MADPLAY_USE_ALSA:=--with-alsa
|
|
|
|
MADPLAY_ALSA_DEP:=alsa-lib
|
|
|
|
endif
|
2007-05-10 11:20:20 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(MADPLAY_SOURCE):
|
2007-07-28 17:57:09 +02:00
|
|
|
$(WGET) -P $(DL_DIR) $(MADPLAY_SITE)/$(MADPLAY_SOURCE)
|
2007-05-10 11:20:20 +02:00
|
|
|
|
|
|
|
$(MADPLAY_DIR)/.unpacked: $(DL_DIR)/$(MADPLAY_SOURCE)
|
|
|
|
$(MADPLAY_CAT) $(DL_DIR)/$(MADPLAY_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-07-28 17:57:09 +02:00
|
|
|
toolchain/patch-kernel.sh $(MADPLAY_DIR) package/madplay madplay\*.patch\*
|
|
|
|
$(CONFIG_UPDATE) $(MADPLAY_DIR)
|
|
|
|
touch $@
|
2007-05-10 11:20:20 +02:00
|
|
|
|
|
|
|
$(MADPLAY_DIR)/.configured: $(MADPLAY_DIR)/.unpacked
|
|
|
|
(cd $(MADPLAY_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-07-28 17:57:09 +02:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(BR2_MADPLAY_CFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2007-05-10 11:20:20 +02:00
|
|
|
./configure \
|
2007-07-28 17:57:09 +02:00
|
|
|
--target=$(REAL_GNU_TARGET_NAME) \
|
|
|
|
--host=$(REAL_GNU_TARGET_NAME) \
|
2007-05-10 11:20:20 +02:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
2007-07-28 17:57:09 +02:00
|
|
|
$(MADPLAY_USE_ALSA) \
|
2007-05-10 11:20:20 +02:00
|
|
|
$(DISABLE_NLS) \
|
2007-07-28 17:57:09 +02:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-05-10 11:20:20 +02:00
|
|
|
);
|
2007-07-28 17:57:09 +02:00
|
|
|
touch $@
|
2007-05-10 11:20:20 +02:00
|
|
|
|
2007-07-28 17:57:09 +02:00
|
|
|
$(MADPLAY_DIR)/$(MADPLAY_BIN): $(MADPLAY_DIR)/.configured
|
|
|
|
$(MAKE) -C $(MADPLAY_DIR)
|
2007-05-10 11:20:20 +02:00
|
|
|
|
2007-07-28 17:57:09 +02:00
|
|
|
$(TARGET_DIR)/$(MADPLAY_TARGET_BIN): $(MADPLAY_DIR)/$(MADPLAY_BIN)
|
|
|
|
$(INSTALL) -D $(MADPLAY_DIR)/$(MADPLAY_BIN) $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
|
|
|
|
$(STRIP) --strip-unneeded $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
|
2007-05-10 11:20:20 +02:00
|
|
|
|
2007-07-28 17:57:09 +02:00
|
|
|
madplay: uclibc $(MADPLAY_ALSA_DEP) libmad libid3tag $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
|
2007-05-10 11:20:20 +02:00
|
|
|
|
|
|
|
madplay-clean:
|
2007-07-28 17:57:09 +02:00
|
|
|
rm -f $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
|
|
|
|
$(MAKE) -C $(MADPLAY_DIR) clean
|
2007-05-10 11:20:20 +02:00
|
|
|
|
|
|
|
madplay-dirclean:
|
|
|
|
rm -rf $(MADPLAY_DIR)
|
2007-07-28 17:57:09 +02:00
|
|
|
|
|
|
|
madplay-source: $(DL_DIR)/$(MADPLAY_SOURCE)
|
|
|
|
|
2007-05-10 11:20:20 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_MADPLAY)),y)
|
|
|
|
TARGETS+=madplay
|
|
|
|
endif
|