I have a remote, cross build and I would like to manually take the gcc command line from the makefile build, and use it to setup the Eclipse CDT project file with include paths and preprocessor definitions. How can I do this?
The usual way to do this is using the Build Output Parser.
Enable the Build Output Parser in Project Properties | C/C++ General | Preprocessor Include Paths, Macros etc. | Providers tab
(in might already be enabled).
Make sure you can build the project from within Eclipse. If necessary, configure the make target name and invocation directory in Project Properties | C/C++ Build
.
Invoke the build from within Eclipse.
Note: for this to work, the build output needs to actually contain the raw compiler commands. Sometimes, e.g. with CMake-generated makefiles, it doesn't by default but there is an option to enable it - if so, be sure that the "Build command" specified in Project Properties | C/C++Build
contains that option.