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).

This commit is contained in:
Gregory Nutt 2014-01-23 07:37:14 -06:00
parent 5bbe3a4992
commit 85dea13030
2 changed files with 15 additions and 4 deletions

View File

@ -6494,6 +6494,7 @@
detect. (2014-1-21).
* configs/16z: Add basic support for the 16z board. The 16z board is
based on the ZiLOG ZNEOZ16F2811AL20EG part. See
https://github.com/toyaga/16z (2014-1-22)
for further information.
https://github.com/toyaga/16z for further information (2014-1-22),
* tools/Config.mk: 'cypath' must be called if we are using a Windows
native toolchain with the Cygwin 'make' to convert paths to proper
Windows paths. From Richard Cochran (2014-1-23).

View File

@ -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)