diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-04-19 13:05:39 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-04-19 13:05:39 +0000 |
commit | 05bb03bca1ec249685d0af3665b2121e12fd8db4 (patch) | |
tree | a530c8bb5ce62e0a018b7d9856291fa9404c0033 /nuttx/configs/mx1ads/ostest/Make.defs | |
parent | 396da79a6d002bc1e27a0f903094d6866d0d0b96 (diff) | |
download | px4-nuttx-05bb03bca1ec249685d0af3665b2121e12fd8db4.tar.gz px4-nuttx-05bb03bca1ec249685d0af3665b2121e12fd8db4.tar.bz2 px4-nuttx-05bb03bca1ec249685d0af3665b2121e12fd8db4.zip |
Add C++ HelloWorld example
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1706 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/mx1ads/ostest/Make.defs')
-rw-r--r-- | nuttx/configs/mx1ads/ostest/Make.defs | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/nuttx/configs/mx1ads/ostest/Make.defs b/nuttx/configs/mx1ads/ostest/Make.defs index 134035c50..f0fa33366 100644 --- a/nuttx/configs/mx1ads/ostest/Make.defs +++ b/nuttx/configs/mx1ads/ostest/Make.defs @@ -37,6 +37,7 @@ include ${TOPDIR}/.config CROSSDEV = arm-elf- CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ CPP = $(CROSSDEV)gcc -E LD = $(CROSSDEV)ld AR = $(CROSSDEV)ar rcs @@ -47,6 +48,11 @@ OBJDUMP = $(CROSSDEV)objdump ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow + ifeq ("${CONFIG_DEBUG}","y") ARCHOPTIMIZATION = -g else @@ -55,17 +61,19 @@ else endif ifeq ($(ARCHCCMAJOR),4) - ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin + ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float else - ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin + ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float endif -ARCHPICFLAGS = -fpic -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + +ARCHPICFLAGS = -fpic ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -88,6 +96,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 |