I am trying to use Eclipse with an existing codebase. This code has the Makefile buried several directories deep from the root of the project sources. If I tell eclipse this buried directory is the root of the project, everything builds, but nothing indexes, since Eclipse does not know where the sources are.
If I tell Eclipse to use the root of the sources, then I have not been able to make Eclipse use the buried makefile.
I have read the other answers to the Eclipse makefile questions, but I still have a problem getting Eclipse to work perfectly - I have also tried a custom Builder schell script that uses the buried Makefile but no luck.
Thanks for any help!
If you already have a makefile, import the project with Existing Code as Makefile Project. File --> Import --> C/C++ --> Existing Code as Makefile Project. It's your responsibility to maintain the makefile. The toolchain is mostly for Managed Builds but it is also used to get the compiler builtins.
some projects put their makefile in src/ subdirectory of the root directories of the projects, some projects put their makefiles in the root directory of the project.
A "make target" provides a way for developers to interactively select a makefile target from within the Eclipse environment. It is assumed that the makefile is named makefile , which will allow it to run with the default build tool configuration. This can be changed but is cleaner if defaults are used.
If you create in Eclipse a project with “Makefile Project from Existing Code”, then it means that you have to supply the make file, it will not be an automake project (make files generated).
I would try to change build directory of your project. In project properties: C/C++ Build -> Builder Settings -> Build directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With