Commit c00a200c authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

add optional aspectc++ support

parent f9d2d27f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
default: build/system.elf

INCLUDES = -Iinclude
COMMON_FLAGS = -g -Os -Wall -Wextra -unused -fno-rtti
COMMON_FLAGS = -g -Os -Wall -Wextra -fno-rtti
CFLAGS = -std=c99
CXXFLAGS = -std=c++14

+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@ NM = avr-nm
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump

ifeq (${aspectc}, 1)
	CXX = ag++ -r build/repo.acp -v 0 --c_compiler avr-g++ -p . --Xcompiler
endif

TARGETS += src/arch/arduino-nano/arch.cc
TARGETS += src/arch/arduino-nano/driver/gpio.cc
TARGETS += src/arch/arduino-nano/driver/stdout.cc
+4 −0
Original line number Diff line number Diff line
@@ -11,6 +11,10 @@ AR = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-ar
LD = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-gcc
OBJCOPY = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-objcopy

ifeq (${aspectc}, 1)
	CXX = ag++ -r build/repo.acp -v 0 --c_compiler ${TOOLCHAIN_BASE}/xtensa-lx106-elf-g++ -p . --Xcompiler
endif

INCLUDES += -Iinclude/esp8266 -I${SDK_BASE}/include
COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH
CXXFLAGS = -std=c++11
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ OBJCOPY = /opt/msp430/ti/gcc/bin/msp430-elf-objcopy

TARGETS += src/arch/msp430fr5969lp/arch.cc

ifeq (${aspectc}, 1)
	CXX = ag++ -r build/repo.acp -v 0 --c_compiler /opt/msp430/ti/gcc/bin/msp430-elf-g++ -p . --Xcompiler
endif

ifneq ($(findstring adc,${arch_drivers}), )
	TARGETS += src/arch/msp430fr5969lp/driver/adc.cc
endif
+4 −0
Original line number Diff line number Diff line
@@ -3,6 +3,10 @@
CC = gcc
CXX = g++

ifeq (${aspectc}, 1)
	CXX = ag++ -r build/repo.acp -v 0 -p . --Xcompiler
endif

INCLUDES += -Iinclude/posix
TARGETS += src/arch/posix/arch.cc src/arch/posix/driver/gpio.cc
TARGETS += src/arch/posix/driver/stdout.cc src/arch/posix/driver/uptime.cc