Need more positive control over C++
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1716 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
0e018fde27
commit
314ce72c38
@ -12,7 +12,7 @@
|
|||||||
<h1><big><font color="#3c34ec">
|
<h1><big><font color="#3c34ec">
|
||||||
<i>NuttX RTOS Porting Guide</i>
|
<i>NuttX RTOS Porting Guide</i>
|
||||||
</font></big></h1>
|
</font></big></h1>
|
||||||
<p>Last Updated: April 8, 2009</p>
|
<p>Last Updated: April 19, 2009</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -1539,18 +1539,27 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
|||||||
<ul>
|
<ul>
|
||||||
<li><code>CONFIG_RRLOAD_BINARY</code>:
|
<li><code>CONFIG_RRLOAD_BINARY</code>:
|
||||||
Make the rrload binary format used with BSPs from <a href="www.ridgerun.com">ridgerun.com</a>
|
Make the rrload binary format used with BSPs from <a href="www.ridgerun.com">ridgerun.com</a>
|
||||||
using the <code>tools/mkimage.sh</code> script.</li>
|
using the <code>tools/mkimage.sh</code> script.
|
||||||
|
</li>
|
||||||
<li><code>CONFIG_INTELHEX_BINARY</code>:
|
<li><code>CONFIG_INTELHEX_BINARY</code>:
|
||||||
Make the Intel HEX binary format used with many different loaders using the GNU objcopy program
|
Make the Intel HEX binary format used with many different loaders using the GNU objcopy program
|
||||||
This option hould not be selected if you are not using the GNU toolchain.</li>
|
This option hould not be selected if you are not using the GNU toolchain.
|
||||||
|
</li>
|
||||||
<li><code>CONFIG_MOTOROLA_SREC</code>:
|
<li><code>CONFIG_MOTOROLA_SREC</code>:
|
||||||
Make the Motorola S-Record binary format used with many different loaders using the GNU objcopy program
|
Make the Motorola S-Record binary format used with many different loaders using the GNU objcopy program
|
||||||
Should not be selected if you are not using the GNU toolchain.</li>
|
Should not be selected if you are not using the GNU toolchain.
|
||||||
|
</li>
|
||||||
<li><code>CONFIG_RAW_BINARY</code>:
|
<li><code>CONFIG_RAW_BINARY</code>:
|
||||||
mmke a raw binary format file used with many different loaders using the GNU objcopy program.
|
mmke a raw binary format file used with many different loaders using the GNU objcopy program.
|
||||||
This option should not be selected if you are not using the GNU toolchain.</li>
|
This option should not be selected if you are not using the GNU toolchain.
|
||||||
|
</li>
|
||||||
<li><code>CONFIG_HAVE_LIBM</code>:
|
<li><code>CONFIG_HAVE_LIBM</code>:
|
||||||
Toolchain supports libm.a</li>
|
Toolchain supports libm.a
|
||||||
|
</li>
|
||||||
|
<li><code>CONFIG_HAVE_CXX</code>:
|
||||||
|
Toolchain supports C++ and <code>CXX</code>, <code>CXXFLAGS</code>, and <code>COMPILEXX</code>
|
||||||
|
have been defined in the configuratins <code>Make.defs</code> file.
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>General OS setup</h2>
|
<h2>General OS setup</h2>
|
||||||
|
4
Makefile
4
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
|
# Add libraries for network support. CXX, CXXFLAGS, and COMPILEXX must
|
||||||
# be defined in Make.defs for this to work!
|
# be defined in Make.defs for this to work!
|
||||||
|
|
||||||
ifneq ($(CXX),)
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
||||||
LINKLIBS += libxx/liblibxx$(LIBEXT)
|
LINKLIBS += libxx/liblibxx$(LIBEXT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -203,10 +203,8 @@ sched/libsched$(LIBEXT): context
|
|||||||
lib/liblib$(LIBEXT): context
|
lib/liblib$(LIBEXT): context
|
||||||
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
|
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
|
||||||
|
|
||||||
ifneq ($(CXX),)
|
|
||||||
libxx/liblibxx$(LIBEXT): context
|
libxx/liblibxx$(LIBEXT): context
|
||||||
@$(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT)
|
@$(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT)
|
||||||
endif
|
|
||||||
|
|
||||||
$(ARCH_SRC)/libarch$(LIBEXT): context
|
$(ARCH_SRC)/libarch$(LIBEXT): context
|
||||||
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
|
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
|
||||||
|
@ -154,6 +154,9 @@ defconfig -- This is a configuration file similar to the Linux
|
|||||||
different loaders using the GNU objcopy program. This option
|
different loaders using the GNU objcopy program. This option
|
||||||
should not be selected if you are not using the GNU toolchain.
|
should not be selected if you are not using the GNU toolchain.
|
||||||
CONFIG_HAVE_LIBM - toolchain supports libm.a
|
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
|
General OS setup
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# examples/hello/Makefile
|
# examples/helloxx/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
@ -52,10 +52,14 @@ all: $(BIN)
|
|||||||
.PHONY: clean depend chkcxx
|
.PHONY: clean depend chkcxx
|
||||||
|
|
||||||
chkcxx:
|
chkcxx:
|
||||||
ifndef CXX
|
ifneq ($(CONFIG_HAVE_CXX),y)
|
||||||
@echo "In order to use this example, you toolchain must support C++"
|
@echo ""
|
||||||
@echo "and CXX, CXXFLAGS, and COMPILEXX must be defined in the Make.defs"
|
@echo "In order to use this example, you toolchain must support must"
|
||||||
@echo "file of the configuration that you are using."
|
@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
|
@exit 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
// examples/hello/main.c
|
// examples/helloxx/main.c
|
||||||
//
|
//
|
||||||
// Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
// Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||||
// Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
// Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user