Fix issue where logger files aren't built for Arduino on CA Branch. 87/187/3
authorJoseph Morrow <joseph.l.morrow@intel.com>
Wed, 21 Jan 2015 19:55:40 +0000 (14:55 -0500)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Tue, 27 Jan 2015 22:56:39 +0000 (22:56 +0000)
The logger file has to be built with a C++ compiler so that we can
use Arduino's Serial functions as they are prepared in C++ world. With
a ".c" extension, the CA layer makefiles enforce it to be build with
a C compiler. We are forcing only the logger.c file to built for c++.

Change-Id: If2c17d15ebdb3b9942cb6c8391b4c2f7865b1fcd
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/187
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/csdk/connectivity/build/arduino/Makefile
resource/csdk/connectivity/build/arduino/arduinomega.properties

index 01b5ddd..495413d 100644 (file)
@@ -37,6 +37,9 @@ core.a: $(PLATFORM_OBJS)
 prep_dirs:
        -mkdir $(OBJ_DIR)
 
+logger.c.o: logger.c
+       $(CCPLUS) $(CFLAGS) $(CFLAGS_PLATFORM) $(INC_DIR_PLATFORM) $< -o $@
+
 %.c.o: %.c
        $(CC) $(CFLAGS) $(CFLAGS_PLATFORM) $(INC_DIR_PLATFORM) $< -o $@
 
index 998a2bd..7b9da1d 100644 (file)
@@ -94,7 +94,7 @@ CORE_COBJ = hooks.c.o WInterrupts.c.o wiring.c.o wiring_digital.c.o wiring_analo
 CORE_CPPOBJ = CDC.cpp.o HardwareSerial.cpp.o HardwareSerial0.cpp.o HardwareSerial1.cpp.o HardwareSerial2.cpp.o HardwareSerial3.cpp.o IPAddress.cpp.o HID.cpp.o \
               main.cpp.o new.cpp.o Print.cpp.o Stream.cpp.o Tone.cpp.o USBCore.cpp.o WMath.cpp.o WString.cpp.o
 SPI_OBJ = SPI.cpp.o
-LOGGER_OBJ = logger.cpp.o oic_logger.c.o oic_console_logger.c.o oic_malloc.c.o oic_string.c.o uarraylist.c.o
+LOGGER_OBJ = logger.c.o oic_logger.c.o oic_console_logger.c.o oic_malloc.c.o oic_string.c.o uarraylist.c.o
 UTIL_OBJ = caadapterutils.c.o camsgparser.c.o
 CACOMMON_OBJ = caconnectivitymanager_singlethread.c.o cainterfacecontroller_singlethread.c.o camessagehandler_singlethread.c.o canetworkconfigurator_singlethread.c.o caprotocolmessage_singlethread.c.o \
                           caremotehandler.c.o caretransmission_singlethread.cpp.o