From bcdd7936ce8a366e644f45fab42a48455b719546 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 13 Nov 2012 20:24:30 +0000 Subject: Centralized the definition of the INCDIR script in tools/Config.mk git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5346 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/UnitTests/CButton/Makefile | 2 - NxWidgets/UnitTests/CButtonArray/Makefile | 2 - NxWidgets/UnitTests/CCheckBox/Makefile | 2 - NxWidgets/UnitTests/CGlyphButton/Makefile | 2 - NxWidgets/UnitTests/CImage/Makefile | 2 - NxWidgets/UnitTests/CKeypad/Makefile | 2 - NxWidgets/UnitTests/CLabel/Makefile | 2 - NxWidgets/UnitTests/CLatchButton/Makefile | 2 - NxWidgets/UnitTests/CLatchButtonArray/Makefile | 2 - NxWidgets/UnitTests/CListBox/Makefile | 2 - NxWidgets/UnitTests/CProgressBar/Makefile | 2 - NxWidgets/UnitTests/CRadioButton/Makefile | 2 - NxWidgets/UnitTests/CScrollbarHorizontal/Makefile | 2 - NxWidgets/UnitTests/CScrollbarVertical/Makefile | 2 - NxWidgets/UnitTests/CSliderHorizonal/Makefile | 2 - NxWidgets/UnitTests/CSliderVertical/Makefile | 2 - NxWidgets/UnitTests/CTextBox/Makefile | 2 - NxWidgets/UnitTests/nxwm/Makefile | 2 - NxWidgets/libnxwidgets/Makefile | 5 +- NxWidgets/nxwm/Makefile | 9 ++- apps/interpreters/ficl/Makefile | 3 - apps/modbus/ascii/Make.defs | 2 +- apps/modbus/functions/Make.defs | 2 +- apps/modbus/nuttx/Make.defs | 2 +- apps/modbus/rtu/Make.defs | 2 +- apps/modbus/tcp/Make.defs | 2 +- apps/netutils/thttpd/cgi-src/Makefile | 4 +- misc/pascal/nuttx/Makefile | 2 - nuttx/ChangeLog | 3 + nuttx/binfmt/Makefile | 2 +- nuttx/configs/stm32f4discovery/winbuild/Make.defs | 2 +- nuttx/drivers/analog/Make.defs | 6 +- nuttx/drivers/bch/Make.defs | 4 +- nuttx/drivers/input/Make.defs | 4 +- nuttx/drivers/lcd/Make.defs | 2 +- nuttx/drivers/mmcsd/Make.defs | 4 +- nuttx/drivers/power/Make.defs | 4 +- nuttx/drivers/sensors/Make.defs | 4 +- nuttx/drivers/usbdev/Make.defs | 2 +- nuttx/drivers/usbhost/Make.defs | 4 +- nuttx/drivers/wireless/Make.defs | 4 +- nuttx/graphics/Makefile | 14 ++-- nuttx/tools/Config.mk | 81 ++++++++++++++++++++++- nuttx/tools/Makefile.host | 7 ++ nuttx/tools/README.txt | 39 ++++++++++- nuttx/tools/mkdeps.c | 69 +++++++++++++++++++ 46 files changed, 236 insertions(+), 88 deletions(-) diff --git a/NxWidgets/UnitTests/CButton/Makefile b/NxWidgets/UnitTests/CButton/Makefile index 87649ac3c..01bca12a5 100644 --- a/NxWidgets/UnitTests/CButton/Makefile +++ b/NxWidgets/UnitTests/CButton/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CButtonArray/Makefile b/NxWidgets/UnitTests/CButtonArray/Makefile index 03f7624f9..84d19277e 100644 --- a/NxWidgets/UnitTests/CButtonArray/Makefile +++ b/NxWidgets/UnitTests/CButtonArray/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CCheckBox/Makefile b/NxWidgets/UnitTests/CCheckBox/Makefile index 715fe4dad..5aa96e618 100644 --- a/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/NxWidgets/UnitTests/CCheckBox/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CGlyphButton/Makefile b/NxWidgets/UnitTests/CGlyphButton/Makefile index db91bdfbc..ec0c5d5d3 100644 --- a/NxWidgets/UnitTests/CGlyphButton/Makefile +++ b/NxWidgets/UnitTests/CGlyphButton/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CImage/Makefile b/NxWidgets/UnitTests/CImage/Makefile index fb2640446..5970d59d1 100644 --- a/NxWidgets/UnitTests/CImage/Makefile +++ b/NxWidgets/UnitTests/CImage/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CKeypad/Makefile b/NxWidgets/UnitTests/CKeypad/Makefile index 36ae2f543..b0aba9603 100644 --- a/NxWidgets/UnitTests/CKeypad/Makefile +++ b/NxWidgets/UnitTests/CKeypad/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CLabel/Makefile b/NxWidgets/UnitTests/CLabel/Makefile index 2ddfbbf42..9a5fa1321 100644 --- a/NxWidgets/UnitTests/CLabel/Makefile +++ b/NxWidgets/UnitTests/CLabel/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CLatchButton/Makefile b/NxWidgets/UnitTests/CLatchButton/Makefile index a44e7e954..e50db8914 100644 --- a/NxWidgets/UnitTests/CLatchButton/Makefile +++ b/NxWidgets/UnitTests/CLatchButton/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/NxWidgets/UnitTests/CLatchButtonArray/Makefile index a11c9bfd6..544167ec9 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/Makefile +++ b/NxWidgets/UnitTests/CLatchButtonArray/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CListBox/Makefile b/NxWidgets/UnitTests/CListBox/Makefile index a396d4b01..1161460b4 100644 --- a/NxWidgets/UnitTests/CListBox/Makefile +++ b/NxWidgets/UnitTests/CListBox/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CProgressBar/Makefile b/NxWidgets/UnitTests/CProgressBar/Makefile index 11b802f92..6fee2fac9 100644 --- a/NxWidgets/UnitTests/CProgressBar/Makefile +++ b/NxWidgets/UnitTests/CProgressBar/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CRadioButton/Makefile b/NxWidgets/UnitTests/CRadioButton/Makefile index b642ebaf3..97e8a398e 100644 --- a/NxWidgets/UnitTests/CRadioButton/Makefile +++ b/NxWidgets/UnitTests/CRadioButton/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile index c952fd1e2..952ec4c6b 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/NxWidgets/UnitTests/CScrollbarVertical/Makefile index 81b8ced26..4e44699ee 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/Makefile +++ b/NxWidgets/UnitTests/CScrollbarVertical/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/NxWidgets/UnitTests/CSliderHorizonal/Makefile index e31f1f033..5bc6c84c6 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/Makefile +++ b/NxWidgets/UnitTests/CSliderHorizonal/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CSliderVertical/Makefile b/NxWidgets/UnitTests/CSliderVertical/Makefile index 3a86b57e9..4c6a660f0 100644 --- a/NxWidgets/UnitTests/CSliderVertical/Makefile +++ b/NxWidgets/UnitTests/CSliderVertical/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/CTextBox/Makefile b/NxWidgets/UnitTests/CTextBox/Makefile index b73ce8f4a..8fde36bb0 100644 --- a/NxWidgets/UnitTests/CTextBox/Makefile +++ b/NxWidgets/UnitTests/CTextBox/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/UnitTests/nxwm/Makefile b/NxWidgets/UnitTests/nxwm/Makefile index cfcdef750..73cb0b42a 100644 --- a/NxWidgets/UnitTests/nxwm/Makefile +++ b/NxWidgets/UnitTests/nxwm/Makefile @@ -35,7 +35,6 @@ TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" -INCDIR=$(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} diff --git a/NxWidgets/libnxwidgets/Makefile b/NxWidgets/libnxwidgets/Makefile index 4673c1f98..880117a24 100644 --- a/NxWidgets/libnxwidgets/Makefile +++ b/NxWidgets/libnxwidgets/Makefile @@ -33,7 +33,6 @@ # ################################################################################# --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs # Control build verbosity @@ -87,8 +86,8 @@ ifeq ($(WINTOOL),y) INCDIROPT = -w endif -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} -CXXFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} +CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} DEPPATH = --dep-path src VPATH = src diff --git a/NxWidgets/nxwm/Makefile b/NxWidgets/nxwm/Makefile index 372f3c186..81b9dcdeb 100644 --- a/NxWidgets/nxwm/Makefile +++ b/NxWidgets/nxwm/Makefile @@ -33,7 +33,6 @@ # ################################################################################# --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs # Control build verbosity @@ -89,10 +88,10 @@ ifeq ($(WINTOOL),y) INCDIROPT = -w endif -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(NXWMDIR)/include} -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} -CXXFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(NXWMDIR)/include} -CXXFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWMDIR)/include} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} +CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWMDIR)/include} +CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)/include} DEPPATH = --dep-path src VPATH = src diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile index e905b9eff..550c2fd2d 100644 --- a/apps/interpreters/ficl/Makefile +++ b/apps/interpreters/ficl/Makefile @@ -35,14 +35,11 @@ BUILDDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs # Tools -INCDIR = $(TOPDIR)/tools/incdir.sh - ifeq ($(WINTOOL),y) INCDIROPT = -w endif diff --git a/apps/modbus/ascii/Make.defs b/apps/modbus/ascii/Make.defs index 3e9967283..d4cb38f97 100644 --- a/apps/modbus/ascii/Make.defs +++ b/apps/modbus/ascii/Make.defs @@ -39,6 +39,6 @@ CSRCS += mbascii.c DEPPATH += --dep-path ascii VPATH += :ascii -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/ascii} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/ascii} endif diff --git a/apps/modbus/functions/Make.defs b/apps/modbus/functions/Make.defs index 48f60d506..ba4a243c1 100644 --- a/apps/modbus/functions/Make.defs +++ b/apps/modbus/functions/Make.defs @@ -38,4 +38,4 @@ CSRCS += mbfuncinput.c mbfuncother.c mbutils.c DEPPATH += --dep-path functions VPATH += :functions -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/functions} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/functions} diff --git a/apps/modbus/nuttx/Make.defs b/apps/modbus/nuttx/Make.defs index 96484217b..3990ccd97 100644 --- a/apps/modbus/nuttx/Make.defs +++ b/apps/modbus/nuttx/Make.defs @@ -37,4 +37,4 @@ CSRCS += portevent.c portother.c portserial.c porttimer.c DEPPATH += --dep-path nuttx VPATH += :nuttx -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/nuttx} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/nuttx} diff --git a/apps/modbus/rtu/Make.defs b/apps/modbus/rtu/Make.defs index 8b9c68c77..d9e3b29c0 100644 --- a/apps/modbus/rtu/Make.defs +++ b/apps/modbus/rtu/Make.defs @@ -39,6 +39,6 @@ CSRCS += mbcrc.c mbrtu.c DEPPATH += --dep-path rtu VPATH += :rtu -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/rtu} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/rtu} endif diff --git a/apps/modbus/tcp/Make.defs b/apps/modbus/tcp/Make.defs index 30860be3a..4cd2adb75 100644 --- a/apps/modbus/tcp/Make.defs +++ b/apps/modbus/tcp/Make.defs @@ -39,6 +39,6 @@ CSRCS += mbtcp.c DEPPATH += --dep-path tcp VPATH += :tcp -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/tcp} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/modbus/tcp} endif diff --git a/apps/netutils/thttpd/cgi-src/Makefile b/apps/netutils/thttpd/cgi-src/Makefile index 60efb08e7..bb8e36457 100644 --- a/apps/netutils/thttpd/cgi-src/Makefile +++ b/apps/netutils/thttpd/cgi-src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/netutils/cgi-src/Makefile # -# Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ ifeq ($(WINTOOL),y) INCDIROPT = -w endif -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" "$(APPDIR)/netutils/thttpd" "$(APPDIR)/netutils/thttpd/cgi-src"} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)/netutils/thttpd" "$(APPDIR)/netutils/thttpd/cgi-src"} CGIBINDIR = $(APPDIR)/netutils/thttpd/cgi-bin CLEANFILES = *.o redirect ssi phf diff --git a/misc/pascal/nuttx/Makefile b/misc/pascal/nuttx/Makefile index af4e4d412..939c9322d 100644 --- a/misc/pascal/nuttx/Makefile +++ b/misc/pascal/nuttx/Makefile @@ -35,7 +35,6 @@ PCODEDIR := ${shell pwd | sed -e 's/ /\\ /g'} --include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs @@ -45,7 +44,6 @@ ifeq ($(DIRLINK),) DIRLINK = $(TOPDIR)/tools/link.sh DIRUNLINK = $(TOPDIR)/tools/unlink.sh endif -INCDIR = $(TOPDIR)/tools/incdir.sh ifeq ($(WINTOOL),y) INCDIROPT = -w diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 0f92fdf7a..31700214f 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3613,3 +3613,6 @@ critical CFLAG values that cannot be passed on the CMD.exe command line (line '='). mkdeps.c is a work in progress that will, hopefully, replace both mkdeps.sh and mkdeps.bat. + * tools/Config.mk: Centralize the definition of the scrpt that will be + used to generated header file include paths for the compiler. This + needs to be centralized in order to support the Windows native build. diff --git a/nuttx/binfmt/Makefile b/nuttx/binfmt/Makefile index 365997be8..378a737f6 100644 --- a/nuttx/binfmt/Makefile +++ b/nuttx/binfmt/Makefile @@ -38,7 +38,7 @@ ifeq ($(WINTOOL),y) INCDIROPT = -w endif -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/sched} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/sched} # Basic BINFMT source files diff --git a/nuttx/configs/stm32f4discovery/winbuild/Make.defs b/nuttx/configs/stm32f4discovery/winbuild/Make.defs index 75051da51..28cf8a561 100644 --- a/nuttx/configs/stm32f4discovery/winbuild/Make.defs +++ b/nuttx/configs/stm32f4discovery/winbuild/Make.defs @@ -130,7 +130,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif -HOSTCC = mingw-gcc.exe +HOSTCC = mingw32-gcc.exe HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe HOSTLDFLAGS = diff --git a/nuttx/drivers/analog/Make.defs b/nuttx/drivers/analog/Make.defs index d94e39758..425193f7e 100644 --- a/nuttx/drivers/analog/Make.defs +++ b/nuttx/drivers/analog/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/analog/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -76,12 +76,12 @@ endif ifeq ($(CONFIG_DAC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog} else ifeq ($(CONFIG_ADC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog} + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog} endif endif diff --git a/nuttx/drivers/bch/Make.defs b/nuttx/drivers/bch/Make.defs index bc22df8e2..2745fcfff 100644 --- a/nuttx/drivers/bch/Make.defs +++ b/nuttx/drivers/bch/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/bch/Make.defs # -# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ CSRCS += bchlib_setup.c bchlib_teardown.c bchlib_read.c bchlib_write.c \ DEPPATH += --dep-path bch VPATH += :bch -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/bch} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/bch} endif endif diff --git a/nuttx/drivers/input/Make.defs b/nuttx/drivers/input/Make.defs index 8b009760c..8afd76f89 100644 --- a/nuttx/drivers/input/Make.defs +++ b/nuttx/drivers/input/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/input/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -71,6 +71,6 @@ endif DEPPATH += --dep-path input VPATH += :input -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/input} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/input} endif diff --git a/nuttx/drivers/lcd/Make.defs b/nuttx/drivers/lcd/Make.defs index 575751d39..8b6d30052 100644 --- a/nuttx/drivers/lcd/Make.defs +++ b/nuttx/drivers/lcd/Make.defs @@ -67,6 +67,6 @@ endif DEPPATH += --dep-path lcd VPATH += :lcd -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/lcd} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/lcd} endif diff --git a/nuttx/drivers/mmcsd/Make.defs b/nuttx/drivers/mmcsd/Make.defs index 410da741b..0ba5efb7f 100644 --- a/nuttx/drivers/mmcsd/Make.defs +++ b/nuttx/drivers/mmcsd/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/mmcsd/Make.defs # -# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ endif DEPPATH += --dep-path mmcsd VPATH += :mmcsd -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd} endif diff --git a/nuttx/drivers/power/Make.defs b/nuttx/drivers/power/Make.defs index 45c6aebc3..9e6307ae2 100644 --- a/nuttx/drivers/power/Make.defs +++ b/nuttx/drivers/power/Make.defs @@ -47,7 +47,7 @@ CSRCS += pm_activity.c pm_changestate.c pm_checkstate.c pm_initialize.c pm_regis POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power} endif @@ -73,7 +73,7 @@ endif POWER_DEPPATH := --dep-path power POWER_VPATH := :power -POWER_CFLAGS := ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power} +POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power} endif diff --git a/nuttx/drivers/sensors/Make.defs b/nuttx/drivers/sensors/Make.defs index 866ccb053..17750831e 100644 --- a/nuttx/drivers/sensors/Make.defs +++ b/nuttx/drivers/sensors/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/sensors/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -57,4 +57,4 @@ endif DEPPATH += --dep-path sensors VPATH += :sensors -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/sensors} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/sensors} diff --git a/nuttx/drivers/usbdev/Make.defs b/nuttx/drivers/usbdev/Make.defs index f1b3c405a..782c18545 100644 --- a/nuttx/drivers/usbdev/Make.defs +++ b/nuttx/drivers/usbdev/Make.defs @@ -59,5 +59,5 @@ CSRCS += usbdev_trace.c usbdev_trprintf.c DEPPATH += --dep-path usbdev VPATH += :usbdev -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbdev} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbdev} endif diff --git a/nuttx/drivers/usbhost/Make.defs b/nuttx/drivers/usbhost/Make.defs index fd54ab53e..91753ef31 100644 --- a/nuttx/drivers/usbhost/Make.defs +++ b/nuttx/drivers/usbhost/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/usbhost/Make.defs # -# Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -54,4 +54,4 @@ endif DEPPATH += --dep-path usbhost VPATH += :usbhost -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbhost} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbhost} diff --git a/nuttx/drivers/wireless/Make.defs b/nuttx/drivers/wireless/Make.defs index f47f7666a..86ea90e25 100644 --- a/nuttx/drivers/wireless/Make.defs +++ b/nuttx/drivers/wireless/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/wireless/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -43,5 +43,5 @@ CSRCS += cc1101.c ISM1_868MHzGFSK100kbps.c ISM2_905MHzGFSK250kbps.c DEPPATH += --dep-path wireless/cc1101 VPATH += :wireless/cc1101 -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/wireless/cc1101} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/wireless/cc1101} endif diff --git a/nuttx/graphics/Makefile b/nuttx/graphics/Makefile index f638587ba..09d7cfa26 100644 --- a/nuttx/graphics/Makefile +++ b/nuttx/graphics/Makefile @@ -44,34 +44,34 @@ endif include nxglib/Make.defs DEPPATH += --dep-path nxglib -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib} include nxbe/Make.defs DEPPATH += --dep-path nxbe -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe} ifeq ($(CONFIG_NX_MULTIUSER),y) include nxmu/Make.defs DEPPATH += --dep-path nxmu -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu} else include nxsu/Make.defs DEPPATH += --dep-path nxsu -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxsu} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxsu} endif include nxtk/Make.defs DEPPATH += --dep-path nxtk -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxtk} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxtk} include nxfonts/Make.defs DEPPATH += --dep-path nxfonts -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxfonts} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxfonts} ifeq ($(CONFIG_NXCONSOLE),y) include nxconsole/Make.defs DEPPATH += --dep-path nxconsole -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxconsole} +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxconsole} endif ASRCS = $(NXGLIB_ASRCS) $(NXBE_ASRCS) $(NX_ASRCS) $(NXTK_ASRCS) $(NXFONTS_ASRCS) $(NXCON_ASRCS) diff --git a/nuttx/tools/Config.mk b/nuttx/tools/Config.mk index 06a312fc5..3a0714c10 100644 --- a/nuttx/tools/Config.mk +++ b/nuttx/tools/Config.mk @@ -4,6 +4,9 @@ # # Author: Richard Cochran # +# This file (along with $(TOPDIR)/.config) must be included by every +# configuration-specific Make.defs file. +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: @@ -40,28 +43,104 @@ CONFIG_ARCH := $(patsubst "%",%,$(strip $(CONFIG_ARCH))) CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP))) CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD))) -# Default build rules. +# INCDIR - Convert a list of directory paths to a list of compiler include +# directirves +# Example: CFFLAGS += ${shell $(INCDIR) [options] "compiler" "dir1" "dir2" "dir2" ...} +# +# Note that the compiler string and each directory path string must quoted if +# they contain spaces or any other characters that might get mangled by the +# shell +# +# Depends on this setting passed as a make commaond line definition from the +# toplevel Makefile: +# +# TOPDIR - The path to the the top level NuttX directory in the form +# appropriate for the current build environment +# +# Depends on this settings defined in board-specific defconfig file installed +# at $(TOPDIR)/.config: +# +# CONFIG_WINDOWS_NATIVE - Defined for a Windows native build + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + INCDIR = "$(TOPDIR)\tools\incdir.bat" +else + INCDIR = "$(TOPDIR)/tools/incdir.sh" +endif + +# PREPROCESS - Default macro to run the C pre-processor +# Example: $(call PREPROCESS, in-file, out-file) +# +# Depends on these settings defined in board-specific Make.defs file +# installed at $(TOPDIR)/Make.defs: +# +# CPP - The command to invoke the C pre-processor +# CPPFLAGS - Options to pass to the C pre-processor define PREPROCESS @echo "CPP: $1->$2" $(Q) $(CPP) $(CPPFLAGS) $1 -o $2 endef +# COMPILE - Default macro to compile one C file +# Example: $(call COMPILE, in-file, out-file) +# +# Depends on these settings defined in board-specific Make.defs file +# installed at $(TOPDIR)/Make.defs: +# +# CC - The command to invoke the C compiler +# CFLAGS - Options to pass to the C compiler + define COMPILE @echo "CC: $1" $(Q) $(CC) -c $(CFLAGS) $1 -o $2 endef +# COMPILEXX - Default macro to compile one C++ file +# Example: $(call COMPILEXX, in-file, out-file) +# +# Depends on these settings defined in board-specific Make.defs file +# installed at $(TOPDIR)/Make.defs: +# +# CXX - The command to invoke the C++ compiler +# CXXFLAGS - Options to pass to the C++ compiler + define COMPILEXX @echo "CXX: $1" $(Q) $(CXX) -c $(CXXFLAGS) $1 -o $2 endef +# ASSEMBLE - Default macro to assemble one assembly language file +# Example: $(call ASSEMBLE, in-file, out-file) +# +# Depends on these settings defined in board-specific Make.defs file +# installed at $(TOPDIR)/Make.defs: +# +# CC - By default, the C compiler is used to compile assembly lagnuage +# files +# AFLAGS - Options to pass to the C+compiler + define ASSEMBLE @echo "AS: $1" $(Q) $(CC) -c $(AFLAGS) $1 -o $2 endef +# ARCHIVE - Add a list of files to an archive +# Example: $(call ARCHIVE, archive-file, "file1 file2 file3 ...") +# +# Note: The fileN strings may not contain spaces or characters that may be +# interpreted strangely by the shell +# +# Depends on these settings defined in board-specific Make.defs file +# installed at $(TOPDIR)/Make.defs: +# +# AR - The command to invoke the archiver (includes any options) +# +# Depends on this settings defined in board-specific defconfig file installed +# at $(TOPDIR)/.config: +# +# CONFIG_WINDOWS_NATIVE - Defined for a Windows native build + ifeq ($(CONFIG_WINDOWS_NATIVE),y) define ARCHIVE @echo "AR: $2" diff --git a/nuttx/tools/Makefile.host b/nuttx/tools/Makefile.host index 882a3c0ae..478625008 100644 --- a/nuttx/tools/Makefile.host +++ b/nuttx/tools/Makefile.host @@ -37,6 +37,13 @@ TOPDIR ?= ${shell pwd}/.. -include $(TOPDIR)/Make.defs include ${TOPDIR}/tools/Config.mk +# strtok_r is used in some tools, but does not seem to be available in +# the MinGW environment. + +ifneq ($(CONFIG_WINDOWS_NATIVE),y) + HOSTCFLAGS += -D HAVE_STRTOK_C +endif + all: mkconfig$(HOSTEXEEXT) mkversion$(HOSTEXEEXT) mksyscall$(HOSTEXEEXT) bdf-converter$(HOSTEXEEXT) mksymtab$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT) default: mkconfig$(HOSTEXEEXT) mksyscall$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT) diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt index 3c9730d00..38efc7a3f 100644 --- a/nuttx/tools/README.txt +++ b/nuttx/tools/README.txt @@ -1,5 +1,5 @@ tools/README.txt -^^^^^^^^^^^^^^^^ +================ This README file addresses the contents of the NuttX tools/ directory. @@ -8,22 +8,38 @@ that are necessary parts of the the NuttX build system. These files include: README.txt +---------- - This file + This file! + +Config.mk +--------- + + This file contains common definitions used by many configureation files. + This file (along with /.config) must be included at the top of + each configuration-specific Make.defs file like: + + -include $(TOPDIR)/.config + include $(TOPDIR)/tools/Config.mk + + Subsequent logic within the configuration-specific Make.defs file may then + override these default definitions as necessary. configure.sh +------------ This is a bash script that is used to configure NuttX for a given target board. See configs/README.txt or Documentation/NuttxPortingGuide.html for a description of how to configure NuttX with this script. discover.py +----------- Example script for discovering devices in the local network. It is the counter part to apps/netutils/discover - mkconfig.c, cfgparser.c, and cfgparser.h +---------------------------------------- These are Cs file that are used to build mkconfig program. The mkconfig program is used during the initial NuttX build. @@ -38,11 +54,13 @@ mkconfig.c, cfgparser.c, and cfgparser.h NuttX configuration that can be included by C files. cmdconfig.c +----------- This C file can be used to build a utility for comparing two NuttX configuration files. mkexport.sh and Makefile.export +------------------------------- These implement part of the top-level Makefile's 'export' target. That target will bundle up all of the NuttX libraries, header files, and the @@ -51,6 +69,7 @@ mkexport.sh and Makefile.export options from the top-level Make.defs file. mkfsdata.pl +----------- This perl script is used to build the "fake" file system and CGI support as needed for the apps/netutils/webserver. It is currently used only @@ -61,6 +80,7 @@ mkfsdata.pl by Adam Dunkels. uIP has a license that is compatible with NuttX. mkversion.c, cfgparser.c, and cfgparser.h +----------------------------------------- This is C file that is used to build mkversion program. The mkversion program is used during the initial NuttX build. @@ -74,6 +94,7 @@ mkversion.c, cfgparser.c, and cfgparser.h version.h provides version information that can be included by C files. mksyscall.c, cvsparser.c, and cvsparser.h +----------------------------------------- This is a C file that is used to build mksyscall program. The mksyscall program is used during the initial NuttX build by the logic in the top- @@ -96,6 +117,7 @@ mksyscall.c, cvsparser.c, and cvsparser.h stub files as output. See syscall/README.txt for additonal information. mksymtab.c, cvsparser.c, and cvsparser.h +---------------------------------------- This is a C file that is used to build symbol tables from common-separated value (CSV) files. This tool is not used during the NuttX build, but @@ -116,10 +138,12 @@ mksymtab.c, cvsparser.c, and cvsparser.h ./mksymtab.exe tmp.csv tmp.c pic32mx +------- This directory contains build tools used only for PIC32MX platforms bdf-convert.c +------------- This C file is used to build the bdf-converter program. The bdf-converter program be used to convert fonts in Bitmap Distribution Format (BDF) @@ -255,6 +279,7 @@ bdf-convert.c }; Makefile.host +------------- This is the makefile that is used to make the mkconfig program from the mkconfig.c C file, the cmpconfig program from cmpconfig.c C file @@ -265,6 +290,7 @@ Makefile.host make -f Makefile.host mkromfsimg.sh +------------- This script may be used to automate the generate of a ROMFS file system image. It accepts an rcS script "template" and generates and image that @@ -274,6 +300,7 @@ mkdeps.sh mkdeps.bat mkdeps.c mknulldeps.sh +------------- NuttX uses the GCC compilers capabilities to create Makefile dependencies. The bash script mkdeps.sh is used to run GCC in order to create the @@ -317,6 +344,7 @@ mknulldeps.sh that mixed environment. define.sh +--------- Different compilers have different conventions for specifying pre- processor definitions on the compiler command line. This bash @@ -324,6 +352,7 @@ define.sh without concern for the particular compiler in use. incdir.sh +--------- Different compilers have different conventions for specifying lists of include file paths on the the compiler command line. This bash @@ -333,6 +362,7 @@ incdir.sh link.sh winlink.sh unlink.sh +---------- Different file system have different capabilities for symbolic links. Some windows file systems have no native support for symbolic links. @@ -365,16 +395,19 @@ unlink.sh tried that mkimage.sh +---------- The creates a downloadable image as needed with the rrload bootloader. indent.sh +--------- This script can be used to indent .c and .h files in a manner similar to my coding NuttX coding style. It doesn't do a really good job, however (see the comments at the top of the indent.sh file). zipme.sh +-------- I use this script to create the nuttx-xx.yy.tar.gz tarballs for release on SourceForge. It is handy because it also does the diff --git a/nuttx/tools/mkdeps.c b/nuttx/tools/mkdeps.c index a90595c98..c688b2b75 100644 --- a/nuttx/tools/mkdeps.c +++ b/nuttx/tools/mkdeps.c @@ -87,6 +87,75 @@ static char *g_topdir = NULL; * Private Functions ****************************************************************************/ + /* MinGW does not seem to provide strtok_r */ + +#ifndef HAVE_STRTOK_R +static char *strtok_r(char *str, const char *delim, char **saveptr) +{ + char *pbegin; + char *pend = NULL; + + /* Decide if we are starting a new string or continuing from + * the point we left off. + */ + + if (str) + { + pbegin = str; + } + else if (saveptr && *saveptr) + { + pbegin = *saveptr; + } + else + { + return NULL; + } + + /* Find the beginning of the next token */ + + for (; + *pbegin && strchr(delim, *pbegin) != NULL; + pbegin++); + + /* If we are at the end of the string with nothing + * but delimiters found, then return NULL. + */ + + if (!*pbegin) + { + return NULL; + } + + /* Find the end of the token */ + + for (pend = pbegin + 1; + *pend && strchr(delim, *pend) == NULL; + pend++); + + /* pend either points to the end of the string or to + * the first delimiter after the string. + */ + + if (*pend) + { + /* Turn the delimiter into a null terminator */ + + *pend++ = '\0'; + } + + /* Save the pointer where we left off and return the + * beginning of the token. + */ + + if (saveptr) + { + *saveptr = pend; + } + return pbegin; +} +#endif + static void append(char **base, char *str) { char *oldbase; -- cgit v1.2.3