ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Wrapping external libraries by Makefile currently causes some problems. Ros's build system is via CMake, not Makefiles, so instructions by Makefile miss out on being able to extract information necessary for building. Some of the more important ones:
The biggie being the toolchain information - this will cause an external wrapper by makefile to just fall over dead when cross-compiling.
It's much better to put these kind of build rules/functions/targets in your CMakeLists.txt (some eros packages have some examples) where you can conveniently pick up any global configuration settings (e.g. toolchain, debug mode, compile and link flags) from rostoolchain.cmake and rosconfig.cmake. This makes sure that your ros tree and your external library are compiled with the same (or at least similar) settings. Unfortunately, this does mean learning how the cmake scripting language works and I realise most people are more comfortable with Makefiles.
Hopefully this problem will get resolved with the up and coming rosbuild2.