From 5c0e8e88b1e52548502014f590d9506d44d6cc47 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 26 Mar 2020 08:51:07 -0600 Subject: [PATCH] Revert "Makefile: move INCDIROPT to common place (#625)" This reverts commit b9ace36fcc7ccb55d1541231be07689d557628f4. This change was added by PR 625 but has a serious logic flaw. It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk: else ifeq ($(WINTOOL),y) DEFINE = "$(TOPDIR)/tools/define.sh" INCDIR = "$(TOPDIR)/tools/incdir.sh" -w This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined. As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain. --- audio/Makefile | 4 ++++ binfmt/Makefile | 5 ++++- boards/arm/cxd56xx/common/src/Make.defs | 2 +- boards/arm/cxd56xx/drivers/audio/Make.defs | 2 +- boards/arm/cxd56xx/drivers/camera/Make.defs | 2 +- boards/arm/cxd56xx/drivers/sensors/Make.defs | 2 +- boards/arm/cxd56xx/spresense/src/Make.defs | 2 +- drivers/1wire/Make.defs | 2 +- drivers/Makefile | 4 ++++ drivers/analog/Make.defs | 8 ++++---- drivers/bch/Make.defs | 2 +- drivers/can/Make.defs | 2 +- drivers/contactless/Make.defs | 2 +- drivers/crypto/Make.defs | 2 +- drivers/i2c/Make.defs | 2 +- drivers/input/Make.defs | 2 +- drivers/ioexpander/Make.defs | 4 ++-- drivers/lcd/Make.defs | 6 +++--- drivers/loop/Make.defs | 2 +- drivers/mmcsd/Make.defs | 2 +- drivers/modem/Make.defs | 2 +- drivers/modem/altair/Make.defs | 2 +- drivers/power/Make.defs | 14 +++++++------- drivers/rptun/Make.defs | 2 +- drivers/sensors/Make.defs | 2 +- drivers/spi/Make.defs | 2 +- drivers/usbdev/Make.defs | 2 +- drivers/usbhost/Make.defs | 2 +- drivers/usbmisc/Make.defs | 2 +- drivers/usbmonitor/Make.defs | 2 +- drivers/video/Make.defs | 2 +- drivers/wireless/Make.defs | 2 +- drivers/wireless/bluetooth/Make.defs | 2 +- drivers/wireless/ieee80211/bcm43xxx/Make.defs | 2 +- drivers/wireless/ieee802154/Make.defs | 2 +- drivers/wireless/ieee802154/at86rf23x/Make.defs | 2 +- drivers/wireless/ieee802154/mrf24j40/Make.defs | 2 +- drivers/wireless/ieee802154/xbee/Make.defs | 2 +- drivers/wireless/lpwan/sx127x/Make.defs | 2 +- drivers/wireless/spirit/drivers/Make.defs | 2 +- drivers/wireless/spirit/include/Make.defs | 2 +- fs/spiffs/Make.defs | 2 +- graphics/Makefile | 4 ++++ graphics/nxbe/Make.defs | 2 +- graphics/nxglib/Make.defs | 2 +- graphics/nxmu/Make.defs | 2 +- graphics/nxterm/Make.defs | 2 +- graphics/vnc/client/Make.defs | 2 +- graphics/vnc/server/Make.defs | 2 +- libs/libc/zoneinfo/Makefile | 4 ++++ mm/iob/Make.defs | 2 +- pass1/Makefile | 4 ++++ tools/Config.mk | 3 --- wireless/Makefile | 4 ++++ wireless/bluetooth/Make.defs | 2 +- wireless/ieee802154/Make.defs | 2 +- wireless/pktradio/Make.defs | 2 +- 57 files changed, 89 insertions(+), 65 deletions(-) diff --git a/audio/Makefile b/audio/Makefile index 426caae3c1..fef3f261c8 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -36,6 +36,10 @@ -include $(TOPDIR)/Make.defs DELIM ?= $(strip /) +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + DEPPATH = --dep-path . ASRCS = CSRCS = audio.c diff --git a/binfmt/Makefile b/binfmt/Makefile index 04fdc94bc2..88babfbd67 100644 --- a/binfmt/Makefile +++ b/binfmt/Makefile @@ -37,7 +37,10 @@ -include $(TOPDIR)/Make.defs DELIM ?= $(strip /) -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(TOPDIR)$(DELIM)sched"} +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(TOPDIR)$(DELIM)sched"} # Basic BINFMT source files diff --git a/boards/arm/cxd56xx/common/src/Make.defs b/boards/arm/cxd56xx/common/src/Make.defs index f86d074477..ba10e2182e 100644 --- a/boards/arm/cxd56xx/common/src/Make.defs +++ b/boards/arm/cxd56xx/common/src/Make.defs @@ -157,4 +157,4 @@ endif DEPPATH += --dep-path src VPATH += :src -CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src) +CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src) diff --git a/boards/arm/cxd56xx/drivers/audio/Make.defs b/boards/arm/cxd56xx/drivers/audio/Make.defs index 39f15d20e3..49be780955 100644 --- a/boards/arm/cxd56xx/drivers/audio/Make.defs +++ b/boards/arm/cxd56xx/drivers/audio/Make.defs @@ -53,4 +53,4 @@ endif DEPPATH += --dep-path platform$(DELIM)audio VPATH += :platform$(DELIM)audio -CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)platform$(DELIM)audio) +CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)platform$(DELIM)audio) diff --git a/boards/arm/cxd56xx/drivers/camera/Make.defs b/boards/arm/cxd56xx/drivers/camera/Make.defs index 3159051ca0..8281784328 100644 --- a/boards/arm/cxd56xx/drivers/camera/Make.defs +++ b/boards/arm/cxd56xx/drivers/camera/Make.defs @@ -24,4 +24,4 @@ endif DEPPATH += --dep-path platform$(DELIM)camera VPATH += :platform$(DELIM)camera -CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)platform$(DELIM)camera) +CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)platform$(DELIM)camera) diff --git a/boards/arm/cxd56xx/drivers/sensors/Make.defs b/boards/arm/cxd56xx/drivers/sensors/Make.defs index afd77ce23f..7f6706de56 100644 --- a/boards/arm/cxd56xx/drivers/sensors/Make.defs +++ b/boards/arm/cxd56xx/drivers/sensors/Make.defs @@ -79,4 +79,4 @@ endif DEPPATH += --dep-path platform$(DELIM)sensors VPATH += :platform$(DELIM)sensors -CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)platform$(DELIM)sensors) +CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)platform$(DELIM)sensors) diff --git a/boards/arm/cxd56xx/spresense/src/Make.defs b/boards/arm/cxd56xx/spresense/src/Make.defs index be47e8d03e..598deed337 100644 --- a/boards/arm/cxd56xx/spresense/src/Make.defs +++ b/boards/arm/cxd56xx/spresense/src/Make.defs @@ -91,4 +91,4 @@ endif DEPPATH += --dep-path board VPATH += :board -CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board) +CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board) diff --git a/drivers/1wire/Make.defs b/drivers/1wire/Make.defs index 37343141ae..a730cbaff8 100644 --- a/drivers/1wire/Make.defs +++ b/drivers/1wire/Make.defs @@ -45,5 +45,5 @@ endif DEPPATH += --dep-path 1wire VPATH += :1wire -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)1wire} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)1wire} endif diff --git a/drivers/Makefile b/drivers/Makefile index 0ea29880ef..3e355c57c2 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -36,6 +36,10 @@ -include $(TOPDIR)/Make.defs DELIM ?= $(strip /) +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + DEPPATH = --dep-path . ASRCS = CSRCS = diff --git a/drivers/analog/Make.defs b/drivers/analog/Make.defs index a47f1c46ae..c2494df3d1 100644 --- a/drivers/analog/Make.defs +++ b/drivers/analog/Make.defs @@ -121,22 +121,22 @@ endif ifeq ($(CONFIG_DAC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} else ifeq ($(CONFIG_ADC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} else ifeq ($(CONFIG_COMP),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} else ifeq ($(CONFIG_OPAMP),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} endif endif endif diff --git a/drivers/bch/Make.defs b/drivers/bch/Make.defs index 72a52de75f..e10e41ec47 100644 --- a/drivers/bch/Make.defs +++ b/drivers/bch/Make.defs @@ -45,6 +45,6 @@ CSRCS += bchdev_driver.c DEPPATH += --dep-path bch VPATH += :bch -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)bch} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)bch} endif diff --git a/drivers/can/Make.defs b/drivers/can/Make.defs index b341bf20dd..158fba8508 100644 --- a/drivers/can/Make.defs +++ b/drivers/can/Make.defs @@ -47,5 +47,5 @@ endif DEPPATH += --dep-path can VPATH += :can -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)can} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)can} endif diff --git a/drivers/contactless/Make.defs b/drivers/contactless/Make.defs index d918b1539e..0df7134d88 100644 --- a/drivers/contactless/Make.defs +++ b/drivers/contactless/Make.defs @@ -49,5 +49,5 @@ endif DEPPATH += --dep-path contactless VPATH += :contactless -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)contactless} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)contactless} endif diff --git a/drivers/crypto/Make.defs b/drivers/crypto/Make.defs index 89862c8fcd..135f27183b 100644 --- a/drivers/crypto/Make.defs +++ b/drivers/crypto/Make.defs @@ -43,4 +43,4 @@ endif DEPPATH += --dep-path crypto VPATH += :crypto -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)crypto} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)crypto} diff --git a/drivers/i2c/Make.defs b/drivers/i2c/Make.defs index 5aeefc8bb5..5bdf115c61 100644 --- a/drivers/i2c/Make.defs +++ b/drivers/i2c/Make.defs @@ -54,6 +54,6 @@ endif DEPPATH += --dep-path i2c VPATH += :i2c -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)i2c} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)i2c} endif # CONFIG_I2C diff --git a/drivers/input/Make.defs b/drivers/input/Make.defs index f35830fad7..1f92089856 100644 --- a/drivers/input/Make.defs +++ b/drivers/input/Make.defs @@ -103,5 +103,5 @@ endif DEPPATH += --dep-path input VPATH += :input -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)input} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)input} endif diff --git a/drivers/ioexpander/Make.defs b/drivers/ioexpander/Make.defs index 080fea70c5..3d2b1f02cb 100644 --- a/drivers/ioexpander/Make.defs +++ b/drivers/ioexpander/Make.defs @@ -75,7 +75,7 @@ ifeq ($(CONFIG_IOEXPANDER),y) DEPPATH += --dep-path ioexpander VPATH += :ioexpander -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} else ifeq ($(CONFIG_DEV_GPIO),y) @@ -83,6 +83,6 @@ else ifeq ($(CONFIG_DEV_GPIO),y) DEPPATH += --dep-path ioexpander VPATH += :ioexpander -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} endif diff --git a/drivers/lcd/Make.defs b/drivers/lcd/Make.defs index ae4e59d924..f5a4c166d6 100644 --- a/drivers/lcd/Make.defs +++ b/drivers/lcd/Make.defs @@ -157,13 +157,13 @@ endif ifeq ($(CONFIG_LCD),y) DEPPATH += --dep-path lcd VPATH += :lcd - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} else ifeq ($(CONFIG_SLCD),y) DEPPATH += --dep-path lcd VPATH += :lcd - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} else ifeq ($(CONFIG_LCD_OTHER),y) DEPPATH += --dep-path lcd VPATH += :lcd - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} endif diff --git a/drivers/loop/Make.defs b/drivers/loop/Make.defs index d4725cf868..a7c933667c 100644 --- a/drivers/loop/Make.defs +++ b/drivers/loop/Make.defs @@ -49,6 +49,6 @@ CSRCS += losetup.c DEPPATH += --dep-path loop VPATH += :loop -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)loop} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)loop} endif diff --git a/drivers/mmcsd/Make.defs b/drivers/mmcsd/Make.defs index 67b5f586ae..c5a67b1144 100644 --- a/drivers/mmcsd/Make.defs +++ b/drivers/mmcsd/Make.defs @@ -49,6 +49,6 @@ endif DEPPATH += --dep-path mmcsd VPATH += :mmcsd -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)mmcsd} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)mmcsd} endif diff --git a/drivers/modem/Make.defs b/drivers/modem/Make.defs index ad2215ef29..3b406f63a7 100644 --- a/drivers/modem/Make.defs +++ b/drivers/modem/Make.defs @@ -45,6 +45,6 @@ include modem$(DELIM)altair$(DELIM)Make.defs DEPPATH += --dep-path modem VPATH += :modem -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)modem} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)modem} endif diff --git a/drivers/modem/altair/Make.defs b/drivers/modem/altair/Make.defs index a6cdbde73f..d24feb638d 100644 --- a/drivers/modem/altair/Make.defs +++ b/drivers/modem/altair/Make.defs @@ -45,6 +45,6 @@ endif DEPPATH += --dep-path modem$(DELIM)altair VPATH += :modem$(DELIM)altair -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)modem} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)modem} endif diff --git a/drivers/power/Make.defs b/drivers/power/Make.defs index 74ebe5d438..928088445d 100644 --- a/drivers/power/Make.defs +++ b/drivers/power/Make.defs @@ -62,7 +62,7 @@ endif POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif @@ -74,7 +74,7 @@ CSRCS += smps.c POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif @@ -86,7 +86,7 @@ CSRCS += powerled.c POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif @@ -98,7 +98,7 @@ CSRCS += motor.c POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif @@ -136,7 +136,7 @@ endif POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif @@ -162,7 +162,7 @@ endif POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif @@ -188,7 +188,7 @@ endif POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power} endif diff --git a/drivers/rptun/Make.defs b/drivers/rptun/Make.defs index 5a00c48b73..17c4953ed3 100644 --- a/drivers/rptun/Make.defs +++ b/drivers/rptun/Make.defs @@ -41,5 +41,5 @@ CSRCS += rptun.c DEPPATH += --dep-path rptun VPATH += :rptun -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)rptun} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)rptun} endif diff --git a/drivers/sensors/Make.defs b/drivers/sensors/Make.defs index 292a906c8e..ae479341b3 100644 --- a/drivers/sensors/Make.defs +++ b/drivers/sensors/Make.defs @@ -295,6 +295,6 @@ endif DEPPATH += --dep-path sensors VPATH += :sensors -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)sensors} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)sensors} endif # CONFIG_SENSORS diff --git a/drivers/spi/Make.defs b/drivers/spi/Make.defs index 5ea290df10..e489bd600e 100644 --- a/drivers/spi/Make.defs +++ b/drivers/spi/Make.defs @@ -54,5 +54,5 @@ endif DEPPATH += --dep-path spi VPATH += :spi -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)spi} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)spi} endif diff --git a/drivers/usbdev/Make.defs b/drivers/usbdev/Make.defs index dd2fb5af23..c38de6a832 100644 --- a/drivers/usbdev/Make.defs +++ b/drivers/usbdev/Make.defs @@ -75,5 +75,5 @@ CSRCS += usbdev_trace.c usbdev_trprintf.c DEPPATH += --dep-path usbdev VPATH += :usbdev -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbdev} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbdev} endif diff --git a/drivers/usbhost/Make.defs b/drivers/usbhost/Make.defs index cf058a1696..cfad07317f 100644 --- a/drivers/usbhost/Make.defs +++ b/drivers/usbhost/Make.defs @@ -89,4 +89,4 @@ endif DEPPATH += --dep-path usbhost VPATH += :usbhost -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbhost} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbhost} diff --git a/drivers/usbmisc/Make.defs b/drivers/usbmisc/Make.defs index 9ac7506029..a3d6a57b53 100644 --- a/drivers/usbmisc/Make.defs +++ b/drivers/usbmisc/Make.defs @@ -49,5 +49,5 @@ endif DEPPATH += --dep-path usbmisc VPATH += :usbmisc -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbmisc} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbmisc} endif diff --git a/drivers/usbmonitor/Make.defs b/drivers/usbmonitor/Make.defs index 811db06461..c6664b02bc 100644 --- a/drivers/usbmonitor/Make.defs +++ b/drivers/usbmonitor/Make.defs @@ -45,6 +45,6 @@ CSRCS += usbmonitor.c DEPPATH += --dep-path usbmonitor VPATH += :usbmonitor -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbmonitor} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbmonitor} endif diff --git a/drivers/video/Make.defs b/drivers/video/Make.defs index 91203f28dd..82ac7ee049 100644 --- a/drivers/video/Make.defs +++ b/drivers/video/Make.defs @@ -69,6 +69,6 @@ endif DEPPATH += --dep-path video VPATH += :video -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)video} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)video} endif diff --git a/drivers/wireless/Make.defs b/drivers/wireless/Make.defs index 7b30e60fed..ecb19717ed 100644 --- a/drivers/wireless/Make.defs +++ b/drivers/wireless/Make.defs @@ -82,5 +82,5 @@ endif DEPPATH += --dep-path wireless VPATH += :wireless -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless} endif diff --git a/drivers/wireless/bluetooth/Make.defs b/drivers/wireless/bluetooth/Make.defs index 4eb538e9c8..728eaaef12 100644 --- a/drivers/wireless/bluetooth/Make.defs +++ b/drivers/wireless/bluetooth/Make.defs @@ -63,6 +63,6 @@ endif DEPPATH += --dep-path wireless$(DELIM)bluetooth VPATH += :wireless$(DELIM)bluetooth -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)bluetooth} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)bluetooth} endif # CONFIG_DRIVERS_BLUETOOTH diff --git a/drivers/wireless/ieee80211/bcm43xxx/Make.defs b/drivers/wireless/ieee80211/bcm43xxx/Make.defs index 28a99964d5..ef2a7570f1 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/Make.defs +++ b/drivers/wireless/ieee80211/bcm43xxx/Make.defs @@ -60,6 +60,6 @@ endif DEPPATH += --dep-path wireless$(DELIM)ieee80211$(DELIM)bcm43xxx VPATH += :wireless$(DELIM)ieee80211$(DELIM)bcm43xxx -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee80211$(DELIM)bcm43xxx} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee80211$(DELIM)bcm43xxx} endif # CONFIG_IEEE80211_BROADCOM_FULLMAC diff --git a/drivers/wireless/ieee802154/Make.defs b/drivers/wireless/ieee802154/Make.defs index 3eaa91c465..cd898cd666 100644 --- a/drivers/wireless/ieee802154/Make.defs +++ b/drivers/wireless/ieee802154/Make.defs @@ -49,6 +49,6 @@ include wireless$(DELIM)ieee802154$(DELIM)xbee$(DELIM)Make.defs DEPPATH += --dep-path wireless$(DELIM)ieee802154 VPATH += :wireless$(DELIM)ieee802154 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154} endif # CONFIG_DRIVERS_IEEE802154 diff --git a/drivers/wireless/ieee802154/at86rf23x/Make.defs b/drivers/wireless/ieee802154/at86rf23x/Make.defs index aeecf1bf0f..d52943ebb3 100644 --- a/drivers/wireless/ieee802154/at86rf23x/Make.defs +++ b/drivers/wireless/ieee802154/at86rf23x/Make.defs @@ -43,6 +43,6 @@ CSRCS += at86rf23x.c DEPPATH += --dep-path wireless$(DELIM)ieee802154$(DELIM)at86rf23x VPATH += :wireless$(DELIM)ieee802154$(DELIM)at86rf23x -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)at86rf23x} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)at86rf23x} endif # CONFIG_IEEE802154_AT86RF233 diff --git a/drivers/wireless/ieee802154/mrf24j40/Make.defs b/drivers/wireless/ieee802154/mrf24j40/Make.defs index 04c06ec67f..1040d428cc 100644 --- a/drivers/wireless/ieee802154/mrf24j40/Make.defs +++ b/drivers/wireless/ieee802154/mrf24j40/Make.defs @@ -44,6 +44,6 @@ CSRCS += mrf24j40_regops.c mrf24j40.c DEPPATH += --dep-path wireless$(DELIM)ieee802154$(DELIM)mrf24j40 VPATH += :wireless$(DELIM)ieee802154$(DELIM)mrf24j40 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)mrf24j40} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)mrf24j40} endif # CONFIG_IEEE802154_MRF24J40 diff --git a/drivers/wireless/ieee802154/xbee/Make.defs b/drivers/wireless/ieee802154/xbee/Make.defs index ca4a68c316..d4e7371d1c 100644 --- a/drivers/wireless/ieee802154/xbee/Make.defs +++ b/drivers/wireless/ieee802154/xbee/Make.defs @@ -43,6 +43,6 @@ CSRCS += xbee_ioctl.c xbee_mac.c xbee_netdev.c xbee.c DEPPATH += --dep-path wireless$(DELIM)ieee802154$(DELIM)xbee VPATH += :wireless$(DELIM)ieee802154$(DELIM)xbee -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)xbee} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)xbee} endif # CONFIG_IEEE802154_XBEE diff --git a/drivers/wireless/lpwan/sx127x/Make.defs b/drivers/wireless/lpwan/sx127x/Make.defs index a52dd2d56d..90c24cb89f 100644 --- a/drivers/wireless/lpwan/sx127x/Make.defs +++ b/drivers/wireless/lpwan/sx127x/Make.defs @@ -43,6 +43,6 @@ CSRCS += sx127x.c DEPPATH += --dep-path wireless$(DELIM)lpwan$(DELIM)sx127x VPATH += :wireless$(DELIM)lpwan$(DELIM)sx127x -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)lpwan$(DELIM)sx127x} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)lpwan$(DELIM)sx127x} endif # CONFIG_LPWAN_SX127X diff --git a/drivers/wireless/spirit/drivers/Make.defs b/drivers/wireless/spirit/drivers/Make.defs index 70ded12f8b..723309e463 100644 --- a/drivers/wireless/spirit/drivers/Make.defs +++ b/drivers/wireless/spirit/drivers/Make.defs @@ -43,7 +43,7 @@ CSRCS += spirit_netdev.c DEPPATH += --dep-path wireless$(DELIM)spirit$(DELIM)drivers VPATH += :wireless$(DELIM)spirit$(DELIM)drivers -CFLAGS += ${shell $(INCDIR) "$(CC)" \ +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" \ $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)spirit$(DELIM)drivers} endif # CONFIG_SPIRIT_NETDEV diff --git a/drivers/wireless/spirit/include/Make.defs b/drivers/wireless/spirit/include/Make.defs index ed36427ea5..b4091f85af 100644 --- a/drivers/wireless/spirit/include/Make.defs +++ b/drivers/wireless/spirit/include/Make.defs @@ -35,5 +35,5 @@ # Add path to include Spirit header files in CFLAGS -CFLAGS += ${shell $(INCDIR) "$(CC)" \ +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" \ $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)spirit$(DELIM)include} diff --git a/fs/spiffs/Make.defs b/fs/spiffs/Make.defs index f376968924..b02efb44e8 100644 --- a/fs/spiffs/Make.defs +++ b/fs/spiffs/Make.defs @@ -44,6 +44,6 @@ CSRCS += spiffs_cache.c spiffs_check.c spiffs_mtd.c DEPPATH += --dep-path spiffs/src VPATH += :spiffs/src -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)fs$(DELIM)spiffs$(DELIM)src} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)fs$(DELIM)spiffs$(DELIM)src} endif diff --git a/graphics/Makefile b/graphics/Makefile index a4ec662442..b000d11fbe 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -38,6 +38,10 @@ DEPPATH = --dep-path . +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + ASRCS = CSRCS = VPATH = diff --git a/graphics/nxbe/Make.defs b/graphics/nxbe/Make.defs index e6f9ff751d..fb3efd413b 100644 --- a/graphics/nxbe/Make.defs +++ b/graphics/nxbe/Make.defs @@ -51,5 +51,5 @@ CSRCS += nxbe_cursor.c endif DEPPATH += --dep-path nxbe -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxbe} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe} VPATH += :nxbe diff --git a/graphics/nxglib/Make.defs b/graphics/nxglib/Make.defs index 27502141b7..db252c4ba8 100644 --- a/graphics/nxglib/Make.defs +++ b/graphics/nxglib/Make.defs @@ -111,6 +111,6 @@ CSRCS += nxglib_cursor_backup_24bpp.c nxglib_cursor_backup_32bpp.c endif DEPPATH += --dep-path nxglib -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxglib} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib} #VPATH += :nxglib VPATH = nxglib diff --git a/graphics/nxmu/Make.defs b/graphics/nxmu/Make.defs index f53107ffa2..c47aedec21 100644 --- a/graphics/nxmu/Make.defs +++ b/graphics/nxmu/Make.defs @@ -39,5 +39,5 @@ CSRCS += nxmu_sendclient.c nxmu_sendclientwindow.c nxmu_server.c CSRCS += nxmu_start.c DEPPATH += --dep-path nxmu -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxmu} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu} VPATH += :nxmu diff --git a/graphics/nxterm/Make.defs b/graphics/nxterm/Make.defs index a05f0ad28a..58d78edd17 100644 --- a/graphics/nxterm/Make.defs +++ b/graphics/nxterm/Make.defs @@ -52,7 +52,7 @@ CSRCS += nxterm_sem.c endif DEPPATH += --dep-path nxterm -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxterm} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxterm} VPATH += :nxterm endif diff --git a/graphics/vnc/client/Make.defs b/graphics/vnc/client/Make.defs index ef0c0983a0..03d6f5b5ae 100644 --- a/graphics/vnc/client/Make.defs +++ b/graphics/vnc/client/Make.defs @@ -36,7 +36,7 @@ ifeq ($(CONFIG_VNCCLIENT),y) DEPPATH += --dep-path vnc/client -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/vnc/client} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/vnc/client} VPATH += :vnc/client endif diff --git a/graphics/vnc/server/Make.defs b/graphics/vnc/server/Make.defs index a472b187e6..a0ebad9682 100644 --- a/graphics/vnc/server/Make.defs +++ b/graphics/vnc/server/Make.defs @@ -43,7 +43,7 @@ CSRCS += vnc_keymap.c endif DEPPATH += --dep-path vnc/server -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/vnc/server} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/vnc/server} VPATH += :vnc/server endif diff --git a/libs/libc/zoneinfo/Makefile b/libs/libc/zoneinfo/Makefile index 81c760c0fd..59d0491340 100644 --- a/libs/libc/zoneinfo/Makefile +++ b/libs/libc/zoneinfo/Makefile @@ -36,6 +36,10 @@ -include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + # Zoneinfo database ASRCS = diff --git a/mm/iob/Make.defs b/mm/iob/Make.defs index 384dc63173..a2747bace2 100644 --- a/mm/iob/Make.defs +++ b/mm/iob/Make.defs @@ -56,6 +56,6 @@ endif DEPPATH += --dep-path iob VPATH += :iob -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)mm$(DELIM)iob} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)mm$(DELIM)iob} endif # CONFIG_MM_IOB diff --git a/pass1/Makefile b/pass1/Makefile index 530b2444e9..5eaacb8c56 100644 --- a/pass1/Makefile +++ b/pass1/Makefile @@ -36,6 +36,10 @@ -include $(TOPDIR)/Make.defs DELIM ?= $(strip /) +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + DEPPATH = --dep-path . ASRCS = $(wildcard *.S) diff --git a/tools/Config.mk b/tools/Config.mk index 018a2fae0c..04cd1519ae 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -95,9 +95,6 @@ endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) DEFINE = "$(TOPDIR)\tools\define.bat" INCDIR = "$(TOPDIR)\tools\incdir.bat" -else ifeq ($(WINTOOL),y) - DEFINE = "$(TOPDIR)/tools/define.sh" - INCDIR = "$(TOPDIR)/tools/incdir.sh" -w else DEFINE = "$(TOPDIR)/tools/define.sh" INCDIR = "$(TOPDIR)/tools/incdir.sh" diff --git a/wireless/Makefile b/wireless/Makefile index 254e44903c..2c8559454f 100644 --- a/wireless/Makefile +++ b/wireless/Makefile @@ -36,6 +36,10 @@ -include $(TOPDIR)/Make.defs DELIM ?= $(strip /) +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + # Add files to the build DEPPATH = --dep-path . diff --git a/wireless/bluetooth/Make.defs b/wireless/bluetooth/Make.defs index 8ca7edf4f9..3618ecf0c9 100644 --- a/wireless/bluetooth/Make.defs +++ b/wireless/bluetooth/Make.defs @@ -43,6 +43,6 @@ CSRCS += bt_uuid.c DEPPATH += --dep-path bluetooth VPATH += :bluetooth -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)bluetooth} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)bluetooth} endif # CONFIG_WIRELESS_BLUETOOTH diff --git a/wireless/ieee802154/Make.defs b/wireless/ieee802154/Make.defs index e63ac1bbaa..7de9c47d30 100644 --- a/wireless/ieee802154/Make.defs +++ b/wireless/ieee802154/Make.defs @@ -66,6 +66,6 @@ endif DEPPATH += --dep-path ieee802154 VPATH += :ieee802154 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)ieee802154} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)ieee802154} endif # CONFIG_WIRELESS_IEEE802154 diff --git a/wireless/pktradio/Make.defs b/wireless/pktradio/Make.defs index 7edf8b9716..c73e5f1665 100644 --- a/wireless/pktradio/Make.defs +++ b/wireless/pktradio/Make.defs @@ -45,6 +45,6 @@ endif DEPPATH += --dep-path pktradio VPATH += :pktradio -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)pktradio} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)pktradio} endif # CONFIG_WIRELESS_PKTRADIO