summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-01-15 12:24:31 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-01-15 12:24:31 +0100
commitdec7ba98333dcf69a97ea8a22583171fbe035e00 (patch)
treec9093c836df3071b368c7ba1a05ab96adb35dfff
parentebeb7a5dc4451545d24a51f2f21a3a0fe15f36a8 (diff)
downloadembtoolkit-dec7ba98333dcf69a97ea8a22583171fbe035e00.tar.gz
embtoolkit-dec7ba98333dcf69a97ea8a22583171fbe035e00.tar.bz2
embtoolkit-dec7ba98333dcf69a97ea8a22583171fbe035e00.tar.xz
Packages: zlib: separate zlib and zlib_host to avoid unmet dependency EMBTK_HAVE_ROOTFS
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--Kconfig51
-rw-r--r--kconfig/hosttools-buildopts.kconfig73
-rw-r--r--kconfig/zlib_host.kconfig38
-rw-r--r--mk/macros.packages.mk1
-rw-r--r--mk/packages.mk5
-rw-r--r--mk/zlib_host.mk61
-rw-r--r--packages/compression/compression.mk4
-rw-r--r--packages/compression/zlib/zlib.kconfig27
-rw-r--r--packages/compression/zlib/zlib.mk74
9 files changed, 194 insertions, 140 deletions
diff --git a/Kconfig b/Kconfig
index 550d63b..7ff0321 100644
--- a/Kconfig
+++ b/Kconfig
@@ -1,10 +1,10 @@
################################################################################
# Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2009-2012 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
+# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -61,52 +61,7 @@ source kconfig/targetbuildopts.kconfig
endmenu
menu "Embtoolkit build options and host tools"
-comment "-----------------------------"
-comment "Host tools"
-comment "-----------------------------"
-
-config EMBTK_HOST_HAVE_CMAKE
- bool "Build cmake for the host development machine"
-
-config EMBTK_HAVE_MKIMAGE
- bool
- select EMBTK_HOST_HAVE_ZLIB
- default y
- help
- u-boot mkimage tool.
-
-comment "-----------------------------"
-comment "Build options"
-comment "-----------------------------"
-
-config EMBTK_NUMBER_BUILD_JOBS
- int "Number of parallel build jobs"
- default 1
-
-config EMBTK_DOWNLOAD_DIR
- string "Download directory"
- default $EMBTK_DEFAULT_DL
- help
- Directory where downloaded packages are stored.
-
- You must specify here an absolute directory location, if you choose to
- use an alternate location.
-
- Note:
- If you want to preserve downloaded packages from being removed when
- you do make distclean, you must specify an alternate location.
- If you leave this option in the default location under Embtoolkit,
- $(EMBTK_ROOT)/dl, then make distclean will remove downloaded packages.
- But keep in mind that only a make distclean command will remove
- downloaded packages in the default location under EmbToolkit,
- not make clean.
-
-config EMBTK_CACHE_PATCHES
- bool "Preserve first downloaded patches and do not download new one"
- default y
- help
- When this option is enable, new patches for packages will not be
- downloaded the second time you run the build process.
+source kconfig/hosttools-buildopts.kconfig
endmenu
config EMBTK_HAVE_ROOTFS
diff --git a/kconfig/hosttools-buildopts.kconfig b/kconfig/hosttools-buildopts.kconfig
new file mode 100644
index 0000000..bb2c918
--- /dev/null
+++ b/kconfig/hosttools-buildopts.kconfig
@@ -0,0 +1,73 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2012 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file hosttools-buildopts.kconfig
+# \brief hosttools-buildopts.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date January 2012
+################################################################################
+comment "-----------------------------"
+comment "Host tools"
+comment "-----------------------------"
+
+config EMBTK_HOST_HAVE_CMAKE
+ bool "Build cmake for the host development machine"
+
+config EMBTK_HAVE_MKIMAGE
+ bool
+ select EMBTK_HOST_HAVE_ZLIB
+ default y
+ help
+ u-boot mkimage tool.
+
+source kconfig/zlib_host.kconfig
+
+
+comment "-----------------------------"
+comment "Build options"
+comment "-----------------------------"
+
+config EMBTK_NUMBER_BUILD_JOBS
+ int "Number of parallel build jobs"
+ default 1
+
+config EMBTK_DOWNLOAD_DIR
+ string "Download directory"
+ default $EMBTK_DEFAULT_DL
+ help
+ Directory where downloaded packages are stored.
+
+ You must specify here an absolute directory location, if you choose to
+ use an alternate location.
+
+ Note:
+ If you want to preserve downloaded packages from being removed when
+ you do make distclean, you must specify an alternate location.
+ If you leave this option in the default location under Embtoolkit,
+ $(EMBTK_ROOT)/dl, then make distclean will remove downloaded packages.
+ But keep in mind that only a make distclean command will remove
+ downloaded packages in the default location under EmbToolkit,
+ not make clean.
+
+config EMBTK_CACHE_PATCHES
+ bool "Preserve first downloaded patches and do not download new one"
+ default y
+ help
+ When this option is enable, new patches for packages will not be
+ downloaded the second time you run the build process.
diff --git a/kconfig/zlib_host.kconfig b/kconfig/zlib_host.kconfig
new file mode 100644
index 0000000..75a73e9
--- /dev/null
+++ b/kconfig/zlib_host.kconfig
@@ -0,0 +1,38 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010-2012 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file zlib_host.kconfig
+# \brief zlib_host.kconfig of Embtoolkit.
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date August 2010
+################################################################################
+
+config EMBTK_HOST_HAVE_ZLIB
+ bool
+ help
+ zlib is a compression library.
+
+config EMBTK_ZLIB_HOST_VERSION_STRING
+ string
+ default "1.2.5"
+
+config EMBTK_ZLIB_HOST_NEED_PATCH
+ bool
+config EMBTK_ZLIB_HOST_NEED_AUTORECONF
+ bool
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk
index 5be7470..4b3e903 100644
--- a/mk/macros.packages.mk
+++ b/mk/macros.packages.mk
@@ -250,6 +250,7 @@ endef
define __embtk_print_configure_opts
$(if $(strip $(1)),
$(call embtk_echo_blue,"Configure options:$(strip $(1))") | sed "s/\(--\)/\n\t\1/g")
+ echo
endef
define embtk_configure_pkg
$(if $(EMBTK_BUILDSYS_DEBUG),
diff --git a/mk/packages.mk b/mk/packages.mk
index 3bdc9f4..7e9be1b 100644
--- a/mk/packages.mk
+++ b/mk/packages.mk
@@ -32,6 +32,11 @@ include $(EMBTK_ROOT)/mk/mkimage.mk
include $(EMBTK_ROOT)/mk/mtd-utils.mk
include $(EMBTK_ROOT)/mk/pkgconfig.mk
+include $(EMBTK_ROOT)/mk/zlib_host.mk
+HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_ZLIB) += zlib_host_install
+
+
+
#
# Packages for TARGET and HOST
#
diff --git a/mk/zlib_host.mk b/mk/zlib_host.mk
new file mode 100644
index 0000000..1d5b87c
--- /dev/null
+++ b/mk/zlib_host.mk
@@ -0,0 +1,61 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2012 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file zlib_host.mk
+# \brief zlib_host.mk of Embtoolkit.
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date June 2009
+################################################################################
+
+ZLIB_HOST_NAME := zlib
+ZLIB_HOST_VERSION := $(call embtk_get_pkgversion,zlib_host)
+ZLIB_HOST_SITE := http://zlib.net
+ZLIB_HOST_PACKAGE := zlib-$(ZLIB_HOST_VERSION).tar.bz2
+ZLIB_HOST_SRC_DIR := $(TOOLS_BUILD)/zlib-$(ZLIB_HOST_VERSION)
+ZLIB_HOST_BUILD_DIR := $(TOOLS_BUILD)/zlib-$(ZLIB_HOST_VERSION)
+
+ZLIB_HOST_CONFIGURE_ENV := CC=$(HOSTCC_CACHED)
+
+zlib_host_install:
+ $(Q)test -e $(ZLIB_HOST_BUILD_DIR)/.installed || \
+ $(MAKE) $(ZLIB_HOST_BUILD_DIR)/.installed
+
+$(ZLIB_HOST_BUILD_DIR)/.installed: download_zlib_host \
+ $(ZLIB_HOST_SRC_DIR)/.decompressed \
+ $(ZLIB_HOST_BUILD_DIR)/.configured
+ $(embtk_pinfo,"Compile/Install $(ZLIB_HOST_PACKAGE) for host")
+ $(Q)$(MAKE) -C $(ZLIB_HOST_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(ZLIB_HOST_BUILD_DIR) install
+ $(Q)touch $@
+
+$(ZLIB_HOST_SRC_DIR)/.decompressed:
+ $(call embtk_decompress_pkg,zlib_host)
+
+$(ZLIB_HOST_BUILD_DIR)/.configured:
+ $(call embtk_pinfo,"Configure $(ZLIB_HOST_PACKAGE) for host...")
+ $(Q)cd $(ZLIB_HOST_BUILD_DIR); \
+ CPPFLAGS="-I$(HOSTTOOLS)/usr/include" \
+ LDFLAGS="-L$(HOSTTOOLS)/$(LIBDIR) -L$(HOSTTOOLS)/usr/$(LIBDIR)" \
+ $(ZLIB_HOST_CONFIGURE_ENV) \
+ $(CONFIG_SHELL) $(ZLIB_HOST_SRC_DIR)/configure \
+ --prefix=$(HOSTTOOLS)/usr $(ZLIB_HOST_CONFIGURE_OPTS)
+ $(Q)touch $@
+
+zlib_host_clean:
+ $(call embtk_pinfo,"Clean up zlib for host")
diff --git a/packages/compression/compression.mk b/packages/compression/compression.mk
index 4da50c3..3396717 100644
--- a/packages/compression/compression.mk
+++ b/packages/compression/compression.mk
@@ -28,8 +28,6 @@ include $(EMBTK_ROOT)/packages/compression/lzo/lzo.mk
ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_LZO) += lzo_install
HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_LZO) += lzo_host_install
-#zlib for host and target
+#zlib for target
include $(EMBTK_ROOT)/packages/compression/zlib/zlib.mk
ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_ZLIB) += zlib_install
-HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_ZLIB) += zlib_host_install
-
diff --git a/packages/compression/zlib/zlib.kconfig b/packages/compression/zlib/zlib.kconfig
index b4e967f..2163b45 100644
--- a/packages/compression/zlib/zlib.kconfig
+++ b/packages/compression/zlib/zlib.kconfig
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2010-2011 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2010-2012 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,15 +28,11 @@ config EMBTK_HAVE_ZLIB
help
zlib is a compression library.
-config EMBTK_HOST_HAVE_ZLIB
- bool
- help
- build zlib for the host development machine.
choice
- prompt "zlib version used"
- depends on EMBTK_HAVE_ZLIB || EMBTK_HOST_HAVE_ZLIB
+ prompt "zlib version to use"
+ depends on EMBTK_HAVE_ZLIB
help
- zlib version used
+ zlib version to use
config EMBTK_ZLIB_VERSION_1_2_5
bool "zlib-1.2.5"
@@ -48,20 +44,5 @@ config EMBTK_ZLIB_VERSION_STRING
config EMBTK_ZLIB_NEED_PATCH
bool
- select EMBTK_ZLIB_HOST_NEED_PATCH
config EMBTK_ZLIB_NEED_AUTORECONF
bool
- select EMBTK_ZLIB_HOST_NEED_AUTORECONF
-config EMBTK_ZLIB_PKG_IS_TARGZ
- bool
-config EMBTK_ZLIB_PKG_IS_TARBZ2
- bool
-
-config EMBTK_ZLIB_HOST_NEED_PATCH
- bool
-config EMBTK_ZLIB_HOST_NEED_AUTORECONF
- bool
-config EMBTK_ZLIB_HOST_PKG_IS_TARGZ
- bool
-config EMBTK_ZLIB_HOST_PKG_IS_TARBZ2
- bool
diff --git a/packages/compression/zlib/zlib.mk b/packages/compression/zlib/zlib.mk
index cd6e6d7..0a982d2 100644
--- a/packages/compression/zlib/zlib.mk
+++ b/packages/compression/zlib/zlib.mk
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2009-2012 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,24 +26,20 @@
ZLIB_NAME := zlib
ZLIB_VERSION := $(call embtk_get_pkgversion,zlib)
ZLIB_SITE := http://zlib.net
-ZLIB_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
ZLIB_PACKAGE := zlib-$(ZLIB_VERSION).tar.bz2
ZLIB_SRC_DIR := $(PACKAGES_BUILD)/zlib-$(ZLIB_VERSION)
ZLIB_BUILD_DIR := $(PACKAGES_BUILD)/zlib-$(ZLIB_VERSION)
-##########################
-# zlib on target machine #
-##########################
-ZLIB_BINS =
-ZLIB_SBINS =
-ZLIB_INCLUDES = zconf.h zlib.h
-ZLIB_LIBS = libz.*
-ZLIB_PKGCONFIGS = zlib.pc
+
+ZLIB_BINS :=
+ZLIB_SBINS :=
+ZLIB_INCLUDES := zconf.h zlib.h
+ZLIB_LIBS := libz.*
+ZLIB_PKGCONFIGS := zlib.pc
ZLIB_CONFIGURE_ENV :=
ZLIB_CONFIGURE_OPTS := --enable-shared
-
zlib_install:
$(Q)test -e $(ZLIB_BUILD_DIR)/.installed || \
$(MAKE) $(ZLIB_BUILD_DIR)/.installed
@@ -51,6 +47,7 @@ zlib_install:
$(ZLIB_BUILD_DIR)/.installed: download_zlib \
$(ZLIB_SRC_DIR)/.decompressed \
$(ZLIB_BUILD_DIR)/.configured
+ $(call embtk_pinfo,"Compile/Install $(ZLIB_PACKAGE) for target")
$(Q)$(MAKE) -C $(ZLIB_BUILD_DIR) $(J)
$(Q)$(MAKE) -C $(ZLIB_BUILD_DIR) DESTDIR=$(SYSROOT) install
$(Q)touch $@
@@ -59,8 +56,6 @@ $(ZLIB_SRC_DIR)/.decompressed:
$(call embtk_decompress_pkg,zlib)
$(ZLIB_BUILD_DIR)/.configured:
- $(call embtk_pinfo,"Configure $(ZLIB_PACKAGE)...")
- $(call EMBTK_PRINT_CONFIGURE_OPTS,"$(ZLIB_CONFIGURE_OPTS)")
$(Q)cd $(ZLIB_BUILD_DIR); \
CC=$(TARGETCC_CACHED) \
CXX=$(TARGETCXX_CACHED) \
@@ -83,56 +78,3 @@ $(ZLIB_BUILD_DIR)/.configured:
--libdir=/usr/$(LIBDIR) --prefix=/usr --sysconfdir=/etc \
$(ZLIB_CONFIGURE_OPTS)
@touch $@
-
-zlib_clean:
- $(call embtk_cleanup_pkg,zlib)
-
-########################
-# zlib on host machine #
-########################
-ZLIB_HOST_NAME := $(ZLIB_NAME)
-ZLIB_HOST_VERSION := $(ZLIB_VERSION)
-ZLIB_HOST_SITE := $(ZLIB_SITE)
-ZLIB_HOST_SITE_MIRROR1 := $(ZLIB_SITE_MIRROR1)
-ZLIB_HOST_SITE_MIRROR2 := $(ZLIB_SITE_MIRROR2)
-ZLIB_HOST_SITE_MIRROR3 := $(ZLIB_SITE_MIRROR3)
-ZLIB_HOST_PACKAGE := $(ZLIB_PACKAGE)
-ZLIB_HOST_SRC_DIR := $(TOOLS_BUILD)/zlib-$(ZLIB_VERSION)
-ZLIB_HOST_BUILD_DIR := $(TOOLS_BUILD)/zlib-$(ZLIB_VERSION)
-
-ZLIB_HOST_CONFIGURE_ENV := CC=$(HOSTCC_CACHED)
-
-zlib_host_install:
- $(Q)test -e $(ZLIB_HOST_BUILD_DIR)/.installed || \
- $(MAKE) $(ZLIB_HOST_BUILD_DIR)/.installed
-
-$(ZLIB_HOST_BUILD_DIR)/.installed: download_zlib \
- $(ZLIB_HOST_SRC_DIR)/.decompressed \
- $(ZLIB_HOST_BUILD_DIR)/.configured
- $(Q)$(MAKE) -C $(ZLIB_HOST_BUILD_DIR) $(J)
- $(Q)$(MAKE) -C $(ZLIB_HOST_BUILD_DIR) install
- $(Q)touch $@
-
-$(ZLIB_HOST_SRC_DIR)/.decompressed:
- $(call embtk_decompress_pkg,zlib_host)
-
-$(ZLIB_HOST_BUILD_DIR)/.configured:
- $(call embtk_pinfo,"Configure $(ZLIB_HOST_PACKAGE) for host...")
- $(call EMBTK_PRINT_CONFIGURE_OPTS,"$(ZLIB_HOST_CONFIGURE_OPTS)")
- $(Q)cd $(ZLIB_HOST_BUILD_DIR); \
- CPPFLAGS="-I$(HOSTTOOLS)/usr/include" \
- LDFLAGS="-L$(HOSTTOOLS)/$(LIBDIR) -L$(HOSTTOOLS)/usr/$(LIBDIR)" \
- $(ZLIB_HOST_CONFIGURE_ENV) \
- $(CONFIG_SHELL) $(ZLIB_HOST_SRC_DIR)/configure \
- --prefix=$(HOSTTOOLS)/usr $(ZLIB_HOST_CONFIGURE_OPTS)
- $(Q)touch $@
-
-zlib_host_clean:
-
-##########
-# Common #
-##########
-
-#zlib download
-download_zlib download_zlib_host:
- $(call embtk_download_pkg,zlib)