2003-12-03 23:56:58 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libmad
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2004-10-09 22:18:02 +02:00
|
|
|
LIBMAD_VERSION=0.15.1b
|
2003-12-03 23:56:58 +01:00
|
|
|
LIBMAD_SOURCE=libmad-$(LIBMAD_VERSION).tar.gz
|
2005-06-09 14:15:00 +02:00
|
|
|
LIBMAD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mad/
|
2007-05-10 10:10:21 +02:00
|
|
|
LIBMAD_DIR=$(BUILD_DIR)/libmad-$(LIBMAD_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
LIBMAD_CAT:=$(ZCAT)
|
2003-12-03 23:56:58 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBMAD_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LIBMAD_SITE)/$(LIBMAD_SOURCE)
|
|
|
|
|
2004-10-09 22:18:02 +02:00
|
|
|
$(LIBMAD_DIR)/.unpacked: $(DL_DIR)/$(LIBMAD_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(LIBMAD_CAT) $(DL_DIR)/$(LIBMAD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-07-23 09:57:31 +02:00
|
|
|
$(CONFIG_UPDATE) $(LIBMAD_DIR)
|
2007-08-28 21:33:27 +02:00
|
|
|
toolchain/patch-kernel.sh $(LIBMAD_DIR) package/libmad/ libmad-$(LIBMAD_VERSION)\*.patch
|
|
|
|
toolchain/patch-kernel.sh $(LIBMAD_DIR) package/libmad/ libmad-$(LIBMAD_VERSION)\*.patch.$(ARCH)
|
2007-11-02 23:37:58 +01:00
|
|
|
# Prevent automake from running.
|
|
|
|
(cd $(LIBMAD_DIR); touch -c config* aclocal.m4 Makefile*);
|
2007-07-23 09:57:31 +02:00
|
|
|
touch $@
|
2003-12-03 23:56:58 +01:00
|
|
|
|
|
|
|
$(LIBMAD_DIR)/.configured: $(LIBMAD_DIR)/.unpacked
|
|
|
|
(cd $(LIBMAD_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2003-12-03 23:56:58 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
2007-07-28 19:09:44 +02:00
|
|
|
--disable-debugging \
|
|
|
|
--enable-speed \
|
2003-12-03 23:56:58 +01:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-07-23 09:57:31 +02:00
|
|
|
touch $@
|
2003-12-03 23:56:58 +01:00
|
|
|
|
2007-05-10 10:10:21 +02:00
|
|
|
$(LIBMAD_DIR)/libmad.la: $(LIBMAD_DIR)/.configured
|
2003-12-03 23:56:58 +01:00
|
|
|
rm -f $@
|
2007-11-27 22:44:55 +01:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBMAD_DIR)
|
2003-12-03 23:56:58 +01:00
|
|
|
|
2007-11-02 23:37:58 +01:00
|
|
|
$(STAGING_DIR)/usr/lib/libmad.so.0: $(LIBMAD_DIR)/libmad.la
|
2007-05-10 10:10:21 +02:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBMAD_DIR) install
|
2007-11-02 23:37:58 +01:00
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libmad.la
|
2003-12-03 23:56:58 +01:00
|
|
|
|
2007-11-02 23:37:58 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/libmad.so.0: $(STAGING_DIR)/usr/lib/libmad.so.0
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libmad.so.* $(TARGET_DIR)/usr/lib/
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libmad.so.*
|
2007-05-10 10:10:21 +02:00
|
|
|
|
2007-11-02 23:37:58 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/libmad.a: $(STAGING_DIR)/usr/lib/libmad.so.0
|
2007-05-10 10:10:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/include
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/include/mad.h $(TARGET_DIR)/usr/include/
|
2007-11-02 23:37:58 +01:00
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libmad.la $(TARGET_DIR)/usr/lib/
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libmad.so $(TARGET_DIR)/usr/lib/
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libmad.a $(TARGET_DIR)/usr/lib/
|
2007-05-10 10:10:21 +02:00
|
|
|
|
2007-11-02 23:37:58 +01:00
|
|
|
libmad: uclibc $(TARGET_DIR)/usr/lib/libmad.so.0
|
2007-05-10 10:10:21 +02:00
|
|
|
|
|
|
|
libmad-headers: $(TARGET_DIR)/usr/lib/libmad.a
|
2003-12-03 23:56:58 +01:00
|
|
|
|
|
|
|
libmad-source: $(DL_DIR)/$(LIBMAD_SOURCE)
|
|
|
|
|
|
|
|
libmad-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(LIBMAD_DIR) clean
|
|
|
|
-rm -f $(STAGING_DIR)/usr/lib/libmad.*
|
2007-05-10 10:10:21 +02:00
|
|
|
rm -f $(STAGING_DIR)/usr/include/mad.h
|
2008-03-27 16:42:42 +01:00
|
|
|
-rm -f $(TARGET_DIR)/usr/lib/libmad.*
|
2007-05-10 10:10:21 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/include/mad.h
|
|
|
|
|
2003-12-03 23:56:58 +01:00
|
|
|
|
|
|
|
libmad-dirclean:
|
2007-05-10 10:10:21 +02:00
|
|
|
rm -rf $(LIBMAD_DIR)
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBMAD)),y)
|
|
|
|
TARGETS+=libmad
|
|
|
|
endif
|
2007-05-10 10:10:21 +02:00
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBMAD_TARGET_HEADERS)),y)
|
|
|
|
TARGETS+=libmad-headers
|
|
|
|
endif
|