summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile20
-rw-r--r--src/app/prototest/Makefile.inc14
-rw-r--r--src/arch/arduino-nano-168/Makefile.inc16
-rw-r--r--src/arch/arduino-nano/Makefile.inc16
-rw-r--r--src/arch/blinkenrocket/Makefile.inc12
-rw-r--r--src/arch/esp8266/Makefile.inc8
-rw-r--r--src/arch/msp430fr5969lp/Makefile.inc22
-rw-r--r--src/arch/posix/Makefile.inc6
8 files changed, 60 insertions, 54 deletions
diff --git a/Makefile b/Makefile
index 1d560c3..d80ff74 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ COMMON_FLAGS = -g -Os -Wall -Wextra -fno-rtti -fno-threadsafe-statics
CFLAGS = -std=c99
CXXFLAGS = -std=c++14
-TARGETS = src/app/${app}/main.cc src/os/object/cpp_helpers.cc src/os/object/outputstream.cc
+CXX_TARGETS = src/app/${app}/main.cc src/os/object/cpp_helpers.cc src/os/object/outputstream.cc
QUIET = @
@@ -16,42 +16,42 @@ endif
include src/app/${app}/Makefile.inc
ifneq ($(findstring lm75,${drivers}), )
- TARGETS += src/driver/lm75.cc
+ CXX_TARGETS += src/driver/lm75.cc
COMMON_FLAGS += -DDRIVER_LM75
endif
ifneq ($(findstring am2320,${drivers}), )
- TARGETS += src/driver/am2320.cc
+ CXX_TARGETS += src/driver/am2320.cc
COMMON_FLAGS += -DDRIVER_AM2320
endif
ifneq ($(findstring ccs811,${drivers}), )
- TARGETS += src/driver/ccs811.cc
+ CXX_TARGETS += src/driver/ccs811.cc
COMMON_FLAGS += -DDRIVER_CCS811
endif
ifneq ($(findstring eeprom24lc64,${drivers}), )
- TARGETS += src/driver/eeprom24lc64.cc
+ CXX_TARGETS += src/driver/eeprom24lc64.cc
COMMON_FLAGS += -DDRIVER_EEPROM24LC64
endif
ifneq ($(findstring max44006,${drivers}), )
- TARGETS += src/driver/max44006.cc
+ CXX_TARGETS += src/driver/max44006.cc
COMMON_FLAGS += -DDRIVER_MAX44006
endif
ifneq ($(findstring max44009,${drivers}), )
- TARGETS += src/driver/max44009.cc
+ CXX_TARGETS += src/driver/max44009.cc
COMMON_FLAGS += -DDRIVER_MAX44009
endif
ifneq ($(findstring mmsimple,${drivers}), )
- TARGETS += src/driver/mmsimple.cc
+ CXX_TARGETS += src/driver/mmsimple.cc
COMMON_FLAGS += -DDRIVER_MMSIMPLE
endif
ifneq ($(findstring sharp96,${drivers}), )
- TARGETS += src/driver/sharp96.cc
+ CXX_TARGETS += src/driver/sharp96.cc
COMMON_FLAGS += -DDRIVER_SHARP6
COMMON_FLAGS += -DSHARP96_POWER_PIN=GPIO::${sharp96_power_pin}
COMMON_FLAGS += -DSHARP96_EN_PIN=GPIO::${sharp96_en_pin}
@@ -59,7 +59,7 @@ ifneq ($(findstring sharp96,${drivers}), )
endif
ifneq ($(findstring softi2c,${drivers}), )
- TARGETS += src/driver/soft_i2c.cc
+ CXX_TARGETS += src/driver/soft_i2c.cc
COMMON_FLAGS += -DDRIVER_SOFTI2C
endif
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