From ffdd62721f3be275539667a483d0809bde50f15b Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sat, 20 Feb 2016 09:57:02 +0100 Subject: [PATCH] LP-238 - Move CPP stuffs within apps/boot-defs.mk. fix targets accordingly --- flight/make/apps-defs.mk | 5 +++++ flight/make/boot-defs.mk | 5 +++++ flight/targets/boards/discoveryf4bare/firmware/Makefile | 1 - flight/targets/boards/revolution/firmware/Makefile | 1 - flight/targets/boards/revonano/firmware/Makefile | 1 - flight/targets/boards/revoproto/firmware/Makefile | 2 -- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/flight/make/apps-defs.mk b/flight/make/apps-defs.mk index e0f837e24..d4d4ff614 100644 --- a/flight/make/apps-defs.mk +++ b/flight/make/apps-defs.mk @@ -132,6 +132,11 @@ SRC += $(MATHLIB)/butterworth.c SRC += $(FLIGHTLIB)/printf-stdarg.c SRC += $(FLIGHTLIB)/optypes.c +## CPP support +ifeq ($(USE_CXX),YES) +CPPSRC += $(FLIGHTLIB)/mini_cpp.cpp +endif + ## Modules SRC += $(foreach mod, $(MODULES), $(sort $(wildcard $(OPMODULEDIR)/$(mod)/*.c))) CPPSRC += $(foreach mod, $(MODULES), $(sort $(wildcard $(OPMODULEDIR)/$(mod)/*.cpp))) diff --git a/flight/make/boot-defs.mk b/flight/make/boot-defs.mk index b3d03a6ce..42629af9c 100644 --- a/flight/make/boot-defs.mk +++ b/flight/make/boot-defs.mk @@ -67,6 +67,11 @@ SRC += $(PIOSCOMMON)/pios_led.c SRC += $(FLIGHTLIB)/op_dfu.c SRC += $(FLIGHTLIB)/printf-stdarg.c +## CPP support +ifeq ($(USE_CXX),YES) +CPPSRC += $(FLIGHTLIB)/mini_cpp.cpp +endif + # List C source files here which must be compiled in ARM-Mode (no -mthumb). # Use file-extension c for "c-only"-files SRCARM += diff --git a/flight/targets/boards/discoveryf4bare/firmware/Makefile b/flight/targets/boards/discoveryf4bare/firmware/Makefile index 8accd89be..74afbdc01 100644 --- a/flight/targets/boards/discoveryf4bare/firmware/Makefile +++ b/flight/targets/boards/discoveryf4bare/firmware/Makefile @@ -97,7 +97,6 @@ ifndef TESTAPP SRC += $(FLIGHTLIB)/insgps13state.c SRC += $(FLIGHTLIB)/auxmagsupport.c SRC += $(FLIGHTLIB)/lednotification.c - CPPSRC += $(FLIGHTLIB)/mini_cpp.cpp ## UAVObjects include ./UAVObjects.inc diff --git a/flight/targets/boards/revolution/firmware/Makefile b/flight/targets/boards/revolution/firmware/Makefile index 94126c63a..1c73f4845 100644 --- a/flight/targets/boards/revolution/firmware/Makefile +++ b/flight/targets/boards/revolution/firmware/Makefile @@ -95,7 +95,6 @@ ifndef TESTAPP SRC += $(FLIGHTLIB)/auxmagsupport.c SRC += $(FLIGHTLIB)/lednotification.c SRC += $(FLIGHTLIB)/sha1.c - CPPSRC += $(FLIGHTLIB)/mini_cpp.cpp ## UAVObjects include ./UAVObjects.inc diff --git a/flight/targets/boards/revonano/firmware/Makefile b/flight/targets/boards/revonano/firmware/Makefile index a5f9fb8bc..94882efc3 100644 --- a/flight/targets/boards/revonano/firmware/Makefile +++ b/flight/targets/boards/revonano/firmware/Makefile @@ -91,7 +91,6 @@ ifndef TESTAPP SRC += $(FLIGHTLIB)/plans.c SRC += $(FLIGHTLIB)/WorldMagModel.c SRC += $(FLIGHTLIB)/insgps13state.c - CPPSRC += $(FLIGHTLIB)/mini_cpp.cpp SRC += $(FLIGHTLIB)/lednotification.c SRC += $(FLIGHTLIB)/auxmagsupport.c ## UAVObjects diff --git a/flight/targets/boards/revoproto/firmware/Makefile b/flight/targets/boards/revoproto/firmware/Makefile index a5bd81a47..4468633d9 100644 --- a/flight/targets/boards/revoproto/firmware/Makefile +++ b/flight/targets/boards/revoproto/firmware/Makefile @@ -90,8 +90,6 @@ ifndef TESTAPP SRC += $(FLIGHTLIB)/WorldMagModel.c SRC += $(FLIGHTLIB)/insgps13state.c SRC += $(FLIGHTLIB)/auxmagsupport.c - CPPSRC += $(FLIGHTLIB)/mini_cpp.cpp - ## UAVObjects include ./UAVObjects.inc