summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.com>2010-06-20 20:11:38 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.com>2010-06-20 20:11:38 +0200
commit457a1824cde9589a6f789d38b5735f5c77753a3d (patch)
tree6598c31a53057dbcf9cf06ce5de40a5edf06a7a2 /mk
parentb145655d6bce43315c14aa266d688478e44ed8b5 (diff)
downloadembtoolkit-457a1824cde9589a6f789d38b5735f5c77753a3d.tar.gz
embtoolkit-457a1824cde9589a6f789d38b5735f5c77753a3d.tar.bz2
embtoolkit-457a1824cde9589a6f789d38b5735f5c77753a3d.tar.xz
host tools: NEW cmake-2.8.1
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/cmake.mk79
-rw-r--r--mk/toolchain.mk18
2 files changed, 90 insertions, 7 deletions
diff --git a/mk/cmake.mk b/mk/cmake.mk
new file mode 100644
index 0000000..0521b5b
--- /dev/null
+++ b/mk/cmake.mk
@@ -0,0 +1,79 @@
+################################################################################
+# Abdoulaye Walsimou GAYE, <awg@embtoolkit.org>
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# 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
+# (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 cmake.mk
+# \brief cmake.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE, <awg@embtoolkit.org>
+# \date June 2010
+################################################################################
+
+CMAKE_VERSION := 2.8.1
+CMAKE_SITE := http://www.cmake.org/files/v2.8
+CMAKE_PACKAGE := cmake-$(CMAKE_VERSION).tar.gz
+CMAKE_BUILD_DIR := $(TOOLS_BUILD)/cmake-$(CMAKE_VERSION)
+CMAKE_DIR := $(HOSTTOOLS)/usr
+
+CMAKE := $(CMAKE_DIR)/bin/cmake
+CMAKE_TOOLCHAIN_FILE := $(HOSTTOOLS)/usr/etc/$(STRICT_GNU_TARGET).cmake
+export CMAKE CMAKE_TOOLCHAIN_FILE
+
+cmake_install: $(CMAKE_BUILD_DIR)/.installed
+
+$(CMAKE_BUILD_DIR)/.installed: download_cmake \
+ $(CMAKE_BUILD_DIR)/.decompressed $(CMAKE_BUILD_DIR)/.configured
+ @$(MAKE) -C $(CMAKE_BUILD_DIR) $(J)
+ $(MAKE) -C $(CMAKE_BUILD_DIR) install
+ $(MAKE) $(CMAKE_BUILD_DIR)/.generate_target_cmake
+ @touch $@
+
+download_cmake:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(CMAKE_PACKAGE) if \
+ necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(CMAKE_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(CMAKE_PACKAGE) \
+ $(CMAKE_SITE)/$(CMAKE_PACKAGE)
+
+$(CMAKE_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(CMAKE_PACKAGE)...")
+ @tar -C $(TOOLS_BUILD) -xzf $(DOWNLOAD_DIR)/$(CMAKE_PACKAGE)
+ @mkdir -p $(CMAKE_BUILD_DIR)
+ @mkdir -p $(CMAKE_DIR)
+ @touch $@
+
+$(CMAKE_BUILD_DIR)/.configured:
+ $(call EMBTK_GENERIC_MESSAGE,"Configuring \
+ cmake_$(CMAKE_VERSION)...")
+ @cd $(CMAKE_BUILD_DIR); \
+ $(TOOLS_BUILD)/cmake-$(CMAKE_VERSION)/configure \
+ --prefix=$(CMAKE_DIR) --build=$(HOST_BUILD) --host=$(HOST_ARCH)
+ @touch $@
+
+$(CMAKE_BUILD_DIR)/.generate_target_cmake:
+ @mkdir -p $(HOSTTOOLS)/usr
+ @mkdir -p $(HOSTTOOLS)/usr/etc
+ @echo "# embtoolkit-$(EMBTK_VERSION): automatically generated, do not edit" > $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_SYSTEM_NAME Linux)" >> $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_C_COMPILER $(TARGETCC_CACHED))" >> $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_CXX_COMPILER $(TARGETCXX_CACHED))" >> $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_FIND_ROOT_PATH $(SYSROOT) $(SYSROOT)/usr)" >> $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $(CMAKE_TOOLCHAIN_FILE)
+ @echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $(CMAKE_TOOLCHAIN_FILE)
+ @touch $@
+
diff --git a/mk/toolchain.mk b/mk/toolchain.mk
index a7c43f3..b6843fa 100644
--- a/mk/toolchain.mk
+++ b/mk/toolchain.mk
@@ -1,6 +1,6 @@
################################################################################
-# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
-# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved.
+# Abdoulaye Walsimou GAYE, <awg@embtoolkit.org>
+# Copyright(C) 2009-2010 GAYE Abdoulaye Walsimou. All rights reserved.
#
# 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
@@ -19,7 +19,7 @@
#
# \file toolchain.mk
# \brief toolchain.mk of Embtoolkit
-# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \author Abdoulaye Walsimou GAYE, <awg@embtoolkit.org>
# \date May 2009
################################################################################
@@ -77,20 +77,24 @@ include $(EMBTK_ROOT)/mk/libtool.mk
include $(EMBTK_ROOT)/mk/autoconf.mk
include $(EMBTK_ROOT)/mk/automake.mk
include $(EMBTK_ROOT)/mk/m4.mk
+AUTOTOOLS_INSTALL := m4_install libtool_install autoconf_install \
+ automake_install
+#cmake
+include $(EMBTK_ROOT)/mk/cmake.mk
ifeq ($(CONFIG_EMBTK_CLIB_EGLIBC),y)
#EGLIBC
include $(EMBTK_ROOT)/mk/eglibc.mk
-TOOLCHAINBUILD := mkinitialpath m4_install libtool_install autoconf_install \
- automake_install kernel-headers_install ccachehost_install \
+TOOLCHAINBUILD := mkinitialpath $(AUTOTOOLS_INSTALL) cmake_install \
+ kernel-headers_install ccachehost_install \
gmphost_install mpfrhost_install mpchost_install \
binutils_install gcc1_install eglibc-headers_install \
gcc2_install eglibc_install gcc3_install
else
#uClibc
include $(EMBTK_ROOT)/mk/uclibc.mk
-TOOLCHAINBUILD := mkinitialpath m4_install libtool_install autoconf_install \
- automake_install kernel-headers_install ccachehost_install \
+TOOLCHAINBUILD := mkinitialpath $(AUTOTOOLS_INSTALL) cmake_install \
+ kernel-headers_install ccachehost_install \
gmphost_install mpfrhost_install mpchost_install \
binutils_install gcc1_install uclibc_install gcc3_install
endif