diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index e4e9fea33ed..692c3658059 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: April 8, 2009

+

Last Updated: April 19, 2009

@@ -1539,18 +1539,27 @@ The system can be re-made subsequently by just typing make.

General OS setup

diff --git a/Makefile b/Makefile index 0c4f292cc3b..e1cd923332f 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,7 @@ LINKLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT) mm/libmm$(LIBEXT # Add libraries for network support. CXX, CXXFLAGS, and COMPILEXX must # be defined in Make.defs for this to work! -ifneq ($(CXX),) +ifeq ($(CONFIG_HAVE_CXX),y) LINKLIBS += libxx/liblibxx$(LIBEXT) endif @@ -203,10 +203,8 @@ sched/libsched$(LIBEXT): context lib/liblib$(LIBEXT): context @$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT) -ifneq ($(CXX),) libxx/liblibxx$(LIBEXT): context @$(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT) -endif $(ARCH_SRC)/libarch$(LIBEXT): context @$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) diff --git a/configs/README.txt b/configs/README.txt index c7249039db4..ba4d1b80dcb 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -154,6 +154,9 @@ defconfig -- This is a configuration file similar to the Linux different loaders using the GNU objcopy program. This option should not be selected if you are not using the GNU toolchain. CONFIG_HAVE_LIBM - toolchain supports libm.a + CONFIG_HAVE_CXX - toolchain supports C++ and CXX, CXXFLAGS, and + COMPILEXX have been defined in the configuratins Make.defs + file. General OS setup diff --git a/examples/helloxx/Makefile b/examples/helloxx/Makefile index 40c9d654684..7210ea2f170 100755 --- a/examples/helloxx/Makefile +++ b/examples/helloxx/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# examples/hello/Makefile +# examples/helloxx/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -52,10 +52,14 @@ all: $(BIN) .PHONY: clean depend chkcxx chkcxx: -ifndef CXX - @echo "In order to use this example, you toolchain must support C++" - @echo "and CXX, CXXFLAGS, and COMPILEXX must be defined in the Make.defs" - @echo "file of the configuration that you are using." +ifneq ($(CONFIG_HAVE_CXX),y) + @echo "" + @echo "In order to use this example, you toolchain must support must" + @echo "" + @echo " (1) Explicitly seelct CONFIG_HAVE_CXX to build in C++ support" + @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" + @echo " of the configuration that you are using." + @echo "" @exit 1 endif diff --git a/examples/helloxx/main.cxx b/examples/helloxx/main.cxx index 7f8230c4a1c..df84375a25d 100755 --- a/examples/helloxx/main.cxx +++ b/examples/helloxx/main.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// examples/hello/main.c +// examples/helloxx/main.c // // Copyright (C) 2009 Gregory Nutt. All rights reserved. // Author: Gregory Nutt