build: Add MinGW dependencies in makefile

Jira: ZEP-177
Change-Id: I5c67b9ed6c279b2b59afd4cd0351df5f0d030533
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
This commit is contained in:
Juan Manuel Cruz 2016-04-27 10:15:14 -05:00 committed by Anas Nashif
parent 98f372ac16
commit 5516bcaa72
4 changed files with 19 additions and 4 deletions

View file

@ -28,6 +28,9 @@ ifeq (MINGW, $(findstring MINGW, $(UNAME)))
HOST_OS=MINGW
PWD_OPT=-W
DISABLE_TRYRUN=y
CPATH ?= $(MIGW_DIR)/include
LIBRARY_PATH ?= $(MINGW_DIR)/lib
export CPATH LIBRARY_PATH
else ifeq (Linux, $(findstring Linux, $(UNAME)))
HOST_OS=Linux
else ifeq (Darwin, $(findstring Darwin, $(UNAME)))

View file

@ -6,7 +6,13 @@ DQUOTE = "
ARCH ?= x86
UNAME := $(shell uname)
ifeq (MINGW, $(findstring MINGW, $(UNAME)))
PROJECT_BASE ?= $(shell sh -c "pwd -W")
else
PROJECT_BASE ?= $(CURDIR)
endif
O ?= $(PROJECT_BASE)/outdir
# Turn O into an absolute path; we call the main Kbuild with $(MAKE) -C

View file

@ -63,11 +63,13 @@ The easiest way to do this is just copy the file :file:`fstab.sample` as
$ cp /etc/fstab.sample /etc/fstab
$ cat /etc/fstab
Configure Python's folder location in the environmental variable :envvar:`PATH`.
Configure Python's folder location in the environmental variable :envvar:`PATH`
and the installation path for MinGW.
.. code-block:: console
export PATH=$PATH:${PYTHON_PATH}
export MINGW_DIR=C:/MinGW
.. note:: The format of the path for this variable (PYTHON_PATH) must to be in
the linux format. For example, :file:`C:\python27` would be written as
@ -79,14 +81,12 @@ GNU Regex C library
The Zephyr build process has a dependency with the GNU regex library.
Msys provides its own GNU library implementation that can be downloaded from the
MinGW and Msys official repository:`MinGW Repository`_.
Install the library from the Msys console interface and add the library to the
tools build proccess with the following commands:
Install the library from the Msys console interface with the following commands:
.. code-block:: console
mingw-get update
mingw-get install msys-libregex-dev --all-related
export HOST_LOADLIBES=-lregex
Toolchain Installation
======================

View file

@ -11,6 +11,12 @@ else
Kconfig := Kconfig
endif
UNAME := $(shell uname)
ifeq (MINGW, $(findstring MINGW, $(UNAME)))
HOST_LOADLIBES ?= -lregex
export HOST_LOADLIBES
endif
# We need this, in case the user has it in its environment
unexport CONFIG_