RIOT-OS/RIOT — pull request #981 by dangnhat (2014-04-06 19:23:46+00:00)
Title: Another way to mix c and cpp in user app with RIOT [native]

Similar to PR #412 and #770 of BytesGalore, in this PR, user can use c, c++, or both c and c++ files in user app without care about makefiles of RIOT. The ideas are:
- provide both c (CC) and c++ compiler (CXX), compile flags for c, c++ files (CFLAGS, CXXFLAGS) at the board-level (boards/native/Makefile.include)
- invoke CC, CXX to compile c, c++ files in user's separately by using static pattern rules
- switch the linker in run-time to use CXX instead of LINK if c++ files exists in user app.

For now, I just focus on native port. But for other ports, we just need to provide CXX, and CXXFLAGS in makefile.include of these boards. I will test this with iot-lab_M3 and post some results later.

cheers.