build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig

so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-19 00:08:15 +08:00 committed by patacongo
parent 0a6f978771
commit d232823e63
17 changed files with 22 additions and 27 deletions

View File

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

View File

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

View File

@ -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), $^)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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