Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Eclipse use an existing makefile that is not in root of project

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!

like image 808
Jeff Avatar asked Mar 06 '12 15:03

Jeff


People also ask

How do I import an existing makefile project into Eclipse?

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.

Where do I put makefile in project?

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.

What is build target in Eclipse?

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.

What is makefile in eclipse?

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).


1 Answers

I would try to change build directory of your project. In project properties: C/C++ Build -> Builder Settings -> Build directory.

enter image description here

like image 100
Eldar Abusalimov Avatar answered Nov 14 '22 02:11

Eldar Abusalimov