diff options
author | David Sidrane <david_s5@nscdg.com> | 2015-01-22 12:28:18 -1000 |
---|---|---|
committer | David Sidrane <david_s5@nscdg.com> | 2015-04-07 07:49:05 -1000 |
commit | d81673d65c2b0e2163793fcb5746bc3d81976978 (patch) | |
tree | a2085bfb452c53a747557ccf7cdc3dadb6850ef2 | |
parent | c687d4be38676eb8b5e85a8bb2da992baa5002d9 (diff) | |
download | px4-firmware-d81673d65c2b0e2163793fcb5746bc3d81976978.tar.gz px4-firmware-d81673d65c2b0e2163793fcb5746bc3d81976978.tar.bz2 px4-firmware-d81673d65c2b0e2163793fcb5746bc3d81976978.zip |
Added Support for C++ static initializers for all boards. Including compile time checking for proper C++ configuration and not calling up_cxxinitialize redundantly
-rw-r--r-- | src/drivers/boards/aerocore/module.mk | 6 | ||||
-rw-r--r-- | src/drivers/boards/px4fmu-v1/module.mk | 6 | ||||
-rw-r--r-- | src/drivers/boards/px4io-v1/module.mk | 6 | ||||
-rw-r--r-- | src/drivers/boards/px4io-v2/module.mk | 6 |
4 files changed, 24 insertions, 0 deletions
diff --git a/src/drivers/boards/aerocore/module.mk b/src/drivers/boards/aerocore/module.mk index c1b51cd26..51bf315c0 100644 --- a/src/drivers/boards/aerocore/module.mk +++ b/src/drivers/boards/aerocore/module.mk @@ -8,4 +8,10 @@ SRCS = aerocore_init.c \ aerocore_led.c \ ../../../modules/systemlib/up_cxxinitialize.c +ENABLE_CXXINITIALIZE=$(call check_nuttx_config ,"CONFIG_HAVE_CXX 1", $(NUTTX_CONFIG_H)) +ENABLE_CXXINITIALIZE+=$(call check_nuttx_config ,"CONFIG_HAVE_CXXINITIALIZE 1", $(NUTTX_CONFIG_H)) +ifeq ("$(ENABLE_CXXINITIALIZE)",$(nuttx_config_2true)) +SRCS += ../../../modules/systemlib/up_cxxinitialize.c +endif + MAXOPTIMIZATION = -Os diff --git a/src/drivers/boards/px4fmu-v1/module.mk b/src/drivers/boards/px4fmu-v1/module.mk index 5a3f5f801..0f56e53d9 100644 --- a/src/drivers/boards/px4fmu-v1/module.mk +++ b/src/drivers/boards/px4fmu-v1/module.mk @@ -10,4 +10,10 @@ SRCS = px4fmu_can.c \ px4fmu_led.c \ ../../../modules/systemlib/up_cxxinitialize.c +ENABLE_CXXINITIALIZE=$(call check_nuttx_config ,"CONFIG_HAVE_CXX 1", $(NUTTX_CONFIG_H)) +ENABLE_CXXINITIALIZE+=$(call check_nuttx_config ,"CONFIG_HAVE_CXXINITIALIZE 1", $(NUTTX_CONFIG_H)) +ifeq ("$(ENABLE_CXXINITIALIZE)",$(nuttx_config_2true)) +SRCS += ../../../modules/systemlib/up_cxxinitialize.c +endif + MAXOPTIMIZATION = -Os diff --git a/src/drivers/boards/px4io-v1/module.mk b/src/drivers/boards/px4io-v1/module.mk index 40c79da4e..9b3f38f27 100644 --- a/src/drivers/boards/px4io-v1/module.mk +++ b/src/drivers/boards/px4io-v1/module.mk @@ -6,4 +6,10 @@ SRCS = px4io_init.c \ px4io_pwm_servo.c \ ../../../modules/systemlib/up_cxxinitialize.c +ENABLE_CXXINITIALIZE=$(call check_nuttx_config ,"CONFIG_HAVE_CXX 1", $(NUTTX_CONFIG_H)) +ENABLE_CXXINITIALIZE+=$(call check_nuttx_config ,"CONFIG_HAVE_CXXINITIALIZE 1", $(NUTTX_CONFIG_H)) +ifeq ("$(ENABLE_CXXINITIALIZE)",$(nuttx_config_2true)) +SRCS += ../../../modules/systemlib/up_cxxinitialize.c +endif + MAXOPTIMIZATION = -Os diff --git a/src/drivers/boards/px4io-v2/module.mk b/src/drivers/boards/px4io-v2/module.mk index 15e003599..ff5839c80 100644 --- a/src/drivers/boards/px4io-v2/module.mk +++ b/src/drivers/boards/px4io-v2/module.mk @@ -6,4 +6,10 @@ SRCS = px4iov2_init.c \ px4iov2_pwm_servo.c \ ../../../modules/systemlib/up_cxxinitialize.c +ENABLE_CXXINITIALIZE=$(call check_nuttx_config ,"CONFIG_HAVE_CXX 1", $(NUTTX_CONFIG_H)) +ENABLE_CXXINITIALIZE+=$(call check_nuttx_config ,"CONFIG_HAVE_CXXINITIALIZE 1", $(NUTTX_CONFIG_H)) +ifeq ("$(ENABLE_CXXINITIALIZE)",$(nuttx_config_2true)) +SRCS += ../../../modules/systemlib/up_cxxinitialize.c +endif + MAXOPTIMIZATION = -Os |