You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/05/18 21:37:33 UTC

[incubator-nuttx-apps] 01/02: build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit d232823e63943440b6d5593e0f196f8f8d9443e4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue May 19 00:08:15 2020 +0800

    build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
    
    so the correct value can be determinated by Kconfig system automatically
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 Application.mk                           | 4 ++--
 Make.defs                                | 6 +++---
 Makefile                                 | 2 +-
 examples/audio_rttl/Makefile             | 7 +------
 examples/elf/tests/errno/Makefile        | 2 +-
 examples/elf/tests/hello/Makefile        | 2 +-
 examples/elf/tests/helloxx/Makefile      | 2 +-
 examples/elf/tests/longjmp/Makefile      | 2 +-
 examples/elf/tests/mutex/Makefile        | 2 +-
 examples/elf/tests/pthread/Makefile      | 2 +-
 examples/elf/tests/signal/Makefile       | 2 +-
 examples/elf/tests/struct/Makefile       | 2 +-
 examples/elf/tests/task/Makefile         | 2 +-
 examples/module/drivers/chardev/Makefile | 2 +-
 examples/sotest/lib/modprint/Makefile    | 2 +-
 examples/sotest/lib/sotest/Makefile      | 2 +-
 import/Make.defs                         | 6 +++---
 17 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/Application.mk b/Application.mk
index e629db4..e56f316 100644
--- a/Application.mk
+++ b/Application.mk
@@ -128,7 +128,7 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
 		$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
 
 .built: $(OBJS)
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 	$(call ARLOCK, "${shell cygpath -w $(BIN)}", $(OBJS))
 else
 	$(call ARLOCK, $(BIN), $(OBJS))
@@ -153,7 +153,7 @@ PROGOBJ := $(MAINOBJ)
 
 $(PROGLIST): $(MAINOBJ)
 	$(Q) mkdir -p $(BINDIR)
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 	$(call ELFLD,$(firstword $(PROGOBJ)),"${shell cygpath -w $(firstword $(PROGLIST))}")
 else
 	$(call ELFLD,$(firstword $(PROGOBJ)),$(firstword $(PROGLIST)))
diff --git a/Make.defs b/Make.defs
index 13d1ad1..b5ba6a6 100644
--- a/Make.defs
+++ b/Make.defs
@@ -116,7 +116,7 @@ else ifeq ($(CONFIG_WINDOWS_MSYS),y)
   DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
 else
   DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   DIRLINK   = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
 else
   DIRLINK   = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
@@ -146,7 +146,7 @@ else
   MKKCONFIG = $(APPDIR)$(DELIM)tools$(DELIM)mkkconfig.sh
 endif
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   INCDIROPT = -w
 endif
 
@@ -155,7 +155,7 @@ endif
 CFLAGS   += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   LDLIBS ?= "${shell cygpath -w $(BIN)}"
 else
   LDLIBS ?= $(BIN)
diff --git a/Makefile b/Makefile
index 5b949ab..4cd47d5 100644
--- a/Makefile
+++ b/Makefile
@@ -101,7 +101,7 @@ $(SYMTABOBJ): %$(OBJEXT): %.c
 	$(call COMPILE, -fno-lto $<, $@)
 
 $(BIN): $(SYMTABOBJ)
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 	$(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
 else
 	$(call ARLOCK, $(BIN), $^)
diff --git a/examples/audio_rttl/Makefile b/examples/audio_rttl/Makefile
index 2192290..e5f0de5 100644
--- a/examples/audio_rttl/Makefile
+++ b/examples/audio_rttl/Makefile
@@ -54,12 +54,7 @@ AUDIODIR = $(SDKDIR)$(DELIM)modules$(DELIM)audio
 
 # Audio Example flags
 
-ifeq ($(WINTOOL),y)
-CXXFLAGS += -I "${shell cygpath -w $(AUDIODIR)}"
-else
-CXXFLAGS += -I $(AUDIODIR)
-endif
-
+CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(AUDIODIR)"}
 CXXFLAGS += -D_POSIX
 
 include $(APPDIR)/Application.mk
diff --git a/examples/elf/tests/errno/Makefile b/examples/elf/tests/errno/Makefile
index 8bb6ba3..0141ca7 100644
--- a/examples/elf/tests/errno/Makefile
+++ b/examples/elf/tests/errno/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/hello/Makefile b/examples/elf/tests/hello/Makefile
index 1766afd..7f71bd2 100644
--- a/examples/elf/tests/hello/Makefile
+++ b/examples/elf/tests/hello/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/helloxx/Makefile b/examples/elf/tests/helloxx/Makefile
index 4f29898..d94b5aa 100644
--- a/examples/elf/tests/helloxx/Makefile
+++ b/examples/elf/tests/helloxx/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/longjmp/Makefile b/examples/elf/tests/longjmp/Makefile
index 7521ab8..1c6834c 100644
--- a/examples/elf/tests/longjmp/Makefile
+++ b/examples/elf/tests/longjmp/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/mutex/Makefile b/examples/elf/tests/mutex/Makefile
index ce4114b..9538259 100644
--- a/examples/elf/tests/mutex/Makefile
+++ b/examples/elf/tests/mutex/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/pthread/Makefile b/examples/elf/tests/pthread/Makefile
index f741250..c161a16 100644
--- a/examples/elf/tests/pthread/Makefile
+++ b/examples/elf/tests/pthread/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/signal/Makefile b/examples/elf/tests/signal/Makefile
index d9acd2c..7024151 100644
--- a/examples/elf/tests/signal/Makefile
+++ b/examples/elf/tests/signal/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/struct/Makefile b/examples/elf/tests/struct/Makefile
index 4245d0c..7e1bd5e 100644
--- a/examples/elf/tests/struct/Makefile
+++ b/examples/elf/tests/struct/Makefile
@@ -40,7 +40,7 @@ DELIM ?= /
 
 CELFFLAGS += -I.
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/elf/tests/task/Makefile b/examples/elf/tests/task/Makefile
index f95898c..c80f7da 100644
--- a/examples/elf/tests/task/Makefile
+++ b/examples/elf/tests/task/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/module/drivers/chardev/Makefile b/examples/module/drivers/chardev/Makefile
index f1f9c70..6e111ea 100644
--- a/examples/module/drivers/chardev/Makefile
+++ b/examples/module/drivers/chardev/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/sotest/lib/modprint/Makefile b/examples/sotest/lib/modprint/Makefile
index f198729..016fefa 100644
--- a/examples/sotest/lib/modprint/Makefile
+++ b/examples/sotest/lib/modprint/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/examples/sotest/lib/sotest/Makefile b/examples/sotest/lib/sotest/Makefile
index 5b36ab1..8ee951b 100644
--- a/examples/sotest/lib/sotest/Makefile
+++ b/examples/sotest/lib/sotest/Makefile
@@ -38,7 +38,7 @@
 OBJEXT ?= .o
 DELIM ?= /
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
 NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
 else
 NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
diff --git a/import/Make.defs b/import/Make.defs
index a484a31..454444c 100644
--- a/import/Make.defs
+++ b/import/Make.defs
@@ -148,7 +148,7 @@ endif
 # Tool related definitions
 # Compiler
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   # Windows-native toolchains
   ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}"
   ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}"
@@ -181,7 +181,7 @@ AFLAGS = $(CFLAGS) -D__ASSEMBLY__
 
 # Linker
 
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   # Windows-native toolchains
   LDLIBPATH = -L "${shell cygpath -w $(APPDIR)}" -L "${shell cygpath -w $(TOPDIR)$(DELIM)libs}"
 else
@@ -203,7 +203,7 @@ endif
 # ELF module definitions
 
 LDELFFLAGS = -r -e _start -Bstatic
-ifeq ($(WINTOOL),y)
+ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/scripts/gnu-elf.ld}"
 else
   LDELFFLAGS += -T $(TOPDIR)/scripts/gnu-elf.ld