summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-06-21 12:06:18 +0200
committerAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-06-21 12:06:18 +0200
commitdc7c674ff2d6d05c7113a30099005ed032f9c614 (patch)
tree6599f29597126d495a9f01c6684e2a90e7b9d2ad
parentf43942559671c0f7069fb62e1f33b4b7ce6beac0 (diff)
downloadembtoolkit-dc7c674ff2d6d05c7113a30099005ed032f9c614.tar.gz
embtoolkit-dc7c674ff2d6d05c7113a30099005ed032f9c614.tar.bz2
embtoolkit-dc7c674ff2d6d05c7113a30099005ed032f9c614.tar.xz
Packages: add lzo build for target machine
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r--mk/lzo.mk49
1 files changed, 39 insertions, 10 deletions
diff --git a/mk/lzo.mk b/mk/lzo.mk
index e140a75..2839def 100644
--- a/mk/lzo.mk
+++ b/mk/lzo.mk
@@ -1,4 +1,4 @@
-#########################################################################################
+################################################################################
# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved.
#
@@ -14,32 +14,31 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
-#########################################################################################
+################################################################################
#
# \file lzo.mk
# \brief lzo.mk of Embtoolkit.
# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
# \date June 2009
-#########################################################################################
+################################################################################
LZO_VERSION := 2.03
LZO_SITE := http://www.oberhumer.com/opensource/lzo/download
LZO_PACKAGE := lzo-$(LZO_VERSION).tar.gz
LZO_HOST_BUILD_DIR := $(TOOLS_BUILD)/lzo-build-host
+LZO_TARGET_BUILD_DIR := $(PACKAGES_BUILD)/lzo-build-target
lzo_host_install: $(LZO_HOST_BUILD_DIR)/.installed
+lzo_target_install: $(LZO_TARGET_BUILD_DIR)/.installed
-$(LZO_HOST_BUILD_DIR)/.installed: download_lzo $(LZO_HOST_BUILD_DIR)/.decompressed \
+#lzo host machine
+$(LZO_HOST_BUILD_DIR)/.installed: download_lzo \
+$(LZO_HOST_BUILD_DIR)/.decompressed \
$(LZO_HOST_BUILD_DIR)/.configured
$(MAKE) -C $(LZO_HOST_BUILD_DIR)
$(MAKE) -C $(LZO_HOST_BUILD_DIR) install
@touch $@
-download_lzo:
- $(call EMBTK_GENERIC_MESSAGE,"Downloading $(LZO_PACKAGE) if necessary...")
- @test -e $(DOWNLOAD_DIR)/$(LZO_PACKAGE) || \
- wget -O $(DOWNLOAD_DIR)/$(LZO_PACKAGE) $(LZO_SITE)/$(LZO_PACKAGE)
-
$(LZO_HOST_BUILD_DIR)/.decompressed:
$(call EMBTK_GENERIC_MESSAGE,"Decompressing $(LZO_PACKAGE)...")
@tar -C $(TOOLS_BUILD) -xzf $(DOWNLOAD_DIR)/$(LZO_PACKAGE)
@@ -50,6 +49,36 @@ $(LZO_HOST_BUILD_DIR)/.configured:
$(call EMBTK_GENERIC_MESSAGE,"Configuring lzo-$(LZO_VERSION)...")
@cd $(LZO_HOST_BUILD_DIR); CC=$(HOSTCC_CACHED) CXX=$(HOSTCXX_CACHED) \
$(TOOLS_BUILD)/lzo-$(LZO_VERSION)/configure \
- --prefix=$(HOSTTOOLS)/usr/local --build=$(HOST_BUILD) --host=$(HOST_ARCH)
+ --prefix=$(HOSTTOOLS)/usr/local --build=$(HOST_BUILD) \
+ --host=$(HOST_ARCH)
+ @touch $@
+
+#lzo target machine
+$(LZO_TARGET_BUILD_DIR)/.installed: download_lzo \
+$(LZO_TARGET_BUILD_DIR)/.decompressed \
+ $(LZO_TARGET_BUILD_DIR)/.configured
+ $(MAKE) -C $(LZO_TARGET_BUILD_DIR)
+ $(MAKE) -C $(LZO_TARGET_BUILD_DIR) install
+ @touch $@
+
+$(LZO_TARGET_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(LZO_PACKAGE)...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(LZO_PACKAGE)
+ @mkdir -p $(LZO_TARGET_BUILD_DIR)
+ @touch $@
+
+$(LZO_TARGET_BUILD_DIR)/.configured:
+ $(call EMBTK_GENERIC_MESSAGE,"Configuring lzo-$(LZO_VERSION)...")
+ @cd $(LZO_TARGET_BUILD_DIR); CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) RANLIB=$(TOOLS)/bin/$(GNU_TARGET)-ranlib \
+ AR=$(TOOLS)/bin/$(GNU_TARGET)-ar \
+ $(PACKAGES_BUILD)/lzo-$(LZO_VERSION)/configure \
+ --prefix=$(SYSROOT)/usr/local --host=$(STRICT_GNU_TARGET)
@touch $@
+download_lzo:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(LZO_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(LZO_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(LZO_PACKAGE) $(LZO_SITE)/$(LZO_PACKAGE)
+