diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-13 13:34:20 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-13 13:34:20 +0100 |
commit | 6f416f1957a18e6b00963db6f8d416e1c41bb044 (patch) | |
tree | 67553466aac7309ba6dd07a316565fbbb7c6a38e /src | |
parent | d8b578f42c5fbac101c77249c05939fd04d50722 (diff) |
Distinguish between C and C++ targets
Diffstat (limited to 'src')
-rw-r--r-- | src/app/prototest/Makefile.inc | 14 | ||||
-rw-r--r-- | src/arch/arduino-nano-168/Makefile.inc | 16 | ||||
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 16 | ||||
-rw-r--r-- | src/arch/blinkenrocket/Makefile.inc | 12 | ||||
-rw-r--r-- | src/arch/esp8266/Makefile.inc | 8 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/Makefile.inc | 22 | ||||
-rw-r--r-- | src/arch/posix/Makefile.inc | 6 |
7 files changed, 50 insertions, 44 deletions
diff --git a/src/app/prototest/Makefile.inc b/src/app/prototest/Makefile.inc index a33e46f..d3dad26 100644 --- a/src/app/prototest/Makefile.inc +++ b/src/app/prototest/Makefile.inc @@ -10,20 +10,26 @@ endif ifeq (${prototest_mpack}, 1) COMMON_FLAGS += -DPROTOTEST_MPACK - TARGETS += src/lib/mpack/mpack.cc + CXX_TARGETS += src/lib/mpack/mpack.cc INCLUDES += -Iinclude/lib/mpack endif ifeq (${prototest_nanopb}, 1) COMMON_FLAGS += -DPROTOTEST_NANOPB - TARGETS += src/app/prototest/nanopb.pb.cc src/lib/nanopb/pb_common.cc - TARGETS += src/lib/nanopb/pb_decode.cc src/lib/nanopb/pb_encode.cc + CXX_TARGETS += src/app/prototest/nanopb.pb.cc src/lib/nanopb/pb_common.cc + CXX_TARGETS += src/lib/nanopb/pb_decode.cc src/lib/nanopb/pb_encode.cc INCLUDES += -Iinclude/lib/nanopb endif +ifeq (${prototest_ubjson}, 1) + COMMON_FLAGS += -DPROTOTEST_UBJSON + CXX_TARGETS += src/lib/ubjson/ubjr.cc src/lib/ubjson/ubjw.cc + INCLUDES += -Iinclude/lib/ubjson +endif + ifeq (${prototest_xdr}, 1) COMMON_FLAGS += -DPROTOTEST_XDR - TARGETS += src/os/object/xdrstream.cc src/os/object/xdrinput.cc + CXX_TARGETS += src/os/object/xdrstream.cc src/os/object/xdrinput.cc endif %.pb.cc: %.proto diff --git a/src/arch/arduino-nano-168/Makefile.inc b/src/arch/arduino-nano-168/Makefile.inc index a56e62a..e1e1028 100644 --- a/src/arch/arduino-nano-168/Makefile.inc +++ b/src/arch/arduino-nano-168/Makefile.inc @@ -22,22 +22,22 @@ 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 -TARGETS += src/arch/arduino-nano/driver/uptime.cc +CXX_TARGETS += src/arch/arduino-nano/arch.cc +CXX_TARGETS += src/arch/arduino-nano/driver/gpio.cc +CXX_TARGETS += src/arch/arduino-nano/driver/stdout.cc +CXX_TARGETS += src/arch/arduino-nano/driver/uptime.cc ifneq ($(findstring softi2c,${drivers}), ) else ifneq ($(findstring i2c,${arch_drivers}), ) - TARGETS += src/arch/arduino-nano/driver/i2c.cc + CXX_TARGETS += src/arch/arduino-nano/driver/i2c.cc endif ifneq ($(findstring stdin,${arch_drivers}), ) - TARGETS += src/arch/arduino-nano/driver/stdin.cc + CXX_TARGETS += src/arch/arduino-nano/driver/stdin.cc endif ifneq ($(findstring timer,${arch_drivers}), ) - TARGETS += src/arch/arduino-nano/driver/timer.cc + CXX_TARGETS += src/arch/arduino-nano/driver/timer.cc endif ifeq (${cpu_freq}, 16000000) @@ -64,7 +64,7 @@ endif COMMON_FLAGS += -DBAUD=${uart_baud}UL -OBJECTS = ${TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index 08dd6c1..dd8eb30 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -21,22 +21,22 @@ 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 -TARGETS += src/arch/arduino-nano/driver/uptime.cc +CXX_TARGETS += src/arch/arduino-nano/arch.cc +CXX_TARGETS += src/arch/arduino-nano/driver/gpio.cc +CXX_TARGETS += src/arch/arduino-nano/driver/stdout.cc +CXX_TARGETS += src/arch/arduino-nano/driver/uptime.cc ifneq ($(findstring softi2c,${drivers}), ) else ifneq ($(findstring i2c,${arch_drivers}), ) - TARGETS += src/arch/arduino-nano/driver/i2c.cc + CXX_TARGETS += src/arch/arduino-nano/driver/i2c.cc endif ifneq ($(findstring stdin,${arch_drivers}), ) - TARGETS += src/arch/arduino-nano/driver/stdin.cc + CXX_TARGETS += src/arch/arduino-nano/driver/stdin.cc endif ifneq ($(findstring timer,${arch_drivers}), ) - TARGETS += src/arch/arduino-nano/driver/timer.cc + CXX_TARGETS += src/arch/arduino-nano/driver/timer.cc endif ifneq (${cpu_freq}, ) @@ -45,7 +45,7 @@ else COMMON_FLAGS += -DF_CPU=16000000UL endif -OBJECTS = ${TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} diff --git a/src/arch/blinkenrocket/Makefile.inc b/src/arch/blinkenrocket/Makefile.inc index 1d596fd..c3ae7ea 100644 --- a/src/arch/blinkenrocket/Makefile.inc +++ b/src/arch/blinkenrocket/Makefile.inc @@ -17,17 +17,17 @@ ifeq (${aspectc}, 1) CXX = ag++ -r build/repo.acp -v 0 --c_compiler avr-g++ -p . --Xcompiler endif -TARGETS += src/arch/blinkenrocket/arch.cc -TARGETS += src/arch/blinkenrocket/driver/gpio.cc -TARGETS += src/arch/blinkenrocket/driver/stdout.cc -TARGETS += src/arch/blinkenrocket/driver/uptime.cc +CXX_TARGETS += src/arch/blinkenrocket/arch.cc +CXX_TARGETS += src/arch/blinkenrocket/driver/gpio.cc +CXX_TARGETS += src/arch/blinkenrocket/driver/stdout.cc +CXX_TARGETS += src/arch/blinkenrocket/driver/uptime.cc ifneq ($(findstring softi2c,${drivers}), ) else ifneq ($(findstring i2c,${arch_drivers}), ) - TARGETS += src/arch/blinkenrocket/driver/i2c.cc + CXX_TARGETS += src/arch/blinkenrocket/driver/i2c.cc endif -OBJECTS = ${TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} .cc.o: ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc index 71ac350..fdd5636 100644 --- a/src/arch/esp8266/Makefile.inc +++ b/src/arch/esp8266/Makefile.inc @@ -20,17 +20,17 @@ COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH -DMULTIPASS_ARCH_ CXXFLAGS = -std=c++11 LDFLAGS += -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -TARGETS += src/arch/esp8266/arch.cc src/arch/esp8266/driver/gpio.cc -TARGETS += src/arch/esp8266/driver/stdout.cc src/arch/esp8266/driver/uptime.cc +CXX_TARGETS += src/arch/esp8266/arch.cc src/arch/esp8266/driver/gpio.cc +CXX_TARGETS += src/arch/esp8266/driver/stdout.cc src/arch/esp8266/driver/uptime.cc -OBJECTS = ${TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ifeq (${esp8266_led2}, 1) COMMON_FLAGS += -DLED_ON_GPIO16 endif ifneq ($(findstring stdin,${arch_drivers}), ) - TARGETS += src/arch/esp8266/driver/stdin.cc + CXX_TARGETS += src/arch/esp8266/driver/stdin.cc endif .cc.o: diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index aeeb213..4d7fe35 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -13,40 +13,40 @@ CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc CXX = /opt/msp430/ti/gcc/bin/msp430-elf-g++ OBJCOPY = /opt/msp430/ti/gcc/bin/msp430-elf-objcopy -TARGETS += src/arch/msp430fr5969lp/arch.cc +CXX_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 + CXX_TARGETS += src/arch/msp430fr5969lp/driver/adc.cc endif -TARGETS += src/arch/msp430fr5969lp/driver/gpio.cc -TARGETS += src/arch/msp430fr5969lp/driver/stdout.cc -TARGETS += src/arch/msp430fr5969lp/driver/uptime.cc +CXX_TARGETS += src/arch/msp430fr5969lp/driver/gpio.cc +CXX_TARGETS += src/arch/msp430fr5969lp/driver/stdout.cc +CXX_TARGETS += src/arch/msp430fr5969lp/driver/uptime.cc ifneq ($(findstring stdin,${arch_drivers}), ) - TARGETS += src/arch/msp430fr5969lp/driver/stdin.cc + CXX_TARGETS += src/arch/msp430fr5969lp/driver/stdin.cc endif ifneq ($(findstring softi2c,${drivers}), ) else ifneq ($(findstring i2c,${arch_drivers}), ) - TARGETS += src/arch/msp430fr5969lp/driver/i2c.cc + CXX_TARGETS += src/arch/msp430fr5969lp/driver/i2c.cc COMMON_FLAGS += -DDRIVER_I2C endif ifneq ($(findstring spi_a1,${arch_drivers}), ) - TARGETS += src/arch/msp430fr5969lp/driver/spi_a1.cc + CXX_TARGETS += src/arch/msp430fr5969lp/driver/spi_a1.cc endif ifneq ($(findstring spi_b,${arch_drivers}), ) - TARGETS += src/arch/msp430fr5969lp/driver/spi_b.cc + CXX_TARGETS += src/arch/msp430fr5969lp/driver/spi_b.cc endif ifneq ($(findstring timer,${arch_drivers}), ) - TARGETS += src/arch/msp430fr5969lp/driver/timer.cc + CXX_TARGETS += src/arch/msp430fr5969lp/driver/timer.cc endif ifneq (${cpu_freq}, ) @@ -56,7 +56,7 @@ else endif -OBJECTS = ${TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} diff --git a/src/arch/posix/Makefile.inc b/src/arch/posix/Makefile.inc index a4bc653..5162abd 100644 --- a/src/arch/posix/Makefile.inc +++ b/src/arch/posix/Makefile.inc @@ -9,10 +9,10 @@ ifeq (${aspectc}, 1) CXX = ag++ -r build/repo.acp -v 0 -p . --Xcompiler endif -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 +CXX_TARGETS += src/arch/posix/arch.cc src/arch/posix/driver/gpio.cc +CXX_TARGETS += src/arch/posix/driver/stdout.cc src/arch/posix/driver/uptime.cc -OBJECTS = ${TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ifneq (${gpio_trace}, ) COMMON_FLAGS += -DGPIO_TRACE |