diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-01-05 21:53:21 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-01-05 21:53:21 +0100 |
commit | d4b0e1cf20048913aa7c3c418320cb713505b91d (patch) | |
tree | ff729c3fafe4bdd25f18e215cccce3a5b6a7c4d7 /mk/buildsystem.mk | |
parent | 2052408a38dc93ca4c0b6c3b88b0bb3f9a48fecd (diff) | |
download | embtoolkit-d4b0e1cf20048913aa7c3c418320cb713505b91d.tar.gz embtoolkit-d4b0e1cf20048913aa7c3c418320cb713505b91d.tar.bz2 embtoolkit-d4b0e1cf20048913aa7c3c418320cb713505b91d.tar.xz |
Build system: move initialpath.mk => buildsystem.mk
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/buildsystem.mk')
-rw-r--r-- | mk/buildsystem.mk | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/mk/buildsystem.mk b/mk/buildsystem.mk new file mode 100644 index 0000000..9951ffd --- /dev/null +++ b/mk/buildsystem.mk @@ -0,0 +1,63 @@ +################################################################################ +# Embtoolkit +# Copyright(C) 2009-2011 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 initialpath.mk +# \brief initialpath of Embtoolkit. Here we define SYSROOT, TOOLS, +# \brief TOOLS_BUILD PACKAGES_BUILD and ROOTFS. +# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org> +# \date May 2009 +################################################################################ + +SYSROOT := $(EMBTK_ROOT)/sysroot-$(GNU_TARGET)-$(EMBTK_MCU_FLAG) +TOOLS := $(EMBTK_ROOT)/tools-$(GNU_TARGET)-$(EMBTK_MCU_FLAG) +TOOLS_BUILD := $(EMBTK_ROOT)/build/tools_build-$(GNU_TARGET)-$(EMBTK_MCU_FLAG) +PACKAGES_BUILD := $(EMBTK_ROOT)/build/packages_build-$(GNU_TARGET)-$(EMBTK_MCU_FLAG) +EMBTK_GENERATED := $(EMBTK_ROOT)/generated +ROOTFS := $(EMBTK_GENERATED)/rootfs-$(GNU_TARGET)-$(EMBTK_MCU_FLAG) +HOSTTOOLS := $(EMBTK_ROOT)/host-tools-$(EMBTK_MCU_FLAG) +DOWNLOAD_DIR := $(patsubst %/,%,$(subst ",,$(strip $(CONFIG_EMBTK_DOWNLOAD_DIR)))) + +mkinitialpath: + $(Q)mkdir -p $(SYSROOT) + $(Q)mkdir -p $(SYSROOT)/lib + $(Q)mkdir -p $(SYSROOT)/usr + $(Q)mkdir -p $(SYSROOT)/usr/etc + $(Q)mkdir -p $(SYSROOT)/root + $(Q)mkdir -p $(SYSROOT)/usr/lib + $(Q)$(if $(CONFIG_EMBTK_32BITS_FS),,cd $(SYSROOT); \ + ln -sf lib lib64; cd $(SYSROOT)/usr;ln -sf lib lib64) + $(Q)$(if $(CONFIG_EMBTK_64BITS_FS_COMPAT32), \ + cd $(SYSROOT); ln -sf lib lib64; mkdir -p lib32; \ + cd $(SYSROOT)/usr; ln -sf lib lib64; mkdir -p lib32) + $(Q)mkdir -p $(TOOLS) + $(Q)mkdir -p $(TOOLS_BUILD) + $(Q)mkdir -p $(HOSTTOOLS) + $(Q)mkdir -p $(HOSTTOOLS)/usr + $(Q)mkdir -p $(HOSTTOOLS)/usr/include + $(Q)mkdir -p $(HOSTTOOLS)/usr/local + $(Q)$(if $(CONFIG_EMBTK_HAVE_ROOTFS), \ + mkdir -p $(ROOTFS); \ + cp -Rp $(EMBTK_ROOT)/src/target_skeleton/* $(ROOTFS)/; \ + mkdir -p $(PACKAGES_BUILD)) + +rmallpath: + $(Q)rm -rf $(PACKAGES_BUILD) $(ROOTFS) $(TOOLS) $(TOOLS_BUILD) + $(Q)rm -rf $(SYSROOT) $(EMBTK_GENERATED) $(HOSTTOOLS) + $(Q)rm -rf $(DOWNLOAD_DIR)/eglibc-*.tar.bz2 + $(Q)$(if $(CONFIG_EMBTK_CACHE_PATCHES),,rm -rf $(DOWNLOAD_DIR)/*.patch) |