summaryrefslogtreecommitdiffstats
path: root/package/lzo
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-04-08 22:45:29 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-04-08 22:45:29 +0000
commitb8767865eb0b4943dccbdd8caa671603aa626f31 (patch)
treecf376d8de6a69978924bed705c2170ac4a498557 /package/lzo
parentb2ffc1f9fa813551b5988df0dc7ffa40c5ec6e2f (diff)
downloadbuildroot-novena-b8767865eb0b4943dccbdd8caa671603aa626f31.tar.gz
buildroot-novena-b8767865eb0b4943dccbdd8caa671603aa626f31.zip
jffs2root: build host version of lzo and use for host mkfs.jffs2
Diffstat (limited to 'package/lzo')
-rw-r--r--package/lzo/lzo.mk42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/lzo/lzo.mk b/package/lzo/lzo.mk
index aa9c69d78..1593b8368 100644
--- a/package/lzo/lzo.mk
+++ b/package/lzo/lzo.mk
@@ -14,3 +14,45 @@ LZO_CONF_ENV =
LZO_DEPENDENCIES = uclibc
$(eval $(call AUTOTARGETS,package,lzo))
+
+# lzo for the host
+LZO_HOST_DIR:=$(BUILD_DIR)/lzo-$(LZO_VERSION)-host
+
+$(DL_DIR)/$(LZO_SOURCE):
+ $(call DOWNLOAD,$(LZO_SITE),$(LZO_SOURCE))
+
+$(STAMP_DIR)/host_lzo_unpacked: $(DL_DIR)/$(LZO_SOURCE)
+ mkdir -p $(LZO_HOST_DIR)
+ $(INFLATE$(suffix $(LZO_SOURCE))) $< | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LZO_HOST_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(LZO_HOST_DIR) package/lzo/ \*.patch
+ touch $@
+
+$(STAMP_DIR)/host_lzo_configured: $(STAMP_DIR)/host_lzo_unpacked
+ (cd $(LZO_HOST_DIR); rm -rf config.cache; \
+ $(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ ./configure \
+ --prefix="$(HOST_DIR)/usr" \
+ --sysconfdir="$(HOST_DIR)/etc" \
+ )
+ touch $@
+
+$(STAMP_DIR)/host_lzo_compiled: $(STAMP_DIR)/host_lzo_configured
+ $(MAKE) -C $(LZO_HOST_DIR)
+ touch $@
+
+$(STAMP_DIR)/host_lzo_installed: $(STAMP_DIR)/host_lzo_compiled
+ $(MAKE) -C $(LZO_HOST_DIR) install
+ touch $@
+
+host-lzo: $(STAMP_DIR)/host_lzo_installed
+
+host-lzo-clean:
+ rm -f $(addprefix $(STAMP_DIR)/host_lzo_,unpacked configured compiled installed)
+ -$(MAKE) -C $(LZO_HOST_DIR) uninstall
+ -$(MAKE) -C $(LZO_HOST_DIR) clean
+
+host-lzo-dirclean:
+ rm -rf $(LZO_HOST_DIR)