diff --git a/Application.mk b/Application.mk index e629db462..e56f316a3 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 13d1ad1e7..b5ba6a649 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 5b949abc0..4cd47d522 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 219229064..e5f0de5dd 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 8bb6ba351..0141ca73c 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 1766afdf4..7f71bd2b4 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 4f2989897..d94b5aa70 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 7521ab850..1c6834c8c 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 ce4114bd2..953825962 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 f7412508c..c161a161d 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 d9acd2c8a..702415180 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 4245d0c42..7e1bd5e64 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 f95898ce7..c80f7da9b 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 f1f9c705b..6e111ea23 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 f1987297b..016fefa77 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 5b36ab16b..8ee951b5e 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 a484a315c..454444c5f 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