2006-08-29 18:40:38 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# lzma
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-10-26 21:41:11 +01:00
|
|
|
LZMA_VERSION:=4.32.7
|
2007-07-11 16:06:06 +02:00
|
|
|
LZMA_SOURCE:=lzma-$(LZMA_VERSION).tar.gz
|
2006-08-29 18:40:38 +02:00
|
|
|
LZMA_SITE:=http://tukaani.org/lzma/
|
2009-10-26 21:39:14 +01:00
|
|
|
LZMA_INSTALL_STAGING = YES
|
|
|
|
LZMA_INSTALL_TARGET = YES
|
|
|
|
LZMA_CONF_OPT = $(if $(BR2_ENABLE_DEBUG),--enable-debug,--disable-debug)
|
|
|
|
|
|
|
|
$(eval $(call AUTOTARGETS,package,lzma))
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
#
|
|
|
|
# lzma host
|
|
|
|
#
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
LZMA_CAT:=$(ZCAT)
|
2009-09-23 01:30:00 +02:00
|
|
|
LZMA_HOST_DIR:=$(TOOLCHAIN_DIR)/lzma-$(LZMA_VERSION)
|
2006-08-29 18:40:38 +02:00
|
|
|
|
2007-08-21 17:33:33 +02:00
|
|
|
# lzma binary for use on the host
|
2009-09-23 01:30:00 +02:00
|
|
|
LZMA=$(TOOLCHAIN_DIR)/bin/lzma
|
2009-01-01 22:20:35 +01:00
|
|
|
HOST_LZMA_BINARY=$(shell package/lzma/lzmacheck.sh)
|
|
|
|
HOST_LZMA_IF_ANY=$(shell toolchain/dependencies/check-host-lzma.sh)
|
2007-08-21 17:33:33 +02:00
|
|
|
|
2006-08-29 18:40:38 +02:00
|
|
|
$(DL_DIR)/$(LZMA_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(LZMA_SITE),$(LZMA_SOURCE))
|
2006-08-29 18:40:38 +02:00
|
|
|
|
2007-07-31 18:13:00 +02:00
|
|
|
$(LZMA_HOST_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE)
|
2009-09-23 01:30:00 +02:00
|
|
|
$(LZMA_CAT) $(DL_DIR)/$(LZMA_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
|
2006-11-04 20:15:56 +01:00
|
|
|
toolchain/patch-kernel.sh $(LZMA_HOST_DIR) package/lzma/ lzma\*.patch
|
2007-07-31 18:13:00 +02:00
|
|
|
touch $@
|
2006-11-04 20:15:56 +01:00
|
|
|
|
2007-07-31 18:13:00 +02:00
|
|
|
$(LZMA_HOST_DIR)/.configured: $(LZMA_HOST_DIR)/.unpacked
|
2007-08-22 11:56:41 +02:00
|
|
|
(cd $(LZMA_HOST_DIR); rm -f config.cache;\
|
2006-11-04 20:15:56 +01:00
|
|
|
CC="$(HOSTCC)" \
|
2006-11-20 17:09:43 +01:00
|
|
|
CXX="$(HOSTCXX)" \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2006-11-04 20:15:56 +01:00
|
|
|
--prefix=/ \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-07-31 18:13:00 +02:00
|
|
|
touch $@
|
2006-11-04 20:15:56 +01:00
|
|
|
|
|
|
|
$(LZMA_HOST_DIR)/src/lzma/lzma: $(LZMA_HOST_DIR)/.configured
|
|
|
|
$(MAKE) -C $(LZMA_HOST_DIR) all
|
|
|
|
touch -c $@
|
|
|
|
|
|
|
|
$(STAGING_DIR)/bin/lzma: $(LZMA_HOST_DIR)/src/lzma/lzma
|
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LZMA_HOST_DIR) install
|
2007-08-13 01:28:48 +02:00
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/lib\',g" \
|
|
|
|
$(STAGING_DIR)/lib/liblzmadec.la
|
2006-08-29 18:40:38 +02:00
|
|
|
|
2007-08-21 17:33:33 +02:00
|
|
|
.PHONY: lzma-host use-lzma-host-binary
|
|
|
|
use-lzma-host-binary:
|
2009-09-23 01:30:00 +02:00
|
|
|
if [ ! -f "$(TOOLCHAIN_DIR)/bin/lzma" ]; then \
|
|
|
|
[ -d $(TOOLCHAIN_DIR)/bin ] || mkdir -p $(TOOLCHAIN_DIR)/bin; \
|
|
|
|
ln -sf "$(HOST_LZMA_IF_ANY)" "$(TOOLCHAIN_DIR)/bin/lzma"; \
|
2007-08-21 17:33:33 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
build-lzma-host-binary: $(LZMA_HOST_DIR)/src/lzma/lzma
|
2009-09-23 01:30:00 +02:00
|
|
|
-rm -f $(TOOLCHAIN_DIR)/bin/lzma
|
|
|
|
[ -d $(TOOLCHAIN_DIR)/bin ] || mkdir $(TOOLCHAIN_DIR)/bin
|
|
|
|
cp -pf $(LZMA_HOST_DIR)/src/lzma/lzma $(TOOLCHAIN_DIR)/bin/lzma
|
2007-08-21 17:33:33 +02:00
|
|
|
|
|
|
|
host-lzma: $(HOST_LZMA_BINARY)
|
|
|
|
|
2007-07-31 18:13:00 +02:00
|
|
|
lzma-host: $(STAGING_DIR)/bin/lzma
|
2007-08-16 20:17:39 +02:00
|
|
|
|
2007-07-31 18:13:00 +02:00
|
|
|
lzma-host-clean:
|
|
|
|
rm -f $(STAGING_DIR)/bin/lzma
|
|
|
|
-$(MAKE) -C $(LZMA_HOST_DIR) clean
|
|
|
|
lzma-host-dirclean:
|
|
|
|
rm -rf $(LZMA_HOST_DIR)
|
2007-08-16 20:17:39 +02:00
|
|
|
|
2007-08-20 19:21:16 +02:00
|
|
|
lzma-host-install: /usr/local/bin/lzma
|