summaryrefslogtreecommitdiff
path: root/core/mk/targetsys.mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-18 23:45:27 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-18 23:45:27 +0100
commitef94bcb8905c8c8fefc272dbcb2d5ee0c4efbe35 (patch)
treee8e85268168e09221e23cdbb4639e47109988d04 /core/mk/targetsys.mk
parentfb516edcaeaa02e435316622b2bcc5314b42d529 (diff)
downloadembtoolkit-ef94bcb8905c8c8fefc272dbcb2d5ee0c4efbe35.tar.gz
embtoolkit-ef94bcb8905c8c8fefc272dbcb2d5ee0c4efbe35.tar.bz2
embtoolkit-ef94bcb8905c8c8fefc272dbcb2d5ee0c4efbe35.tar.xz
Move mk/ to core/
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'core/mk/targetsys.mk')
-rw-r--r--core/mk/targetsys.mk56
1 files changed, 56 insertions, 0 deletions
diff --git a/core/mk/targetsys.mk b/core/mk/targetsys.mk
new file mode 100644
index 0000000..093fb7b
--- /dev/null
+++ b/core/mk/targetsys.mk
@@ -0,0 +1,56 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2012 Abdoulaye Walsimou GAYE <awg@embtoolkit.org>.
+#
+# This program is free software; you can distribute it and/or modify it
+# under the terms of the GNU General Public License
+# (Version 2 or later) published by the Free Software Foundation.
+#
+# 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 targetsys.mk
+# \brief This file defines system environment of the target
+# \brief (os, clib, etc.).
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2012
+################################################################################
+
+embtk_os-$(CONFIG_EMBTK_OS_LINUX) := linux
+embtk_os := $(or $(embtk_os-y),invalid-os)
+
+embtk_clib-$(CONFIG_EMBTK_CLIB_EGLIBC) := eglibc
+embtk_clib-$(CONFIG_EMBTK_CLIB_GLIBC) := glibc
+embtk_clib-$(CONFIG_EMBTK_CLIB_MUSL) := musl
+embtk_clib-$(CONFIG_EMBTK_CLIB_UCLIBC) := uclibc
+embtk_clib := $(or $(embtk_clib-y),invalid-clib)
+embtk_clib_version := $(call embtk_get_pkgversion,$(embtk_clib))
+
+#
+# Host development machine info
+#
+ifeq ($(findstring linux,$(HOST_ARCH)),linux)
+embtk_buildhost_os := linux
+embtk_buildhost_os_type := linux
+else ifeq ($(findstring freebsd,$(HOST_ARCH)),freebsd)
+embtk_buildhost_os := freebsd
+embtk_buildhost_os_type := bsd
+else ifeq ($(findstring netbsd,$(HOST_ARCH)),netbsd)
+embtk_buildhost_os := netbsd
+embtk_buildhost_os_type := bsd
+else ifeq ($(findstring openbsd,$(HOST_ARCH)),openbsd)
+embtk_buildhost_os := openbsd
+embtk_buildhost_os_type := bsd
+else ifeq ($(findstring apple,$(HOST_ARCH)),apple)
+embtk_buildhost_os := macos
+embtk_buildhost_os_type := bsd
+else
+embtk_buildhost_os := unknown-host-os
+endif