diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-01-23 07:37:14 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-01-23 07:37:14 -0600 |
commit | ec7c99825707d953257f7aae940924dc6c713d73 (patch) | |
tree | 58f161d1613d82e37bec555f8e214594a3674bea /nuttx/tools | |
parent | d44fb47fd7d0c3828eb6d443c9f2f17ccbd6274a (diff) | |
download | nuttx-ec7c99825707d953257f7aae940924dc6c713d73.tar.gz nuttx-ec7c99825707d953257f7aae940924dc6c713d73.tar.bz2 nuttx-ec7c99825707d953257f7aae940924dc6c713d73.zip |
Config.mk: If WINTOOL is set, COMPILE definition should convert path generated by Cygwin make to a proper Windows path. From Richard Cochran (2014-1-23).
Diffstat (limited to 'nuttx/tools')
-rw-r--r-- | nuttx/tools/Config.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/tools/Config.mk b/nuttx/tools/Config.mk index 1cb5296b5..45c785281 100644 --- a/nuttx/tools/Config.mk +++ b/nuttx/tools/Config.mk @@ -2,7 +2,7 @@ # Config.mk # Global build rules and macros. # -# Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved. # Author: Richard Cochran # Gregory Nutt <gnutt@nuttx.org> # @@ -111,11 +111,21 @@ endef # # CC - The command to invoke the C compiler # CFLAGS - Options to pass to the C compiler +# WINTOOL - Set to "y" if this is a Windows cygwin build using a +# Windows native toolchain. In that case, paths created by the +# Cygwin makeifle must be converted to Windows paths for the tool. +ifeq ($(WINTOOL),y) +define COMPILE + @echo "CC: $1" + $(Q) $(CC) -c $(CFLAGS) "${shell cygpath -w $1}" -o $2 +endef +else define COMPILE @echo "CC: $1" $(Q) $(CC) -c $(CFLAGS) $1 -o $2 endef +endif # COMPILEXX - Default macro to compile one C++ file # Example: $(call COMPILEXX, in-file, out-file) |